Pivotal Knowledge Base

Follow

How to manually edit your installation YAML file on the Ops Manager VM

Environment

Product Version
 Pivotal Cloud Foundry® (PCF)  1.6.x, 1.7.x, 1.8.x, 1.9.x, 1.10.x, 1.11.x, 1.12.x

Purpose

When configuring the Ops Manager Director, you might have entered the information for an S3 bucket to be used for Ops Manager storage instead of internal storage, then pressed the "Save" button to save the settings in the configuration. After doing so, you may have since changed that decision or your settings didn't validate, but Ops Manager will sometimes retain certain information even before it's initially deployed and you might not want that information saved in the Ops Manager configuration. So you will have to manually edit the Director's installation.yml to remove it.

 

Cause

Once you enter valid S3 Bucket information into the Ops Manager configuration, it will add it into the file but it doesn't remove this. Unfortunately, for now, to remove it you have to do so manually. Once the storage is set for Ops Manager and it is deployed it will not allow changes to it as doing so once you deploy Ops Manager can result in your environment entering a failing state.

 

Procedure

1) After configuring an S3 compatible Blobstore in the Ops Manager Director Configs and clicking "save", it has saved those settings into the installation.yml file.

2) Connect via SSH on to your Ops Manager VM, and run the following command to decrypt the installation.yml file:

sudo -u tempest-web RAILS_ENV=production /home/tempest-web/tempest/web/scripts/decrypt /var/tempest/workspaces/default/installation.yml /tmp/installation.yml

When prompted, enter the Decryption Passphrase.

As you can see, this puts a decrypted installation.yml file on the director at /tmp/installation.yml

3) Make a back-up of the installation.yml file before continuing to the next step or making any changes. 

4) Make the following changes to the /tmp/installation.yml file:

Make sure this property is set to internal:

blobstore_type: internal

Remove this section from /tmp/installation.yml

    s3_blobstore_options:
      endpoint: <redacted>
      bucket_name: <redacted>
      access_key: <redacted>
      secret_key: <redacted>
      signature_version: '2'

5) Now that the installation settings have the S3 bucket information removed, we need to encrypt the installation.yml file again. Do so by running the following:

sudo -u tempest-web RAILS_ENV=production /home/tempest-web/tempest/web/scripts/encrypt /tmp/installation.yml /var/tempest/workspaces/default/installation.yml

When prompted, enter the Decryption Passphrase.

6) Now, you should be able to go to your Ops Manager director config settings and see the S3 blobstore settings removed, and internal should be checked.

 

Impact/Risk

Since changing the installation.yml file is a risky operation, we highly recommend you do not attempt to change or delete any settings in the installation.yml file besides what is shown above. Doing so can result in an invalid file and can break Ops Manager to a point where a fresh install is necessary.

We also recommend that you backup the installation.yml file before making any changes.

 

Notes

If, when attempting to decrypt the installation.yml file, you receive an error indicating:

Failed to decrypt /var/tempest/workspaces/default/installation.yml: #<:undefinedconversionerror: from ascii-8bit to utf-8>

This is likely to be caused by a value of `{ "usd": "$", "eur": "€" }` being located in the ERT tile > Settings tab > Apps Manager page > "Supported currencies as json" field.

The fix for this is to eliminate that special character () from the field's value. In one reported case, it was replaced it with "$$" and then they clicked "Save", but they DID NOT "Apply Changes".  After creating the decrypted installation.yml file in /tmp, revert the changes by adding back the special character (). Then proceed with remaining steps in the article. 

Comments

  • Avatar
    Stephen Saenz

    If, when attempting to decrypt the installation.yml file, you receive an error indicating "Failed to decrypt /var/tempest/workspaces/default/installation.yml: #<:undefinedconversionerror: from ascii-8bit to utf-8>", this is likely to be caused by a value of "{ "usd": "$", "eur": "€" }" being located in the ERT tile > Settings tab > Apps Manager page > "Supported currencies as json" field.

    The fix for this is to eliminate that special character (€) from the field's value.  In my case, I replaced it with "$$" and clicked "Save", but I DID NOT click "Apply Change".  After creating the decrypted installation.yml file in /tmp, revert the changes.  Then proceed with remaining steps in the article.

    Maybe this article can be updated to reflect this, as the indicated field value is the default during installation.

    Edited by Stephen Saenz
  • Avatar
    Ryan Hall

    Hi Stephen,

    Thanks for pointing that out, I will reflect it within this KB.

    This was a bug in some versions of Ops Manager, although I believe it has since been fixed, but I'm not 100% sure on that. If you're not running the most up-to-date version of the Ops Manager in your PCF Environment, we always recommend upgrading!

Powered by Zendesk