Changing the Administrator Password

The default administrator password can be changed from the developer portal.

Prerequisites

Make sure all components are active and the cluster is up and running
cm ls components
Using cluster [aniket-gcp-cluster-single-host-172]
Using Zone [us-central1-a]
Component ID                          Type            Name                                                                   Status       Last Heartbeat Received     Host           Service Port(s)           
----------------------------------   -----------     ------------------------------------------------------------------- -----------   ------------------------    --------       -------------------
33319687-0658-44b9-baa4-409825c930b5  cache           cache-set-0-0.cache-svc-0.default.svc.cluster.local                  ACTIVE       May 24 2021 21:12:18 +0000  10.120.0.14 11212,11211,11213,11214,11215,11216
d5b21d3e-7d9f-4d80-80b4-2afd57177a9a  configmanager   cm-deploy-0-5ccc99468f-m6s95.cm-svc-0.default.svc.cluster.local      ACTIVE       May 24 2021 21:12:09 +0000  10.120.0.11    7080                      
3f9262a3-470e-4557-806e-4a23659d5fb6  logservice      log-set-0-0.log-svc-0.default.svc.cluster.local                      ACTIVE       May 24 2021 21:12:19 +0000  10.120.0.12    24224                     
da4e3f02-3d0c-45ef-9595-25ac200f3992  nosql           cass-set-0-0.cass-svc-0.default.svc.cluster.local                    ACTIVE       May 24 2021 21:12:22 +0000  10.120.0.10    9042                      
afc6a10d-1ca6-4bd8-bd51-7dd413561efe  sql             mysql-set-0-0.mysql-svc-0.default.svc.cluster.local                  ACTIVE       May 24 2021 21:12:12 +0000  10.120.0.13    3306                      
0ab8c275-13e0-40d0-b486-96f7f64706a2  trafficmanager  tm-deploy-0-bc677b4c-c728g.tm-svc-0.default.svc.cluster.local        ACTIVE       May 24 2021 21:12:15 +0000  10.120.0.15    8080
To change the default administrator password,

Procedure

  1. Launch the developer portal.
    https://<cm_svc_ip>:8443
  2. Navigate to Localdev Admin > Profile and click Change Password. Input the current and the new password
  3. Navigate to the properties folder from the installation directory.
    <root_dir>/docker-deploy/properties
  4. Add new field by replacingpassword withnew_password as its value in the tml_cm_properties.json file
    "maxIdleTime" : 300,
    "api_debug_key" : "24NumbersAndOrCharacters",
    "api_debug_secret" : "10NumChars",
    "password" : "<new_password>"
  5. Recompose the manifest file to generate the updated artifacts.
    ./compose.sh <mainfest_json_file>
  6. Navigate to the manifest folder and undeploy the cm pod.
    ./undeploy-cm-pod.sh
    secret "cm-property" deleted
    secret "cm-jks" deleted
    secret "cm-crt" deleted
    secret "cm-key" deleted
    secret "cm-resource" deleted
    deployment.apps "cm-deploy-0" deleted
  7. Redeploy the cm pod. The new password will come in effect now.
    ./deploy-cm-pod.sh
    secret/cm-property created
    secret/cm-jks created
    secret/cm-crt created
    secret/cm-key created
    secret/cm-resource created
    deployment.apps/cm-deploy-0 created
     
    cm-deploy-0-5ccc99468f-gfz7r   1/1     Running   0          10s

What to do next

  • Ensure all components are in active state

    cat /opt/mashery/containeragent/resources/properties/tml_cm_properties_final.json | grep \"password\"
       
    "password" : "<new_password>",
  • To verify the new password, login the control center using the new password.
    https://<cm_svc_ip>:8443/admin

    You can carry out operations using the latest credentials.