Skip to content

Commit

Permalink
Resolve CycleCloud CLI installation on CentOS 79 (#1741)
Browse files Browse the repository at this point in the history
* install Python 3.9.18 and OpenSSL 1.1.1

* build and use openssl 1.1.1w

* add a link to certs
  • Loading branch information
xpillons authored Oct 16, 2023
1 parent 7a2a882 commit 9dc0280
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 2 deletions.
52 changes: 51 additions & 1 deletion playbooks/roles/cyclecloud/tasks/CentOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,62 @@
args:
creates: /etc/yum.repos.d/cyclecloud.repo

- name: Install epel-release
yum:
name: epel-release
state: present
lock_timeout : 180

- name: Install pre-reqs packages
yum:
name: azure-cli, dnsmasq, unzip
name: azure-cli, dnsmasq, unzip, gcc, bzip2-devel, libffi-devel, zlib-devel
state: present
lock_timeout : 180

- name: Download OpenSSL
unarchive:
src: "https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz"
dest: /tmp/
remote_src: yes
args:
creates: /usr/local/openssl

- name: Build OpenSSL
shell: |
set -e
cd /tmp/openssl-1.1.1w
./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
make
make install
echo "/usr/local/openssl/lib" > /etc/ld.so.conf.d/openssl.conf
ln -s /etc/ssl/certs/ca-bundle.trust.crt /usr/local/openssl/cert.pem
ldconfig
args:
creates: /usr/local/openssl

- name: download Python 3.9
unarchive:
src: "https://www.python.org/ftp/python/3.9.18/Python-3.9.18.tgz"
dest: /tmp/
remote_src: yes
args:
creates: /usr/local/bin/python3.9

- name: Build Python 3.9
shell: |
set -e
cd /tmp/Python-3.9.18
./configure --enable-optimizations --with-openssl=/usr/local/openssl
make altinstall
args:
creates: /usr/local/bin/python3.9

- name: Upgrade PIP
shell: |
set -e
alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.9 1
python3 -m pip install --upgrade pip
- name: Install CycleCloud
yum:
name: "cyclecloud8-{{cyclecloud_version}}"
Expand Down
10 changes: 9 additions & 1 deletion playbooks/roles/cyclecloud/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
- name: Perform OS dependent configuration tasks
include_tasks: "{{ansible_distribution}}.yml"

- name: Update Packages
include_role:
name: pkg_update
apply:
become: true
vars:
packages_to_exclude_from_upgrade: "cyclecloud*"

- name: Create a data record for azhop and start cycleserver
shell: |
set -e
Expand All @@ -48,7 +56,7 @@
CS_ROOT=/opt/cycle_server
unzip $CS_ROOT/tools/cyclecloud-cli.zip
cd cyclecloud-cli-installer
./install.sh --system -y
./install.sh --system -y -v
cd $mydir
# Update properties
sed -i 's/webServerMaxHeapSize\=2048M/webServerMaxHeapSize\=4096M/' $CS_ROOT/config/cycle_server.properties
Expand Down

0 comments on commit 9dc0280

Please sign in to comment.