Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulling Hotfix/4.2 to dev-stable/5.0 #786

Open
wants to merge 160 commits into
base: dev-stable/5.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
e4ee61f
TVAULT-5220 : Move kolla & RHOSP build scripts from cfg repo to autom…
rajneeshkapoor Jul 28, 2022
c198989
Merge pull request #693 from rajneeshkapoor/hotfix/4.2
rajneeshkapoor Jul 29, 2022
5535b69
Merge branch 'trilioData:master' into interop-755
shyam-biradar Nov 4, 2022
c2874d4
Added fixes for yoga
shyam-biradar Nov 7, 2022
7f3a6d0
Merge branch 'interop-755' of https://github.com/shyam-biradar/trilio…
shyam-biradar Nov 7, 2022
1c58927
Fixes for yoga
shyam-biradar Nov 7, 2022
36ca9f5
Fixes for yoga
shyam-biradar Nov 7, 2022
589f424
Fixes for yoga
shyam-biradar Nov 7, 2022
814e1ca
Merge pull request #737 from shyam-biradar/interop-755
shyam-biradar Nov 10, 2022
55d0863
Fixed parameter name
shyam-biradar Nov 11, 2022
b4269e0
Merge pull request #738 from shyam-biradar/interop-755
shyam-biradar Nov 11, 2022
8a5b124
Merged globals file in one file
shyam-biradar Nov 11, 2022
12a4305
Merge pull request #739 from shyam-biradar/interop-755
shyam-biradar Nov 11, 2022
339de2a
Handling horizon image urls for source and binary
shyam-biradar Nov 11, 2022
2463032
Merge pull request #740 from shyam-biradar/interop-755
shyam-biradar Nov 11, 2022
49dc62a
Moved variables to globals.yaml
shyam-biradar Nov 14, 2022
cbf18d2
Merge pull request #745 from shyam-biradar/interop-755
shyam-biradar Nov 14, 2022
02443bc
TVAULT-5326 dmapi_all also includes bare metal hosts on non LXC deplo…
trilio-shiwanand Nov 15, 2022
8ef5b33
TVAULT-5325 lxc packages not installed when using bare metal install
trilio-shiwanand Nov 24, 2022
3f8113f
Merge branch 'trilioData:master' into TVAULT-5325
trilio-shiwanand Nov 28, 2022
eb29246
TVAULT-5328 Failed ansible-tvault-contego-extension : create trilio.f…
trilio-shiwanand Nov 29, 2022
4d04497
Merge pull request #751 from trilio-shiwanand/TVAULT-5328
abhijeetpatra Nov 30, 2022
f7e209c
Merge pull request #746 from trilio-shiwanand/OSA-TVAULT-5326
abhijeetpatra Nov 30, 2022
385a425
dont install latest module, just present module
trilio-shiwanand Nov 30, 2022
dbdbf45
Added the fix witl os-tvault-install.yml for installation of lxc pack…
trilio-shiwanand Nov 30, 2022
522f96c
Merge pull request #750 from trilio-shiwanand/TVAULT-5325
abhijeetpatra Dec 1, 2022
8a66049
improvement TVAULT-5328 Nova virtual env with venv_tag
trilio-shiwanand Dec 2, 2022
955b4fd
TVAULT-5328 Improvement if more than one nova virtual dir on compute …
trilio-shiwanand Dec 5, 2022
1fca264
improvement added if more than nova virtual hanled
trilio-shiwanand Dec 5, 2022
2e1bca3
minor changes
trilio-shiwanand Dec 5, 2022
612704e
added task to failed if specified nova virt env not found
trilio-shiwanand Dec 6, 2022
014533c
improvement added
trilio-shiwanand Dec 6, 2022
2e7f497
Merge pull request #756 from trilio-shiwanand/TVAULT-5328
shyam-biradar Dec 6, 2022
f6bb9b0
Merge pull request #764 from trilioData/dev-hotfix4/4.2
abhijeetpatra Dec 6, 2022
220fe79
AUTO-258 - Script for TVO Upgrade to Yoga release from 4.2 GA
SuhasTA4 Dec 6, 2022
012f6e5
AUTO-258 - minor corrections in script and python version validation.
SuhasTA4 Dec 6, 2022
1ae8dcc
AUTO-258 - Added examples in readme file
SuhasTA4 Dec 6, 2022
66a220b
AUTO-258 - Modified code to install dependancy packages only if pytho…
SuhasTA4 Dec 7, 2022
9bde5a8
AUTO-258 - introduced changes for checking rpm package on the system …
SuhasTA4 Dec 7, 2022
9db2064
AUTO-258 - minor changes to extract package during installation only
SuhasTA4 Dec 7, 2022
613157e
AUTO-258 - minor changes/comments
SuhasTA4 Dec 7, 2022
2903eda
Merge pull request #765 from SuhasTA4/AUTO-258
rajneeshkapoor Dec 8, 2022
f41c720
AUTO-260 - Changes to include new rpm server details and package deta…
SuhasTA4 Dec 9, 2022
3365c19
Merge pull request #768 from SuhasTA4/AUTO-258
rajneeshkapoor Dec 9, 2022
6e66579
AUTO-260 - Implemented generic changes to include further released pa…
SuhasTA4 Dec 9, 2022
7ff5303
AUTO-260 - minor changes
SuhasTA4 Dec 9, 2022
42ed078
Merge pull request #769 from trilioData/dev-qual2/4.2
shyam-biradar Dec 13, 2022
ee0a73b
AUTO-262: Disable rabbitmq-server and mariadb before installation
SuhasTA4 Dec 13, 2022
6f10d25
INTEROP-805 set the default value of TVAULT_PACKAGE_VERSION
trilio-shiwanand Dec 14, 2022
f843869
Merge pull request #770 from SuhasTA4/AUTO-258
rajneeshkapoor Dec 14, 2022
9743b55
AUTO-262: minor correction in script
SuhasTA4 Dec 14, 2022
8479416
Merge pull request #772 from trilio-shiwanand/hotfix/4.2
abhijeetpatra Dec 14, 2022
71c0a62
Merge pull request #773 from trilioData/dev-qual2/4.2
abhijeetpatra Dec 14, 2022
f932279
AUTO-263 - Changes related to s3 service configuration path change
SuhasTA4 Dec 15, 2022
4401e24
Merge pull request #775 from SuhasTA4/AUTO-258
rajneeshkapoor Dec 15, 2022
3ef1564
dmapi package installation corrected to inside dmapi container only
trilio-shiwanand Dec 15, 2022
6be0826
Merge pull request #777 from trilioData/dev-qual2/4.2
abhijeetpatra Dec 16, 2022
23e79a5
Merge branch 'trilioData:hotfix/4.2' into hotfix/4.2
trilio-shiwanand Dec 16, 2022
ebc8302
lxc container installation
trilio-shiwanand Dec 16, 2022
8abd832
TVAULT-5326 dmapi deploy only on container in both parth is metal or not
trilio-shiwanand Dec 18, 2022
b9884b9
minor change
trilio-shiwanand Dec 18, 2022
38434fc
TVAULT-5325 install lxc pre-requisites packages
trilio-shiwanand Dec 18, 2022
b872646
TVAULT-5325 install lxc pre-requisites packages
trilio-shiwanand Dec 18, 2022
8147124
TVAULT-5325 SOLUTION added
trilio-shiwanand Dec 18, 2022
cf6bf3e
Merge pull request #776 from trilio-shiwanand/hotfix/4.2
shyam-biradar Dec 19, 2022
529ecb5
TVAULT-5325 install pre-requisite lxc packages
trilio-shiwanand Dec 19, 2022
ee35015
Merge pull request #779 from trilio-shiwanand/osa-tvault-5325
shyam-biradar Dec 19, 2022
eae2d8a
AUTO-267 - Change configuration file path in s3 object service file
SuhasTA4 Dec 22, 2022
08cc674
AUTO-267 - Change for downloading packages from correct location
SuhasTA4 Dec 22, 2022
52f3bfc
TVAULT-5546 snapshot and restore failing intermittently because of nf…
trilio-shiwanand Dec 22, 2022
cb64541
Merge pull request #781 from trilio-shiwanand/hotfix/4.2
rajneeshkapoor Dec 22, 2022
d87983d
AUTO-267 - Restart wlm-service on primary node only.
SuhasTA4 Dec 23, 2022
ebb749f
AUTO-267 - Note related to wlm-cron services added in README
SuhasTA4 Dec 23, 2022
825d8eb
AUTO-267 - minor changes
SuhasTA4 Dec 23, 2022
eef3385
AUTO-267 - removed var names and kept only commands
SuhasTA4 Dec 23, 2022
1a4a68c
Merge pull request #780 from SuhasTA4/AUTO-258
rajneeshkapoor Dec 23, 2022
4bdab1a
AUTO-273: code changes to restart all services using systemctl command
SuhasTA4 Dec 29, 2022
81e3762
AUTO-273: minor code changes to include additional services
SuhasTA4 Dec 29, 2022
03a69a9
Merge pull request #783 from SuhasTA4/AUTO-258
rajneeshkapoor Dec 29, 2022
cde6cc5
Merge pull request #784 from trilioData/dev-qual2/4.2
abhijeetpatra Dec 29, 2022
e10e642
Merge pull request #788 from SuhasTA4/AUTO-258
rajneeshkapoor Jan 4, 2023
aa64174
AUTO-274: Add wlm-scheduler service in restart of services functionality
SuhasTA4 Jan 4, 2023
e552b5e
AUTO-277: Take backup and restore user json file in offline upgrade s…
SuhasTA4 Jan 5, 2023
c59476e
Merge pull request #790 from SuhasTA4/AUTO-258
rajneeshkapoor Jan 5, 2023
7514317
Merge pull request #789 from trilioData/dev-qual2/4.2
rajneeshkapoor Jan 5, 2023
d693e67
AUTO-277: minor changes for avoid errors while running python3 comman…
SuhasTA4 Jan 5, 2023
1d13a68
Merge pull request #791 from SuhasTA4/AUTO-258
rajneeshkapoor Jan 6, 2023
160739f
Merge pull request #792 from trilioData/dev-qual2/4.2
rajneeshkapoor Jan 6, 2023
859e4fc
AUTO-278: Functional fixes for handling copy of json file
SuhasTA4 Jan 6, 2023
24797d4
TVAULT-5559: remove / move un-nessesary part from README to revision_…
SuhasTA4 Jan 12, 2023
b054db2
Merge pull request #799 from trilioData/dev-qual2/4.2
rajneeshkapoor Jan 13, 2023
fd7f8f5
TVAULT-5559: remove revision_history.txt file keeping revision inform…
SuhasTA4 Jan 13, 2023
81f4f5b
Merge pull request #798 from SuhasTA4/AUTO-258
rajneeshkapoor Jan 13, 2023
3818696
Added variable for extra volume mounts on datamover container
shyam-biradar Feb 20, 2023
ee2026e
Added variable for extra volume mounts on datamover container
shyam-biradar Feb 20, 2023
fdadf36
fixes
shyam-biradar Feb 20, 2023
523030c
Merge pull request #831 from shyam-biradar/tv-5621
shyam-biradar Feb 20, 2023
cbaf26a
Merge pull request #832 from trilioData/dev-hotfix5/4.2
shyam-biradar Feb 22, 2023
dfdac46
Removed password based rpm repo url
shyam-biradar Mar 17, 2023
ecffbf2
Merge pull request #838 from shyam-biradar/tv5645-hf4.2
shyam-biradar Mar 17, 2023
fc8e7e9
Intial commit for rhosp17.0 devops code
shyam-biradar Mar 24, 2023
eeec3e5
Added endpoint data for rhosp17.0
shyam-biradar Mar 27, 2023
cd16b10
Updated endpoint map files to rhosp17.0
shyam-biradar Mar 27, 2023
2a89587
Adding trilio endpoint entries
shyam-biradar Mar 28, 2023
9232ca2
Updated heat template versions to wallaby
shyam-biradar Mar 28, 2023
50ae9a4
Added executable permissions
shyam-biradar Mar 28, 2023
2063ce6
Merge pull request #841 from trilioData/dev-hotfix6/4.2
rajneeshkapoor Apr 5, 2023
97e50db
Update hf_upgrade.sh
omkarnawghare Apr 14, 2023
20c5f93
Updated script to change system settings
omkarnawghare Apr 14, 2023
2e1c10e
Changes suggested by Abhijeet
omkarnawghare Apr 14, 2023
af1f566
Merge pull request #842 from omkarnawghare/hotfix/4.2
rajneeshkapoor Apr 14, 2023
ef9121e
Update ceph related code
shyam-biradar May 4, 2023
91c8335
Merge pull request #840 from shyam-biradar/tv5665
shyam-biradar May 4, 2023
75aa0e6
Fixing network nameing issue
shyam-biradar May 4, 2023
e0c5741
Fixing network nameing issue
shyam-biradar May 4, 2023
644b933
Updated network name
shyam-biradar May 10, 2023
ce101e1
Merge pull request #849 from shyam-biradar/tv5665
shyam-biradar May 10, 2023
a4a09e9
Updated network name
shyam-biradar May 10, 2023
6713265
Merge pull request #850 from shyam-biradar/tv5665
shyam-biradar May 10, 2023
5ec7728
Updated network name
shyam-biradar May 10, 2023
5057aad
Merge pull request #851 from shyam-biradar/tv5665
shyam-biradar May 10, 2023
bac92f7
Merge pull request #848 from trilioData/dev-hotfix7/4.2
shyam-biradar May 10, 2023
b460fe4
Fixed the package dir name and added the DB upgrade step post upgrade
May 12, 2023
2675ffa
Merge pull request #852 from atulbangar09/dev-hotfix7/4.2
savitha-p May 12, 2023
9f4174f
Merge pull request #853 from trilioData/dev-hotfix7/4.2
rajneeshkapoor May 15, 2023
190f1ed
TVAULT-5716 : Create taskflow dir on TVO appliance post pkg upgrade
rajneeshkapoor May 16, 2023
85cf028
Merge pull request #854 from rajneeshkapoor/TVAULT-5716
rajneeshkapoor May 16, 2023
aa95a22
Merge pull request #855 from trilioData/dev-hotfix7/4.2
rajneeshkapoor May 16, 2023
7c0d027
TVAULT-5718 : Perform DB upgrade only if TVO is already configured
rajneeshkapoor May 18, 2023
3dfd060
TVAULT-5718 : Perform DB upgrade only if TVO is already configured
rajneeshkapoor May 18, 2023
8f94aa6
TVAULT-5718 : Perform DB upgrade only if TVO is already configured
rajneeshkapoor May 18, 2023
bda0a6f
Merge pull request #856 from rajneeshkapoor/TVAULT-5718
rajneeshkapoor May 18, 2023
af9a5d1
Merge pull request #857 from trilioData/dev-hotfix7/4.2
rajneeshkapoor May 18, 2023
e7de952
Used new approach to add firewall rules for datamover port
shyam-biradar May 18, 2023
cfbc9c6
Merge pull request #858 from shyam-biradar/dev-hotfix7/4.2
shyam-biradar May 18, 2023
501e860
TVAULT-5718 : Pass correct conf file in upgrade command
rajneeshkapoor May 19, 2023
f43b659
Merge pull request #859 from rajneeshkapoor/TVAULT-5718
rajneeshkapoor May 19, 2023
cabece4
Merge pull request #860 from trilioData/dev-hotfix7/4.2
rajneeshkapoor May 19, 2023
95dc15b
TVAULT-5720 : Adding few echo statements
rajneeshkapoor May 25, 2023
efaa291
Merge pull request #862 from rajneeshkapoor/TVAULT-5720
rajneeshkapoor May 25, 2023
2b0f3ca
Merge pull request #863 from trilioData/dev-hotfix7/4.2
rajneeshkapoor May 26, 2023
42a9471
Added ipc parameter to datamover container
shyam-biradar Jul 7, 2023
4188da3
Added ipc parameter to datamover container
shyam-biradar Jul 7, 2023
c4e1c6a
Updated nfs options for nfs backup target
shyam-biradar Jul 10, 2023
5d4931a
Added TrilioVaultWLM service to devops scripts of rhosp16.2
shyam-biradar Jul 20, 2023
fb8a874
Merge pull request #877 from shyam-biradar/tv5783-4.2
shyam-biradar Jul 20, 2023
f86b3ef
Merge pull request #871 from shyam-biradar/tv5770
abhijeetpatra Jul 28, 2023
36469c6
Merge pull request #870 from shyam-biradar/tv5694
abhijeetpatra Jul 28, 2023
7287641
Added kolla_install_type parameter in defaults
shyam-biradar Aug 4, 2023
11da4cd
Added kolla_container_engine variable
shyam-biradar Aug 9, 2023
6c4952a
Merge pull request #882 from shyam-biradar/tv5819
shyam-biradar Aug 11, 2023
c7d4284
Added globals file for zed release
shyam-biradar Aug 16, 2023
d0b700d
Merge pull request #883 from shyam-biradar/tv5819
shyam-biradar Aug 16, 2023
c0e8c8a
Added code to skip admin endpoint creation for dmapi service if opens…
shyam-biradar Aug 18, 2023
4bb70a0
Merge pull request #884 from shyam-biradar/tv5819
shyam-biradar Aug 18, 2023
82fa21e
Merge pull request #885 from trilioData/dev-hotfix8/4.2
shyam-biradar Aug 29, 2023
098ab33
Added fix for kolla_container_engine variable
shyam-biradar Aug 31, 2023
ca7040d
Added fix for kolla_container_engine variable
shyam-biradar Aug 31, 2023
f97867e
Merge pull request #886 from shyam-biradar/tv5862
shyam-biradar Aug 31, 2023
fba81d8
Merge pull request #887 from trilioData/dev-hotfix8/4.2
shyam-biradar Aug 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions TVOAppliance/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
============================================================================
Steps to upgrade TVO packages to Yoga release from 4.2 GA / 4.2 HF
============================================================================

