Contents
SmartOps product deployment configuration has been revised to support better flexibility and configuration. Products will be packaged in new format referred as “Smart package” and will be deployable using tool “smartpkg”. This document covers instructions to migrate existing environment configuration to new format and installation of AIOPS 2.5.2 using new mechanism. Same set of instructions can be followed hereafter except the migration steps, which applies only for first time.
Download the tar file from aiops-2.5.2.tar.gz
To meet the solution stack prerequisites and requirements.
Validate and Upgrade smartpkg package version.
Kubeseal Installation in Bastion Server
Sealed Secret Controller Installation
Backup and generate sealed secret from the existing secret.
Take a backup for all the helm manifests
Delete helm manifests
Login to the VM Server
Validate if the smartpkg has installed and if they use the latest version. Run command below.
$ python3 -m pip list | grep smartpkg
Note: Proceed step #3 if smartpkg version is not latest version (0.0.17). If the smartpkg has not yet installed in the VM please proceed the installation of Smartpkg Installation in bastion
Uninstall the smartpkg library. Run command below.
$ python3 -m pip uninstall smartpkg==0.0.14
Install the smartpkg library with the latest version.
$ python3 -m pip install smartpkg==0.0.17 -i https://3thxl5c3tscnjmg3cxjwmc2lnw2i7gwtug7xookemzo6mmrutzcq@pkgs.dev.azure.com/USTInnovationEngineering/SmartOps/_packaging/python-lib/pypi/simple --
Smartpkg is a python-based tool to help managing and deploying smartops Product packages based on helm charts. This is a prerequisite to deploy smartOps products. SmartPkg should be installed in machine from where the Kubernetes deployment happens which is usually a bastion machine.
Below are the pre-requisites for installing smartpkg
Python3 should be installed in the machine
Installation Steps
Login to the machine you want to install smartpkg
Execute => sudo apt-get install python3-pip
Execute => python3 -m pip install ConfigArgParse wheel pyyaml jsonschema
Execute => python3 -m pip install smartpkg==0.0.17 -i https://3thxl5c3tscnjmg3cxjwmc2lnw2i7gwtug7xookemzo6mmrutzcq@pkgs.dev.azure.com/USTInnovationEngineering/SmartOps/_packaging/python-lib/pypi/simple --
Verify the installation by => smartpkg –help
Note: If smartpkg: command not found error shows up, logout and login or open a new session.
Download the binary file from github.
Change the file mode permission and verify the version by running the command.
Go to directory folder and create backup folder.
Fetch the manifest of all the helm releases using below script (Please substitute namespace and kube-context wherever required)
Provide execution permission and execute manifest.sh
Fetch manifest for logmon which is in different namespace
Note: Please make you’ve backup the sealed secrets.
Execute the script to uninstall all the releases from releases.txt file
delete_release.sh
#!/bin/bash
while read line; do helm uninstall $line -n itopsv1-stg01 --kube-context= kc-smartops-itops-stg; done < releases.txt
Provide execution permission and execute delete_release.sh
$ chmod +x delete_release.sh
$ bash delete_release.sh
Uninstall all the remaining releases
$ helm uninstall smartops-logmon-logmon-rel -n smartops-logmon --kube-context kc-smartops-itops-stg
$ helm uninstall sealed-secrets-controller-rel -n sealed-secrets-controller --kube-context kc-smartops-itops-stg
$ helm uninstall smartops-common-secret-setup-rel -n smartops-common --kube-context kc-smartops-itops-stg