Pivotal Knowledge Base


How to edit Operations Manager Installation Settings Using API Endpoint


Pivotal Operations Manager versions 1.7.x, 1.8.x, 1.9.x, and 1.10.x


This article explains how to edit the installation.yml file for the Operations Manager using the API endpoint.


Caution- Use extreme caution when performing this procedure as it may result in the loss of Pivotal Cloud Foundry deployment. It is recommended to engage the Pivotal Support for the precautionary measures.

1. If you would like to copy and paste commands from this procedure, then start by setting these environmental variables:

 export OPSURL="operations manager url"

2. Open a terminal and run the following UAAC commands to acquire an access token.

A). Target Operations Manager UAA endpoint:

     uaac target ${OPSURL}/uaa

I. If Operations Manager is not integrated with SAML, proceed to this next step:

       uaac token owner get
       Client ID: opsman
       Client secret: <Leave Blank>
       User name: <Username to log into OpsManager>
       Password: <Password to log into OpsManager>

II. If Operations Manager is integrated with SAML, then follow this step and acquire a passcode from https://${OPSMANWEB}/uaa/passcode endpoint:

      uaac token sso get
      Client ID: opsman
      Client secret: <Leave Blank>
      Passcode: <paste from /uaa/passcode endpoint>

3. Now that we have successfully obtained an access token, we need to put it into an environment variable for easy access.

 A). Run this command to print your access token:

    # uaac context
     access_token: .....
     token_type: bearer
     expires_in: 43199
     scope: clients.read password.write clients.secret clients.write uaa.admin scim.write scim.read
     jti: ....

4. Export the access token into an environmental variable:

 export TOKEN="access token from ops manager response"

A). Download the installation settings from Operations Manager endpoint:

    curl -s -k -H 'Accept: application/json;charset=utf-8' -H "Content-Type: application/json" -H "Authorization: bearer $TOKEN" https://${OPSURL}/api/installation_settings | python -m json.tool > installsettings.json

B). Make a backup copy of the installation settings:

    cp installsettings.json installsettings.json.original

C). Make the desired changes to installsettings.json.

D). Post the installsettings.json file to Operations Manager to commit the changes:

   curl -s -k -H 'Accept: application/json;charset=utf-8' -H "Content-Type: multipart/form-data" -H "Authorization: bearer $TOKEN" https://${OPSURL}/api/installation_settings -X POST -F  "installation[file]=@installsettings.json"

E). Log in to Operations Manager and confirm that the changes were committed.

F). If something appears to be wrong with the changes, then use the following command to restore the backup install settings file created in step 4.B). before you click "apply changes":

  curl -s -k -H 'Accept: application/json;charset=utf-8' -H "Content-Type: multipart/form-data" -H "Authorization: bearer $TOKEN" ${OPSURL}/api/installation_settings -X POST -F  "installation[file]=@installsettings.json.original"


We recommend utilizing guidance from Pivotal Support when using this procedure. Following are the risks associated with this procedure:

  • Small changes to the installation settings could result in corruption of the Bosh Director deployments, and it may not be recoverable. Any changes made using this method should be discussed with Pivotal Support.
  • The installation settings contain sensitive information like user password credentials that should not be leaked to the public domain. When using this method, make sure the installation settings are stored in a secure location, like locally on the Operations Manager host to ensure credentials are not exposed. 


Powered by Zendesk