1. Download the hf_upgrade.sh script to your TVO appliance.
2. Make sure that it is having executable permissions. If not then apply executable permissions.
chmod +x ./hf_upgrade.sh
3. hf_upgrade.sh having command line options as,
--downloadonly | -d (It will only download the package and extract it in current folder)
--installonly | -i (It will install the package available in current directory. If machine is not on network then copy required package "offline_pkgs.tar.gz" in the current directory)
--all | -a (It will download and install the package on the current TVO appliance.)

Example:
1. Customer wants to download the package only to copy it to some other machine.
./hf_upgrade.sh --downloadonly
./hf_upgrade.sh -d

2. Customer wants to install the package which is copied / downloaded on the TVO appliance.
./hf_upgrade.sh --installonly
./hf_upgrade.sh -i

3. Customer is having network (internet connection) and wants to download + Install the upgrade package.
./hf_upgrade.sh --all
./hf_upgrade.sh -a


Note:
While running hf_upgrade.sh script in offline mode. We need to change the BRANCH_NAME inside hf_upgrade.sh script to download the package from correct location.

For end customer usage set BRANCH_NAME="triliodata-4-2" inside hf_upgade.sh script.
For internal testing in trilio lab, set BRANCH_NAME as fury repo instead of 'triliodata-4-2' inside hf_upgrade.sh script.


