forked from progmaticlab/ffu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path02_undercloud_upgrade_rhel_step1.sh
executable file
·56 lines (41 loc) · 1.87 KB
/
02_undercloud_upgrade_rhel_step1.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash -eux
my_file="$(readlink -e "$0")"
my_dir="$(dirname "$my_file")"
exec 3>&1 1> >(tee ${0}.log) 2>&1
echo $(date) "------------------ STARTED: $0 -------------------"
cd ~
source stackrc
source rhosp-environment.sh
/sbin/ip addr list
sudo systemctl stop openstack-* httpd haproxy mariadb rabbitmq* docker xinetd || true
sudo yum -y remove *el7ost* galera* haproxy* \
httpd mysql* pacemaker* xinetd python-jsonpointer \
qemu-kvm-common-rhev qemu-img-rhev rabbit* \
redis* \
-- \
-*openvswitch* -python-docker -python-PyMySQL \
-python-pysocks -python2-asn1crypto -python2-babel \
-python2-cffi -python2-cryptography -python2-dateutil \
-python2-idna -python2-ipaddress -python2-jinja2 \
-python2-jsonpatch -python2-markupsafe -python2-pyOpenSSL \
-python2-requests -python2-six -python2-urllib3 \
-python-httplib2 -python-passlib -python2-netaddr -ceph-ansible
sudo rm -rf /etc/httpd /var/lib/docker
sudo yum install -y leapp
sudo tar -xzf $my_dir/redhat_files/leapp-data8.tar.gz -C /etc/leapp/files
sudo subscription-manager refresh
echo 'openvswitch2.11' | sudo tee -a /etc/leapp/transaction/to_remove
echo 'openvswitch2.13' | sudo tee -a /etc/leapp/transaction/to_install
echo 'ceph-ansible' | sudo tee -a /etc/leapp/transaction/to_keep
sudo leapp answer --add --section remove_pam_pkcs11_module_check.confirm=True
sudo leapp upgrade --debug \
--enablerepo rhel-8-for-x86_64-baseos-rpms \
--enablerepo rhel-8-for-x86_64-appstream-rpms \
--enablerepo rhel-8-for-x86_64-highavailability-rpms \
--enablerepo fast-datapath-for-rhel-8-x86_64-rpms \
--enablerepo ansible-2-for-rhel-8-x86_64-rpms \
--enablerepo openstack-16.1-for-rhel-8-x86_64-rpms \
--enablerepo satellite-tools-6.5-for-rhel-8-x86_64-rpms
sudo touch /.autorelabel
echo "Perform reboot: sudo reboot"
echo $(date) "------------------ FINISHED: $0 ------------------"