How to manually upgrade a release within the TAS tile
search cancel

How to manually upgrade a release within the TAS tile

book

Article ID: 293785

calendar_today

Updated On:

Products

Operations Manager

Issue/Introduction


Warning: Do NOT use this KB unless instructed to by Tanzu Support who will provide the specific release versions to utilize. There may be unexpected complications that may arise during this procedure which may include changes to database schemas or codebase. Tanzu support will be able to validate repercussions prior to supplying this article.

This guide will show you how to manually update a release within a TAS deployment. As an example, we will be updating the release version of Percona PXC within our chosen TAS release (TAS version 3.0.7). 

Environment

Product Version: 2.10

Resolution

Follow a number of steps that includes manually editing the TAS metadata YAML file.

STEP 1
SSH into the Ops Manager VM and connect the BOSH CLI to your environment

STEP 2
Verify current release. As example, we are on PXC 1.0.7 and we want to upgrade to PXC 1.0.8

ubuntu@opsmgr-33-slot-34-tanzu-gss-labs:~$ bosh releases | grep -i pxc
pxc                          	1.0.7*   	3ee4d49b

STEP 3 
Download the release you want to upgrade to into the /var/tempest/releases/ directory. In our case, this will be PXC 1.0.8 and we will grab this from the corresponding github page
sudo -u tempest-web wget -P /var/tempest/releases/ https://github.com/cloudfoundry/pxc-release/releases/download/v1.0.8/pxc-1.0.8.tgz

STEP 4
Search for the TAS metadata file(s) by running the command below. 


NOTE: There may be multiple YML files that may match and we will want to find the metadata file that aligns with the currently deployed version of TAS, which we will do in step 5

In our case, the metadata file is 8369038fd814.yml

ubuntu@opsmgr-33-slot-34-tanzu-gss-labs:/var/tempest/releases:~$ sudo grep -l "^name: cf" /var/tempest/workspaces/default/metadata/* 

/var/tempest/workspaces/default/metadata/8369038fd814.yml

STEP 5

If there are multiple matching YML files from step 4, please run the following on each one to confirm the correct metadata file that aligns to the currently deployed TAS version

In our case, we confirm that our TAS version is 3.0.7:

ubuntu@opsmgr-33-slot-34-tanzu-gss-labs:~$ sudo head /var/tempest/workspaces/default/metadata/8369038fd814.yml
---
name: cf
product_version: 3.0.7
minimum_version_for_upgrade: 2.11.0
pivnet_filename_regex: cf-.*\\.pivotal
label: VMware Tanzu Application Service
rank: 90

STEP 6
IMPORTANT:  Before making edits to the metadata file(s), make sure to create a backup of the current metadata file to the user's home directory. 
ubuntu@opsmgr-33-slot-34-tanzu-gss-labs:/var/tempest/releases$ sudo cp /var/tempest/workspaces/default/metadata/8369038fd814.yml ~/8369038fd814-backup.yml


STEP 7
Edit the metadata file(s) to our desired version of the release. In our case, we would swap out PXC 1.0.7 with PXC 1.0.8
sudo vim /var/tempest/workspaces/default/metadata/8369038fd814.yml

Here is our metadata file BEFORE we make any edits. Notice that the PXC version is set at 1.0.7:   

- name: pxc
  version: 1.0.7
  file: pxc-1.0.7-ubuntu-jammy-1.80.tgz
  exported_from:
  - os: ubuntu-jammy
    version: ‘1.80’

To prep for the edits we are about to make in vim, we can follow these steps: 
  • Press the ESC key
  • Type /pxc into vim console to find the first occurrence of /pxc.
    • IMPORTANT: If the release you want to update is NOT pxc, then you would adjust the search string to /$YOUR_RELEASE_NAME. An example of this could be /routing or /silk 
  • Press the ENTER or RETURN key
  • The cursor should now be over the section we want to edit: 


Screenshot 2023-04-14 at 2.30.16 PM.pngNotice that AFTER we've made the edits, we have deleted the exported_from block, changed the PXC version to 1.0.8 and replaced the file field with the updated PXC release file we downloaded in step 3: 
- name: pxc
  version: 1.0.8
  file: pxc-1.0.8.tgz
IMPORTANT:  After making the edits above to the metadata YML file, don't forget to save the changes in vim. We can do this in vim via these steps: 
  • Press the ESC button in the vim console
  • Type :wq into the vim console
  • Press the ENTER or RETURN key to write the new edits to the file

STEP 8
Apply changes to our affected tile (in this case, TAS). Confirm that a change is highlighted in the apply changes preview page that looks something like this:
Screenshot 2023-04-14 at 2.18.54 PM.png
releases: 
- name: pxc
+  version: 1.0.8
-  version: 1.0.7
- exported_from: 
- - os: ubuntu-jammy 
- version: ‘1.80’
+  url: file:///var/tempest/releases/pxc-1.0.8.tgz
-  url: file:///var/tempest/releases/pxc-1.0.7-ubuntu-jammy-1.80.tgz

STEP 9
After the apply changes has successfully completed, we can then check the releases for pxc and see the that our updated release has been successfully integrated into the bosh environment:
ubuntu@opsmgr-33-slot-34-tanzu-gss-labs:~$ bosh releases | grep -i pxc
pxc                          	1.0.8*   	0304d59e	
pxc                          	1.0.7    	3ee4d49b