237 changes: 237 additions & 0 deletions TVOAppliance/hf_upgrade.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
#!/bin/bash

BASE_DIR="$(pwd)"
PYTHON_VERSION="Python 3.8.12"
OFFLINE_PKG_NAME="4.2-offlinePkgs.tar.gz"
PKG_DIR_NAME="4.2.*offlinePkgs"
BRANCH_NAME="triliodata-4-2"
UUID_NUM=`uuidgen`

#function to display usage...
function usage()
{
echo "Usage: ./hf_upgrade.sh [ -h | --help ]
[ -d | --downloadonly ]
[ -i | --installonly ]
[ -a | --all ]"
exit 2
}


#function to download the package and extract...
function download_package()
{
echo "Downloading $outfile for 4.2 maintenance release"

#run the wget command to download the package from rpm server.
wget_command_rpm_server=`wget --backups 0 http://repos.trilio.io:8283/$BRANCH_NAME/offlinePkgs/$OFFLINE_PKG_NAME`

}

function check_package_status()
{
all_pkgs=`ls -1`

# iterate through all packages to check installation status.
for pkg_name in $all_pkgs
do
if [[ $pkg_name = *"rpm"* ]]; then
#remove last 4 chars of (.rpm)
total_len="${#pkg_name}"
rpm_pkg_info="${pkg_name:0:$total_len-4}"

#check result for this package
rpm_result=`rpm -qa | grep $rpm_pkg_info`
result=$?
if [[ $result == 1 ]]; then
echo "Package $rpm_pkg_info not found on the system."
# perform yum command to install package.
install_cmd=`yum -y install $rpm_pkg_info.rpm`
else
echo "Package $rpm_pkg_info.rpm present on the system."
fi
fi
done
}
#function to change system settings
function change_system_settings()
{
#set sshd option UseDNS to "no"
sed -i '/UseDNS/c UseDNS no' /etc/ssh/sshd_config
#Create task flow dir and change permissions. Implemented from TVO-4.2.7 release
mkdir -p /var/lib/workloadmgr/taskflow
chown -R nova:nova /var/lib/workloadmgr/
}

