In the v15.0.0 NextGen gateway, there is a known issue where users faced difficulties upgrading to v15.1.0 from the OpsRamp UI. However, the issue has been resolved now.
To upgrade the NextGen gateway from v15.0.0 to v15.1.0, users are required to perform a manual upgrade using one of the following options:
- Option 1: If the Gateway has OpsRamp Agent installed
- Option 2: If the Gateway does not have OpsRamp Agent installed
Option 1: If the Gateway has OpsRamp Agent installed
- Login to OpsRamp portal and navigate to Automation > Scripts.
- Create a Category by clicking (+) icon:
- Select Category Type: Global Script / Partner or Client Category based on the required scope of the Category
- Provide a Category Name.
- Click Save.
- Now a Category has been created.
- Navigate to Category and create a Script by clicking on (</>) icon:
- Select Script Type: Global Script / Partner or Client Script based on the required scope of the script
- Execution Type: SHELL
- Platform: Supported on Linux
- Provide Script Name and Description
- Add the following script in the script field.
#!/usr/bin/sh logFileName="/tmp/ondemand-job.log" echo "$(date) : Creating yaml file" >> $logFileName kubectl get cm vprobe-updater-cm -n $1 -o jsonpath='{.data.ondemand-job\.yaml}' > /tmp/ondemand-job.yaml if [ $? -eq 0 ]; then echo "$(date) : Successfully created yaml file" >> $logFileName echo "$(date) : Creating on-demand job" >> $logFileName kubectl apply -f /tmp/ondemand-job.yaml -n $1 if [ $? -eq 0 ]; then echo "$(date) : Successfully created on-demand job" >> $logFileName else echo "$(date) : Failed to created on-demand job" >> $logFileName fi else echo "$(date) : Failed to create yaml file" >> $logFileName fi
- Add the following parameters to the script.
- Click the Save button.
- After saving the script, click the “Apply Script to Devices” option.
- Next, select the following data and then click the “Run Now” button.
- Client Name: Your client name
- Group Name: Gateway
- Devices: Select your gateway profile name
- Parameters: Pass your gateway namespace (it will be set to default)
8. To check the successful execution of script, verify the /tmp/ondemand-job.log
file.
tail -f /tmp/ondemand-job.log
- Verify ondemand pod status.
podname:nextgen-gw-updater-ondemand-jon-*
kubectl get pods
Option 2: If the Gateway does not have OpsRamp Agent installed
Run the upgrade-gateway.sh
script to upgrade gateways from v15.0.0 to v15.1.0.
- Launch the gateway SSH console.
- Create the upgrade-gateway.sh file, then add the following scripts and save it.
#!/usr/bin/sh logFileName="/tmp/ondemand-job.log" echo "$(date) : Creating yaml file" >> $logFileName kubectl get cm vprobe-updater-cm -n $1 -o jsonpath='{.data.ondemand-job\.yaml}' > /tmp/ondemand-job.yaml if [ $? -eq 0 ]; then echo "$(date) : Successfully created yaml file" >> $logFileName echo "$(date) : Creating on-demand job" >> $logFileName kubectl apply -f /tmp/ondemand-job.yaml -n $1 if [ $? -eq 0 ]; then echo "$(date) : Successfully created on-demand job" >> $logFileName else echo "$(date) : Failed to created on-demand job" >> $logFileName fi else echo "$(date) : Failed to create yaml file" >> $logFileName fi
- Run the above created script using following command.
sh upgrade-gateway.sh default
If the gateway is running on a different namespace, use the following command to change the namespace of gateway.sh upgrade-gateway.sh {NAME SPACE}
- To check the successful execution of script, verify the
/tmp/ondemand-job.log
file.tail -f /tmp/ondemand-job.log
- Verify ondemand pod status.
podname:nextgen-gw-updater-ondemand-jon-*
kubectl get pods