Skip to content

Commit

Permalink
Add the u20->u22 openstack workflow
Browse files Browse the repository at this point in the history
Case RE-1027: Add the u20->u22 openstack workflow

Changelog:
  • Loading branch information
davelcpanelnet committed Dec 9, 2024
1 parent d2c0421 commit 6945add
Show file tree
Hide file tree
Showing 10 changed files with 885 additions and 50 deletions.
59 changes: 35 additions & 24 deletions .github/workflows/openstack-centos-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Upload Terraform State File as Artifact
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-terraform.tfstate
name: ${{ github.run_id }}-centos7-terraform.tfstate
path: "${{ github.workspace }}/.github/workflows/openstack/centos-7"

- name: Terraform Output File Create
Expand All @@ -83,7 +83,7 @@ jobs:
- name: Upload VM Output
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/${{ github.run_id }}-vm_ip
overwrite: true

Expand All @@ -96,7 +96,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -175,6 +175,23 @@ jobs:
chmod -v +x /opt/${REPODIR}/t/integration/setup
/opt/${REPODIR}/t/integration/setup
- name: Update License And Setup Server For ELevate
uses: appleboy/[email protected]
with:
host: ${{ steps.VM_IP.outputs.VM_IP }}
username: 'root'
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: '22'
timeout: 30m
command_timeout: 30m
script: |
REPODIR=$(echo ${{ github.repository }} | cut -d / -f2)
cp -pv /opt/${REPODIR}/elevate-cpanel /scripts/elevate-cpanel
cp -pv /opt/${REPODIR}/.github/workflows/openstack/status_marker /scripts/status_marker
cp -pv /opt/${REPODIR}/.github/workflows/openstack/reboot_watch /scripts/reboot_watch
chmod -v +x /scripts/elevate-cpanel
until /usr/local/cpanel/cpkeyclt; do echo "Retrying /usr/local/cpanel/cpkeyct until it passes..."; sleep 5; done
start_elevate:
runs-on: self-hosted
needs: setup_integration_checks
Expand All @@ -184,7 +201,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -208,12 +225,6 @@ jobs:
timeout: 30m
command_timeout: 30m
script: |
REPODIR=$(echo ${{ github.repository }} | cut -d / -f2)
cp -pv /opt/${REPODIR}/elevate-cpanel /scripts/elevate-cpanel
cp -pv /opt/${REPODIR}/.github/workflows/openstack/status_marker /scripts/status_marker
cp -pv /opt/${REPODIR}/.github/workflows/openstack/reboot_watch /scripts/reboot_watch
chmod -v +x /scripts/elevate-cpanel
until /usr/local/cpanel/cpkeyclt; do echo "Retrying /usr/local/cpanel/cpkeyct until it passes..."; sleep 5; done
/scripts/elevate-cpanel --non-interactive --skip-cpanel-version-check --start &
exit 0
Expand All @@ -226,7 +237,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -253,7 +264,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -291,7 +302,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -318,7 +329,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -356,7 +367,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -383,7 +394,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -420,7 +431,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -447,7 +458,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -484,7 +495,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -511,7 +522,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -548,7 +559,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -575,7 +586,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-centos7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -612,7 +623,7 @@ jobs:
- name: Download Terraform State
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-terraform.tfstate
name: ${{ github.run_id }}-centos7-terraform.tfstate
path: "${{ github.workspace }}/.github/workflows/openstack/centos-7/terraform"


Expand Down
51 changes: 26 additions & 25 deletions .github/workflows/openstack-cloudlinux-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Upload Terraform State File as Artifact
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-terraform.tfstate
name: ${{ github.run_id }}-cloudlinux7-terraform.tfstate
path: "${{ github.workspace }}/.github/workflows/openstack/cloudlinux-7"

- name: Terraform Output File Create
Expand All @@ -83,7 +83,7 @@ jobs:
- name: Upload VM Output
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/${{ github.run_id }}-vm_ip
overwrite: true

Expand All @@ -96,7 +96,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -221,6 +221,14 @@ jobs:
/usr/bin/yum clean all
/usr/bin/yum makecache
/usr/bin/yum -y update
REPODIR=$(echo ${{ github.repository }} | cut -d / -f2)
cp -pv /opt/${REPODIR}/elevate-cpanel /scripts/elevate-cpanel
cp -pv /opt/${REPODIR}/.github/workflows/openstack/status_marker /scripts/status_marker
cp -pv /opt/${REPODIR}/.github/workflows/openstack/reboot_watch /scripts/reboot_watch
/usr/local/cpanel/scripts/post_snapshot --yes
while pgrep -x post_snapshot > /dev/null; do echo "Sleeping until post_snapshot is no longer running as it may be locking apt."; sleep 1; done
/scripts/restartsrv_mysql
chmod -v +x /scripts/elevate-cpanel
- name: Starting Elevate
uses: appleboy/[email protected]
Expand All @@ -232,13 +240,6 @@ jobs:
timeout: 30m
command_timeout: 30m
script: |
REPODIR=$(echo ${{ github.repository }} | cut -d / -f2)
cp -pv /opt/${REPODIR}/elevate-cpanel /scripts/elevate-cpanel
chmod -v +x /scripts/elevate-cpanel
cp -pv /opt/${REPODIR}/.github/workflows/openstack/status_marker /scripts/status_marker
cp -pv /opt/${REPODIR}/.github/workflows/openstack/reboot_watch /scripts/reboot_watch
chmod -v +x /scripts/elevate-cpanel
until /usr/local/cpanel/cpkeyclt; do echo "Retrying /usr/local/cpanel/cpkeyct until it passes..."; sleep 5; done
/scripts/elevate-cpanel --non-interactive --skip-cpanel-version-check --start &
exit 0
Expand All @@ -251,7 +252,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -278,7 +279,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -316,7 +317,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -343,7 +344,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -381,7 +382,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -408,7 +409,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -445,7 +446,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -472,7 +473,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -509,7 +510,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -536,7 +537,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -573,7 +574,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand All @@ -600,7 +601,7 @@ jobs:
- name: Download VM IP
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-vm_ip
name: ${{ github.run_id }}-cloudlinux7-vm_ip
path: ${{ github.workspace }}/

- name: Get VM IP from Artifact
Expand Down Expand Up @@ -637,7 +638,7 @@ jobs:
- name: Download Terraform State
uses: actions/[email protected]
with:
name: ${{ github.run_id }}-terraform.tfstate
name: ${{ github.run_id }}-cloudlinux7-terraform.tfstate
path: "${{ github.workspace }}/.github/workflows/openstack/cloudlinux-7/terraform"

- name: Stage Files & Show Artifact Paths
Expand Down
Loading

0 comments on commit 6945add

Please sign in to comment.