#function to restart the services.
function restart_services()
{
#get the service name passed.
service_name=$1

#check if the service is in active state or not.
systemctl is-active $service_name

#check the result code. 0 - Success AND 3 - Inactive
if [ $? -eq 0 ]
then
echo "Service {$service_name} is in active state. Restarting {$service_name} service"
#restart the service as it is in active state.
systemctl restart $service_name
else
#print failure message and continue ahead.
echo "Service {$service_name} is in Inactive state. Cannot restart the service"
fi
}


#function to reconfigure s3 service path...
function reconfigure_s3_service_path()
{
file_name="/etc/systemd/system/tvault-object-store.service"
src_string="ExecStart=/home/stack/myansible/bin/python3 /home/stack/myansible/lib/python3.6/site-packages/s3fuse/s3vaultfuse.py --config-file=/etc/workloadmgr/workloadmgr.conf"
dest_string="ExecStart=/home/stack/myansible/bin/python3 /home/stack/myansible/bin/s3vaultfuse.py --config-file=/etc/workloadmgr/workloadmgr.conf"

sed -i "s~$src_string~$dest_string~g" $file_name

}
#function to install the package on the system...
function install_upgrade_package()
{
#it is expected that package is available in current directory.
outfile="$BASE_DIR/$OFFLINE_PKG_NAME"
if [[ -f $outfile ]]
then
echo "$outfile present. we can continue with the installation."

echo "Extracting $outfile now"
#now the package is downloaded. Extract the package.
#1. create directory with unique number and extract package inside it.
mkdir $UUID_NUM

extract_packages=`tar -xzf $outfile -C $UUID_NUM/`
else
echo "$outfile is not present. Cannot proceed with the installation. Exiting."
exit 2
fi

echo "Installing $outfile for 4.2 maintenance release"

#get the current date and time.
date=`date '+%Y-%m-%d-%H-%M-%S'`

#before performing further installation take backup.
tar -czvf /home/stack/tvault_backup_$date.tar.gz /etc/tvault /etc/tvault-config /etc/workloadmgr

echo "Before installation disabling old and deleted MariaDB and Rabbitmq-server yum repositories"
yum-config-manager --disable bintray-rabbitmq-server
yum-config-manager --disable mariadb

#make sure to be in base directory for installation.
cd $BASE_DIR/$UUID_NUM/$PKG_DIR_NAME*/

#extract Python-3.8.12.tgz - first check if python 3.8.12 version is availble or not.
python_version=`python3 --version`
if [ "$python_version" == "$PYTHON_VERSION" ]; then
echo "Python 3.8.12 package is already installed. We can skip Python package installation."

else
echo "Python 3.8.12 package is missing. We need to install Python package."

#extract offline_dist_pkgs.tar.gz file to install dependancy packages first.
extract_offline_dist_pkg=`tar -xzf offline_dist_pkgs.tar.gz`
cd offline_dist_pkgs*/
#check if the packages are already installed or not. call function check_package_status()
check_package_status

#move to base dir again
cd $BASE_DIR/$UUID_NUM/$PKG_DIR_NAME*/

#Install python 3.8.12 package on the TVO appliance.
extract_python_pkg=`tar -xf Python-3.8.12.tgz`
cd Python-3.8.12*/
config_cmd=`./configure --enable-optimizations`
make_cmd=`sudo make altinstall`

fi

#move to base dir/UUID_NUM/PKG_DIR_NAME again for further installation.
cd $BASE_DIR/$UUID_NUM/$PKG_DIR_NAME*/

#move myansible env to myansible_old_$date folder.
mv /home/stack/myansible /home/stack/myansible_old_$date
mkdir -p /home/stack/myansible

#extract the package at the / directory.
extract_myansible_pkg=`tar -xzf myansible_py38.tar.gz -C /`

#set the default python3
update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.8 0

#get the OLD and NEW user json.
USER_JSON_OLD=`/home/stack/myansible_old_$date/bin/python3 -c 'import tvault_configurator; print(tvault_configurator.__path__[0])'`/conf/users.json

USER_JSON_NEW=`/home/stack/myansible/bin/python3 -c 'import tvault_configurator; print(tvault_configurator.__path__[0])'`/conf/users.json

#replace / copy the user.json file from USER_JSON_OLD to USER_JSON_NEW path.
yes | cp $USER_JSON_OLD $USER_JSON_NEW --backup=numbered

#function to change system settings (set sshd option UseDNS to "no")
change_system_settings

#call function - before restarting service replace the service path in tvault-object-store.service file
reconfigure_s3_service_path

#before restarting the s3 service reload the modified service file.
systemctl daemon-reload

#restart all active services
SERVICE_NAMES=('tvault-config' 'wlm-api' 'wlm-workloads' 'wlm-cron' 'tvault-object-store' 'wlm-scheduler')
for service in "${SERVICE_NAMES[@]}"
do
restart_services $service
done

if [ $(awk -F "=" '/config_status/ {print $2}' ${TVAULT_CONF} | xargs ) == "configured" ];then
echo "Performing DB upgrade steps"
#DB upgrade to be performed post upgrade of all packages is successful and services restarted only if TVO is already configured
sed -i "/script_location = /c \script_location = /home/stack/myansible/lib/python3.8/site-packages/workloadmgr/db/sqlalchemy/migrate_repo" $WORKLOADMGR_CONF
sed -i "/version_locations = /c \version_locations = /home/stack/myansible/lib/python3.8/site-packages/workloadmgr/db/sqlalchemy/migrate_repo/versions" $WORKLOADMGR_CONF
source /home/stack/myansible/bin/activate && alembic -c ${WORKLOADMGR_CONF} upgrade head
fi
echo "TVO appliance upgrade is complete. If TVO configuration is not done, please proceed with the same."
}

