diff --git a/.github/workflows/stackhpc.yml b/.github/workflows/stackhpc.yml index 401530fb4..1813eac13 100644 --- a/.github/workflows/stackhpc.yml +++ b/.github/workflows/stackhpc.yml @@ -16,7 +16,7 @@ jobs: openstack: name: openstack-ci concurrency: ${{ github.ref }}-{{ matrix.os_version }} # to branch/PR + OS - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: os_version: [RL8, RL9] diff --git a/README.md b/README.md index f1d6f461a..e40b5add2 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,12 @@ It is recommended to check the following before starting: ## Installation on deployment host +Current Operating Systems supported to be deploy hosts: + +- Rocky Linux 9 +- Rocky Linux 8 +- Ubuntu 22.04 + These instructions assume the deployment host is running Rocky Linux 8: sudo yum install -y git python38 diff --git a/dev/setup-env.sh b/dev/setup-env.sh index e47b3d8a9..dd90aef0e 100755 --- a/dev/setup-env.sh +++ b/dev/setup-env.sh @@ -2,9 +2,33 @@ set -euo pipefail +if [[ -f /etc/os-release ]]; then + . /etc/os-release + OS=$ID + VERSION_ID=$VERSION_ID +else + exit 1 +fi + +MAJOR_VERSION=$(echo $VERSION_ID | cut -d. -f1) + +PYTHON_VERSION="" + +if [[ "$OS" == "ubuntu" && "$MAJOR_VERSION" == "22" ]]; then + PYTHON_VERSION="/usr/bin/python3.10" +elif [[ "$OS" == "rocky" && "$MAJOR_VERSION" == "8" ]]; then + PYTHON_VERSION="/usr/bin/python3.8" # use `sudo yum install python38` on Rocky Linux 8 to install this +elif [[ "$OS" == "rocky" && "$MAJOR_VERSION" == "9" ]]; then + PYTHON_VERSION="/usr/bin/python3.9" +else + echo "Unsupported OS version: $OS $MAJOR_VERSION" + exit 1 +fi + if [[ ! -d "venv" ]]; then - /usr/bin/python3.8 -m venv venv # use `sudo yum install python38` on Rocky Linux 8 to install this + $PYTHON_VERSION -m venv venv fi + . venv/bin/activate pip install -U pip pip install -r requirements.txt