Upgrading D-MONA
ESC allows upgrading the D-MONA instance to a newer version starting from ESC 5.7 release. Use the following procedure to upgrade the D-MONA:
-
Ensure the
<image>
tag in the XML file refers to the newer version of the D-MONA image. -
Ensure the respective D-MONA image is registered in the Virtual Infrastructure Manager (OpenStack).
Now, execute following command:
esc_nc_cli edit-config <dmona.xml>
Upon successful upgrade, VM_UPDATED and SERVICE_UPDATED notifications are generated by ESC. For example:
2022-03-02 15:47:24.948 INFO ===== SEND NOTIFICATION STARTS =====
2022-03-02 15:47:24.948 INFO Type: VM_UPDATED
2022-03-02 15:47:24.948 INFO Status: SUCCESS
2022-03-02 15:47:24.948 INFO Status Code: 200
2022-03-02 15:47:24.948 INFO Status Msg: VM image Updated. VM name: [dmona2_Grp1_0_6c14ce01-82d4-40ca-a8bb-dce97f99eeae], new Image: [ESC-5_7_0_64]
2022-03-02 15:47:24.948 INFO Tenant: admin
2022-03-02 15:47:24.948 INFO Deployment ID: 47831c9f-2323-431f-b7ea-748891d23430
2022-03-02 15:47:24.949 INFO Deployment name: dmona2
2022-03-02 15:47:24.949 INFO VM group name: Grp1
2022-03-02 15:47:24.949 INFO User configs: 1
2022-03-02 15:47:24.949 INFO VM Source:
2022-03-02 15:47:24.949 INFO VM ID: 0f5b4ba3-bf05-4cd8-bde8-1604102ef261
2022-03-02 15:47:24.949 INFO VM Name: dmona2_Grp1_0_6c14ce01-82d4-40ca-a8bb-dce97f99eeae
2022-03-02 15:47:24.949 INFO VM Name (Generated): dmona2_Grp1_0_6c14ce01-82d4-40ca-a8bb-dce97f99eeae
2022-03-02 15:47:24.949 INFO Host ID: dab2a418b071996c15dc91ec9f11b925890028e65ce7314aae40640a
2022-03-02 15:47:24.950 INFO Host Name: my-ucs-54
2022-03-02 15:47:24.950 INFO ===== SEND NOTIFICATION ENDS =====
2022-03-02 15:47:25.113 INFO
2022-03-02 15:47:25.113 INFO ===== SEND NOTIFICATION STARTS =====
2022-03-02 15:47:25.113 INFO Type: SERVICE_UPDATED
2022-03-02 15:47:25.114 INFO Status: SUCCESS
2022-03-02 15:47:25.114 INFO Status Code: 200
2022-03-02 15:47:25.114 INFO Status Msg: Service group update completed successfully
2022-03-02 15:47:25.114 INFO Tenant: admin
2022-03-02 15:47:25.114 INFO Deployment ID: 47831c9f-2323-431f-b7ea-748891d23430
2022-03-02 15:47:25.114 INFO Deployment name: dmona2
2022-03-02 15:47:25.115 INFO ===== SEND NOTIFICATION ENDS =====
On Success:
VM_UPDATED -200 - success message
SERVICE_UPDATED -200 - success message
On Failure:
VM_UPDATED -500 - failure message
SERVICE_UPDATED -500 - failure message
If the upgrade fails, then repeat the same steps mentioned previously to downgrade D-MONA to previous version.
Note |
|
For example, to upgrade D-MONA version to ESC-a_b_c_d
image, update the image name in the XML file and use the following command to upgrade the D-MONA:
esc_nc_cli edit-config <dmona.xml>
<esc_datamodel xmlns="http://www.cisco.com/esc/esc">
<tenants>
<tenant>
<name>admin</name>
<deployments>
<deployment>
<name>dmona2</name>
<vm_group>
<name>Grp1</name>
<image>ESC-a_b_c_d</image>
<flavor>m1.medium</flavor>
<bootup_time>600</bootup_time>
<recovery_wait_time>0</recovery_wait_time>
<recovery_policy>
<recovery_type>AUTO</recovery_type>
<max_retries>1</max_retries>
<action_on_recovery>REDEPLOY_ONLY</action_on_recovery>
</recovery_policy>
<interfaces>
<interface>
<nicid>0</nicid>
<network>esc-net</network>
</interface>
</interfaces>
<kpi_data>
<kpi>
<event_name>VM_ALIVE</event_name>
<metric_value>1</metric_value>
<metric_cond>GT</metric_cond>
<metric_type>UINT32</metric_type>
<metric_collector>
<type>HTTPGET</type>
<nicid>0</nicid>
<poll_frequency>5</poll_frequency>
<polling_unit>seconds</polling_unit>
<continuous_alarm>false</continuous_alarm>
<properties>
<property>
<name>protocol</name>
<value>https</value>
</property>
<property>
<name>port</name>
<value>8443</value>
</property>
<property>
<name>path</name>
<value>mona/v1/health/status</value>
</property>
</properties>
</metric_collector>
</kpi>
</kpi_data>
<rules>
<admin_rules>
<rule>
<event_name>VM_ALIVE</event_name>
<action>ALWAYS log</action>
<action>TRUE servicebooted.sh</action>
<action>FALSE recover autohealing</action>
</rule>
</admin_rules>
</rules>
<config_data>
<configuration>
<dst>--user-data</dst>
<file>file:///opt/cisco/esc/esc-config/dmona/user-data.template</file>
<variable>
<name>vm_credentials</name> <val>$6$rounds=4096$LRNEIV2u5o$HcPKqABon6RvnS705M7J2l2xuRWCl7xOjUY5ST.0e7oIhvfRqicNoVFMZYkwO6GRTBVyRnc/wwGbdp2Z5KtgX/</val>
</variable>
</configuration>
<configuration>
<dst>/opt/cisco/esc/mona/dmona.crt</dst>
<data>$DMONA_CERT</data>
</configuration>
<configuration>
<dst>/opt/cisco/esc/mona/config/application-dmona.properties</dst>
<file>file:///opt/cisco/esc/esc-config/dmona/application-dmona.template</file>
<variable>
<name>monitoring.agent</name>
<val>true</val>
</variable>
<variable>
<name>security_basic_enabled</name>
<val>true</val>
</variable>
<variable>
<name>security_user_name</name>
<val>dmona</val>
</variable>
<variable>
<name>security_user_password</name>
<val>defaultUser</val>
</variable>
<variable>
<name>monitoring.agent.instance.name</name>
<val>D-MONA-OTTAWA</val>
</variable>
<variable>
<name>monitoring.agent.instance.id</name>
<val>D-MONA-123</val>
</variable>
<variable>
<name>monitoring.agent.api.key</name>
<val>233</val>
</variable>
<variable>
<name>notification.url</name>
<val> https://<ESC_VM_IP:8443/ESCManager/v0/api/events/notif</val>
</variable>
<variable>
<name>monitoring.agent.vim.mapping</name>
<val>false</val>
</variable>
</configuration>
</config_data>
</vm_group>
</deployment>
</deployments>
</tenant>
</tenants>
</esc_datamodel>
Upon completion of the D-MONA upgrade, that is, after receving the SERVICE_UPDATED successful notification, the agent is rebuilt (using the Compute API up to microservice version 2.56) with the new image and the central ESC repopulates it with all its monitoring rules so that monitoring of VNFs continues where it was prior to the upgrade.
Note |
Whilst the D-MONA agent upgrade is in progress, the VNFs it is responsible from monitoring is not monitored. If you need to continue monitoring for these VNFs then consider migrating monitoring to another monitoring agent (D-MONA or central MONA). |