######## Start of the script. ########

WORKLOADMGR_CONF=/etc/workloadmgr/workloadmgr.conf
TVAULT_CONF=/etc/tvault-config/tvault-config.conf
CMDLINE_ARGUMENTS=$(getopt -o hdia --long help,downloadonly,installonly,all -- "$@")

CMD_OUTPUT=$?
if [ "$CMD_OUTPUT" != "0" ]; then
usage
fi

eval set -- "$CMDLINE_ARGUMENTS"

echo "TVO Upgrade from current release to latest 4.2 maintenance release"


#command line arguments.
if [ $# -le 1 ]; then
echo "Invalid number of arguments"
usage
fi


if [ $# -gt 0 ]; then
case "$1" in
-h|--help) usage; exit;;
-d|--downloadonly) download_package ;;
-i|--installonly) install_upgrade_package ;;
-a|--all) download_package; install_upgrade_package ;;
esac
shift
fi

11 changes: 9 additions & 2 deletions ansible/environments/group_vars/all/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ IP_ADDRESS: sample_tvault_ip_address
##Time Zone
TIME_ZONE: "Etc/UTC"

#Update TVAULT package version here, we will install mentioned version plugins for Example# TVAULT_PACKAGE_VERSION: 3.3.36
TVAULT_PACKAGE_VERSION: 4.1.4
## Don't update or modify the value of TVAULT_PACKAGE_VERSION
## The default value of is '4.2.64'
TVAULT_PACKAGE_VERSION: 4.2.64

# Update Openstack dist code name like ussuri etc.
OPENSTACK_DIST: ussuri
Expand Down Expand Up @@ -73,6 +74,12 @@ ceph_backend_enabled: False
## e.g. '/openstack/venvs/horizon-23.1.0'
horizon_virtual_env: '/openstack/venvs/horizon*'

## When More Than One Nova Virtual Env. On Compute Node(s) and
## User Wants To Specify Specific Nova Virtual Env. From Existing
## Then Only Uncomment the var nova_virtual_env and pass value like 'openstack/venvs/nova-23.2.0'

#nova_virtual_env: 'openstack/venvs/nova-23.2.0'

#Set verbosity level and run playbooks with -vvv option to display custom debug messages
verbosity_level: 3

Expand Down
23 changes: 22 additions & 1 deletion ansible/main-install.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
---

- name: Installation dmapi on bare metal
hosts: tvault-dmapi_containers
gather_facts: "{{ osa_gather_facts | default(True) }}"
user: root
environment: "{{ deployment_environment_variables | default({}) }}"
vars_files:
- "defaults/repo_packages/openstack_services.yml"
- "defaults/{{ install_method }}_install.yml"
pre_tasks:
- include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when: is_metal

- include_tasks: common-tasks/unbound-clients.yml
when:
- hostvars['localhost']['resolvconf_enabled'] | bool
roles:
- role: ansible-datamover-api
when: is_metal

- name: Installation and setup of dmapi conatiner
hosts: dmapi_all
hosts: dmapi_all
gather_facts: "{{ osa_gather_facts | default(True) }}"
user: root
environment: "{{ deployment_environment_variables | default({}) }}"
Expand All @@ -16,6 +36,7 @@
- hostvars['localhost']['resolvconf_enabled'] | bool
roles:
- role: ansible-datamover-api
when: not is_metal

- hosts: tvault_compute_hosts
roles:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
when: NFS_OPTS != ""

- set_fact:
NFS_OPTIONS: "nolock,soft,timeo=180,intr,lookupcache=none"
NFS_OPTIONS: "nolock,soft,timeo=180,intr,lookupcache=none,nfsvers=3"
when: NFS_OPTS == ""

- debug: msg="value of NFS_OPTIONS is:{{NFS_OPTIONS}}" verbosity={{ verbosity_level }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
- name: Get nova venv path
shell: echo /openstack/venvs/nova*
register: venv_path

- set_fact: virtual_env_path={{venv_path.stdout}}
- set_fact:
virtual_env_path: "/openstack/venvs/nova-{{ venv_tag }}"
when: >
( nova_virtual_env is undefined )

- set_fact:
virtual_env_path: "{{ nova_virtual_env }}"
when: >
( nova_virtual_env is defined )

- name: Check stat virtual env path
stat:
path: "{{ virtual_env_path }}"
register: chk_nova_pth

- name: Failed when nova virt env not found
fail:
msg: "Anisble Failed Cause Path {{ virtual_env_path }} Not Found"
when: >
( chk_nova_pth.stat.exists == false )

- set_fact:
virtual_env: ". {{virtual_env_path}}/bin/activate"
Expand All @@ -11,4 +27,4 @@

- debug:
msg: "NOVA_COMPUTE_FILTERS_FILE: {{NOVA_COMPUTE_FILTERS_FILE}}"
verbosity: "{{ verbosity_level }}"
verbosity: "{{ verbosity_level }}"
Loading