diff --git a/CHANGELOG.md b/CHANGELOG.md index c99fc58..e16e63e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,44 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.1.8] - 2024-07-17 + +### Notes +* This upgrade does require an update to the global settings. Please review [Global Settings Upgrade](https://docs.idea-hpc.com/first-time-users/cluster-operations/update-idea-cluster/update-idea-backend-resource#global-settings-backup-and-upgrade) before upgrading. +* Removed `RHEL 7` and `CentOS 7` due to EOL on 6/30/2024 + * Remove software stacks and existing eVDI deployments that are running `CentOS 7` or `RHEL 7` BEFORE upgrading to IDEA 3.1.8 + +### Features +* Support for Ubuntu 22.04.04 in eVDI + * Full support for Kernels up to `6.2.0-1018-aws` +* Added GPU Driver support for `g6` instance types + +### Changes +* Update AWS CDK from `2.137.0` to `2.147.3` +* Update NVIDIA GPU drivers used during installation + * Production `550.54.15` to `550.90.07` +* Update Python Requirements + * Pin `requests` to `2.31` for ideactl +* Move from `apt-get` to `apt` in Dockerfile + +### Bug Fixes +* Fix `global-settings` indent error for Ubuntu DCV keys +* NICE DCV GL Package removed from Bootstrap +* Fix job submissions failing when requesting existing FSx Lustre file systems +* Fix job designer variable checks for required variables used in Jinja2 conditional statements +* Fix Windows eVDI instances getting stuck in an initializing state when resuming + +### Known Caveats +* Internal DNS zone uses `.local` which should be reserved for mDNS per RFC6762 +* DCV USB Forwarding not available on + * `RHEL 9` + * `Rocky 9` + * `Ubuntu 22.04` with kernel newer than `6.2` +* No Lustre client for Ubuntu with kernel newer than `6.2` +* When accessing multiple IDEA deployments at once in Safari, SSO logins hang for environemnts that were loaded after the first. Also exists in prior releases. +* When using SSO and Chrome, inactive tabs time out more quickly than desired. Also exists in prior releases. +* Docs need some updates to reflect addition of Ubuntu and removal of RHEL 7 and CentOS 7 + ## [3.1.7] - 2024-06-01 ### Notes diff --git a/IDEA_VERSION.txt b/IDEA_VERSION.txt index d40b13a..dd9db9f 100644 --- a/IDEA_VERSION.txt +++ b/IDEA_VERSION.txt @@ -1 +1 @@ -3.1.7 \ No newline at end of file +3.1.8 \ No newline at end of file diff --git a/deployment/ecr/idea-administrator/Dockerfile b/deployment/ecr/idea-administrator/Dockerfile index 92f902c..72a3243 100644 --- a/deployment/ecr/idea-administrator/Dockerfile +++ b/deployment/ecr/idea-administrator/Dockerfile @@ -6,15 +6,15 @@ ENV OS_ARCH="${TARGETARCH:-amd64}" WORKDIR /root -RUN apt-get update && \ - apt-get -y install \ +RUN apt update && \ + apt -y install \ curl \ tar \ unzip \ locales \ gcc \ python3-dev \ - && apt-get clean + && apt clean ENV DEBIAN_FRONTEND=noninteractive @@ -39,25 +39,25 @@ RUN if [ "${OS_ARCH}" = "amd64" ]; then \ # install node and npm # RUN NODE_MAJOR=16 && rm -f /etc/apt/trusted.gpg.d/nodesource.gpg /etc/apt/sources.list.d/nodesource.list \ -# && apt-get install -y ca-certificates curl gnupg \ +# && apt install -y ca-certificates curl gnupg \ # && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/nodesource.gpg \ # && echo "deb [signed-by=/etc/apt/trusted.gpg.d/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \ # && echo "Package: nodejs" >> /etc/apt/preferences.d/preferences \ # && echo "Pin: origin deb.nodesource.com" >> /etc/apt/preferences.d/preferences \ # && echo "Pin-Priority: 1001" >> /etc/apt/preferences.d/preferences\ -# && apt update && apt-get install -y nodejs +# && apt update && apt install -y nodejs # install nvm and node RUN set -uex && \ - apt-get update && \ - apt-get install -y ca-certificates curl gnupg && \ + apt update && \ + apt install -y ca-certificates curl gnupg && \ mkdir -p /etc/apt/keyrings && \ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \ | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ NODE_MAJOR=18 && \ echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" \ > /etc/apt/sources.list.d/nodesource.list && \ - apt-get update && \ - apt-get install nodejs -y + apt update && \ + apt install nodejs -y diff --git a/idea-admin-windows.ps1 b/idea-admin-windows.ps1 index 7692fa1..3f7a641 100755 --- a/idea-admin-windows.ps1 +++ b/idea-admin-windows.ps1 @@ -38,7 +38,7 @@ function Verify-Command($type,$message,$command) { $IDEADevMode = if ($Env:IDEA_DEV_MODE) {$Env:IDEA_DEV_MODE} else {""} $VirtualEnv = if ($Env:VIRTUAL_ENV) {$Env:VIRTUAL_ENV} else {""} $ScriptDir = $PSScriptRoot -$IDEARevision = if ($Env:IDEA_REVISION) {$Env:IDEA_REVISION} else {"v3.1.7"} +$IDEARevision = if ($Env:IDEA_REVISION) {$Env:IDEA_REVISION} else {"v3.1.8"} $IDEADockerRepo = "public.ecr.aws/s5o2b4m0" $DocumentationError = "https://docs.idea-hpc.com" $AWSProfile = if ($Env:AWS_PROFILE) {$Env:AWS_PROFILE} else {"default"} diff --git a/idea-admin.sh b/idea-admin.sh index 8f47a6d..ccf5d12 100755 --- a/idea-admin.sh +++ b/idea-admin.sh @@ -28,7 +28,7 @@ # * IDEA_DEV_MODE - Set to "true" if you are working with IDEA sources SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -IDEA_REVISION=${IDEA_REVISION:-"v3.1.7"} +IDEA_REVISION=${IDEA_REVISION:-"v3.1.8"} IDEA_DOCKER_REPO=${IDEA_DOCKER_REPO:-"public.ecr.aws/s5o2b4m0/idea-administrator"} IDEA_ECR_CREDS_RESET=${IDEA_ECR_CREDS_RESET:-"true"} IDEA_ADMIN_AWS_CREDENTIAL_PROVIDER=${IDEA_ADMIN_AWS_CREDENTIAL_PROVIDER:=""} diff --git a/requirements/dev.txt b/requirements/dev.txt index 24ab90c..36f1d42 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,23 +1,23 @@ -aiofiles==23.2.1 -alembic==1.13.1 -annotated-types==0.6.0 +aiofiles==24.1.0 +alembic==1.13.2 +annotated-types==0.7.0 arrow==1.3.0 -astroid==3.1.0 +astroid==3.2.2 attrs==23.2.0 aws-cdk-asset-awscli-v1==2.2.202 aws-cdk-asset-kubectl-v20==2.1.2 aws-cdk-asset-node-proxy-agent-v6==2.0.3 -aws-cdk-lib==2.137.0 -babel==2.14.0 +aws-cdk-lib==2.147.3 +babel==2.15.0 banal==1.0.6 -blinker==1.7.0 +blinker==1.8.2 boto3==1.34.84 -botocore==1.34.84 +botocore==1.34.139 build==1.2.1 cacheout==0.16.0 cachetools==5.3.3 cattrs==23.2.3 -cdk-nag==2.28.89 +cdk-nag==2.28.156 certifi==2024.2.2 cffi==1.16.0 cfn-flip==1.3.0 @@ -26,28 +26,29 @@ click==8.1.7 colorama==0.4.6 colored==2.2.4 constructs==10.3.0 -coverage[toml]==7.4.4 -cryptography==42.0.5 +coverage[toml]==7.5.4 +cryptography==42.0.8 dataset==1.6.2 dill==0.3.8 -exceptiongroup==1.2.0 +events==0.5 +exceptiongroup==1.2.1 fastcounter==1.1.0 ghp-import==2.1.0 greenlet==3.0.3 html5tagger==1.3.0 httptools==0.6.1 idna==3.7 -importlib-metadata==7.1.0 +importlib-metadata==8.0.0 importlib-resources==6.4.0 iniconfig==2.0.0 invoke==2.2.0 ipaddress==1.0.23 isort==5.13.2 -jinja2==3.1.3 +jinja2==3.1.4 jmespath==1.0.1 -jsii==1.97.0 +jsii==1.101.0 ldappool==3.0.0 -mako==1.3.3 +mako==1.3.5 markdown==3.6 markdown-it-py==3.0.0 markupsafe==2.1.5 @@ -55,40 +56,41 @@ mccabe==0.7.0 mdurl==0.1.2 memory-profiler==0.61.0 mergedeep==1.3.4 -mkdocs==1.5.3 -mkdocs-material==9.5.17 +mkdocs==1.6.0 +mkdocs-get-deps==0.2.0 +mkdocs-material==9.5.28 mkdocs-material-extensions==1.3.1 multidict==6.0.5 -mypy==1.9.0 +mypy==1.10.1 mypy-extensions==1.0.0 -openapi-pydantic==0.4.0 -opensearch-py==2.5.0 -orjson==3.10.0 -packaging==24.0 +openapi-pydantic==0.4.1 +opensearch-py==2.6.0 +orjson==3.10.6 +packaging==24.1 paginate==0.5.6 pathspec==0.12.1 pip-tools==7.4.1 -platformdirs==4.2.0 -pluggy==1.4.0 +platformdirs==4.2.2 +pluggy==1.5.0 prettytable==3.10.0 prometheus-client==0.20.0 prompt-toolkit==3.0.36 -psutil==5.9.8 +psutil==6.0.0 publication==0.0.3 pyasn1==0.6.0 pyasn1-modules==0.4.0 pycparser==2.22 -pydantic==2.7.0 -pydantic-core==2.18.1 +pydantic==2.8.2 +pydantic-core==2.20.1 pyfiglet==1.0.2 -pygments==2.17.2 -pyhocon==0.3.60 +pygments==2.18.0 +pyhocon==0.3.61 pyjwt==2.8.0 -pylint==3.1.0 -pymdown-extensions==10.7.1 +pylint==3.2.5 +pymdown-extensions==10.8.1 pyparsing==3.1.2 -pyproject-hooks==1.0.0 -pytest==8.1.1 +pyproject-hooks==1.1.0 +pytest==8.2.2 pytest-cov==5.0.0 pytest-mock==3.14.0 python-dateutil==2.9.0.post0 @@ -99,37 +101,37 @@ pyyaml==6.0.1 pyyaml-env-tag==0.1 questionary==2.0.1 random-password-generator==2.2.0 -regex==2023.12.25 +regex==2024.5.15 requests==2.31.0 requests-aws4auth==1.2.3 requests-unixsocket==0.3.0 rich==13.7.1 -s3transfer==0.10.1 +s3transfer==0.10.2 sanic==23.6.0 sanic-routing==23.12.0 semver==3.0.2 -sh==2.0.6 +sh==2.0.7 shortuuid==1.0.13 six==1.16.0 sqlalchemy==1.4.52 supervisor==4.2.5 tomli==2.0.1 -tomlkit==0.12.4 +tomlkit==0.12.5 tracerite==1.1.1 -troposphere==4.7.0 +troposphere==4.8.1 typeguard==2.13.3 types-python-dateutil==2.9.0.20240316 -typing-extensions==4.11.0 +typing-extensions==4.12.2 tzlocal==5.2 -ujson==5.9.0 -urllib3==1.26.18 +ujson==5.10.0 +urllib3==1.26.19 uvloop==0.19.0 -validators==0.28.0 -watchdog==4.0.0 +validators==0.30.0 +watchdog==4.0.1 wcwidth==0.2.13 websockets==12.0 wheel==0.43.0 -zipp==3.18.1 +zipp==3.19.2 # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/doc.txt b/requirements/doc.txt index 788b866..7faf809 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -1,30 +1,31 @@ -babel==2.14.0 -certifi==2024.2.2 +babel==2.15.0 +certifi==2024.7.4 charset-normalizer==3.3.2 click==8.1.7 colorama==0.4.6 ghp-import==2.1.0 idna==3.7 -importlib-metadata==7.1.0 -jinja2==3.1.3 +importlib-metadata==8.0.0 +jinja2==3.1.4 markdown==3.6 markupsafe==2.1.5 mergedeep==1.3.4 -mkdocs==1.5.3 -mkdocs-material==9.5.17 +mkdocs==1.6.0 +mkdocs-get-deps==0.2.0 +mkdocs-material==9.5.28 mkdocs-material-extensions==1.3.1 -packaging==24.0 +packaging==24.1 paginate==0.5.6 pathspec==0.12.1 -platformdirs==4.2.0 -pygments==2.17.2 -pymdown-extensions==10.7.1 +platformdirs==4.2.2 +pygments==2.18.0 +pymdown-extensions==10.8.1 python-dateutil==2.9.0.post0 pyyaml==6.0.1 pyyaml-env-tag==0.1 -regex==2023.12.25 -requests==2.31.0 +regex==2024.5.15 +requests==2.32.3 six==1.16.0 -urllib3==1.26.18 -watchdog==4.0.0 -zipp==3.18.1 +urllib3==2.2.2 +watchdog==4.0.1 +zipp==3.19.2 diff --git a/requirements/idea-administrator.txt b/requirements/idea-administrator.txt index e1fcc2a..f6fc517 100644 --- a/requirements/idea-administrator.txt +++ b/requirements/idea-administrator.txt @@ -1,19 +1,19 @@ -aiofiles==23.2.1 -alembic==1.13.1 -annotated-types==0.6.0 +aiofiles==24.1.0 +alembic==1.13.2 +annotated-types==0.7.0 arrow==1.3.0 attrs==23.2.0 aws-cdk-asset-awscli-v1==2.2.202 aws-cdk-asset-kubectl-v20==2.1.2 aws-cdk-asset-node-proxy-agent-v6==2.0.3 -aws-cdk-lib==2.137.0 +aws-cdk-lib==2.147.3 banal==1.0.6 -blinker==1.7.0 +blinker==1.8.2 boto3==1.34.84 -botocore==1.34.84 +botocore==1.34.139 cacheout==0.16.0 cattrs==23.2.3 -cdk-nag==2.28.89 +cdk-nag==2.28.156 certifi==2024.2.2 cffi==1.16.0 cfn-flip==1.3.0 @@ -21,9 +21,10 @@ charset-normalizer==3.3.2 click==8.1.7 colored==2.2.4 constructs==10.3.0 -cryptography==42.0.5 +cryptography==42.0.8 dataset==1.6.2 -exceptiongroup==1.2.0 +events==0.5 +exceptiongroup==1.2.1 fastcounter==1.1.0 greenlet==3.0.3 html5tagger==1.3.0 @@ -31,28 +32,28 @@ httptools==0.6.1 idna==3.7 importlib-resources==6.4.0 ipaddress==1.0.23 -jinja2==3.1.3 +jinja2==3.1.4 jmespath==1.0.1 -jsii==1.97.0 -mako==1.3.3 +jsii==1.101.0 +mako==1.3.5 markdown-it-py==3.0.0 markupsafe==2.1.5 mdurl==0.1.2 multidict==6.0.5 -mypy==1.9.0 +mypy==1.10.1 mypy-extensions==1.0.0 -opensearch-py==2.5.0 -orjson==3.10.0 +opensearch-py==2.6.0 +orjson==3.10.6 prettytable==3.10.0 prometheus-client==0.20.0 prompt-toolkit==3.0.36 -psutil==5.9.8 +psutil==6.0.0 publication==0.0.3 pycparser==2.22 -pydantic==2.7.0 -pydantic-core==2.18.1 -pygments==2.17.2 -pyhocon==0.3.60 +pydantic==2.8.2 +pydantic-core==2.20.1 +pygments==2.18.0 +pyhocon==0.3.61 pyjwt==2.8.0 pyparsing==3.1.2 python-dateutil==2.9.0.post0 @@ -65,25 +66,25 @@ requests==2.31.0 requests-aws4auth==1.2.3 requests-unixsocket==0.3.0 rich==13.7.1 -s3transfer==0.10.1 +s3transfer==0.10.2 sanic==23.6.0 sanic-routing==23.12.0 semver==3.0.2 -sh==2.0.6 +sh==2.0.7 shortuuid==1.0.13 six==1.16.0 sqlalchemy==1.4.52 tomli==2.0.1 tracerite==1.1.1 -troposphere==4.7.0 +troposphere==4.8.1 typeguard==2.13.3 types-python-dateutil==2.9.0.20240316 -typing-extensions==4.11.0 +typing-extensions==4.12.2 tzlocal==5.2 -ujson==5.9.0 -urllib3==1.26.18 +ujson==5.10.0 +urllib3==1.26.19 uvloop==0.19.0 -validators==0.28.0 +validators==0.30.0 wcwidth==0.2.13 websockets==12.0 -zipp==3.18.1 +zipp==3.19.2 diff --git a/requirements/idea-cluster-manager.txt b/requirements/idea-cluster-manager.txt index c23c371..f8159b6 100644 --- a/requirements/idea-cluster-manager.txt +++ b/requirements/idea-cluster-manager.txt @@ -1,47 +1,48 @@ -aiofiles==23.2.1 -alembic==1.13.1 -annotated-types==0.6.0 +aiofiles==24.1.0 +alembic==1.13.2 +annotated-types==0.7.0 arrow==1.3.0 banal==1.0.6 -blinker==1.7.0 +blinker==1.8.2 boto3==1.34.84 -botocore==1.34.84 +botocore==1.34.139 cacheout==0.16.0 certifi==2024.2.2 cffi==1.16.0 cfn-flip==1.3.0 charset-normalizer==3.3.2 click==8.1.7 -cryptography==42.0.5 +cryptography==42.0.8 dataset==1.6.2 +events==0.5 fastcounter==1.1.0 greenlet==3.0.3 html5tagger==1.3.0 httptools==0.6.1 idna==3.7 -jinja2==3.1.3 +jinja2==3.1.4 jmespath==1.0.1 ldappool==3.0.0 -mako==1.3.3 +mako==1.3.5 markdown-it-py==3.0.0 markupsafe==2.1.5 mdurl==0.1.2 multidict==6.0.5 -mypy==1.9.0 +mypy==1.10.1 mypy-extensions==1.0.0 -opensearch-py==2.5.0 -orjson==3.10.0 +opensearch-py==2.6.0 +orjson==3.10.6 prettytable==3.10.0 prometheus-client==0.20.0 prompt-toolkit==3.0.36 -psutil==5.9.8 +psutil==6.0.0 pyasn1==0.6.0 pyasn1-modules==0.4.0 pycparser==2.22 -pydantic==2.7.0 -pydantic-core==2.18.1 -pygments==2.17.2 -pyhocon==0.3.60 +pydantic==2.8.2 +pydantic-core==2.20.1 +pygments==2.18.0 +pyhocon==0.3.61 pyjwt==2.8.0 pyparsing==3.1.2 python-dateutil==2.9.0.post0 @@ -55,25 +56,25 @@ requests==2.31.0 requests-aws4auth==1.2.3 requests-unixsocket==0.3.0 rich==13.7.1 -s3transfer==0.10.1 +s3transfer==0.10.2 sanic==23.6.0 sanic-routing==23.12.0 semver==3.0.2 -sh==2.0.6 +sh==2.0.7 shortuuid==1.0.13 six==1.16.0 sqlalchemy==1.4.52 supervisor==4.2.5 tomli==2.0.1 tracerite==1.1.1 -troposphere==4.7.0 +troposphere==4.8.1 types-python-dateutil==2.9.0.20240316 -typing-extensions==4.11.0 +typing-extensions==4.12.2 tzlocal==5.2 -ujson==5.9.0 -urllib3==1.26.18 +ujson==5.10.0 +urllib3==1.26.19 uvloop==0.19.0 -validators==0.28.0 +validators==0.30.0 wcwidth==0.2.13 websockets==12.0 diff --git a/requirements/idea-dev-lambda.txt b/requirements/idea-dev-lambda.txt index 335fc9d..1463fe9 100644 --- a/requirements/idea-dev-lambda.txt +++ b/requirements/idea-dev-lambda.txt @@ -1,11 +1,12 @@ -certifi==2024.2.2 +certifi==2024.7.4 cffi==1.16.0 charset-normalizer==3.3.2 -cryptography==42.0.5 +cryptography==42.0.8 +events==0.5 idna==3.7 -opensearch-py==2.5.0 +opensearch-py==2.6.0 pycparser==2.22 python-dateutil==2.9.0.post0 -requests==2.31.0 +requests==2.32.3 six==1.16.0 -urllib3==1.26.18 +urllib3==1.26.19 diff --git a/requirements/idea-scheduler.txt b/requirements/idea-scheduler.txt index f7f9e4d..8e9cb95 100644 --- a/requirements/idea-scheduler.txt +++ b/requirements/idea-scheduler.txt @@ -1,11 +1,11 @@ -aiofiles==23.2.1 -alembic==1.13.1 -annotated-types==0.6.0 +aiofiles==24.1.0 +alembic==1.13.2 +annotated-types==0.7.0 arrow==1.3.0 banal==1.0.6 -blinker==1.7.0 +blinker==1.8.2 boto3==1.34.84 -botocore==1.34.84 +botocore==1.34.139 cacheout==0.16.0 cachetools==5.3.3 certifi==2024.2.2 @@ -13,33 +13,34 @@ cffi==1.16.0 cfn-flip==1.3.0 charset-normalizer==3.3.2 click==8.1.7 -cryptography==42.0.5 +cryptography==42.0.8 dataset==1.6.2 +events==0.5 fastcounter==1.1.0 greenlet==3.0.3 html5tagger==1.3.0 httptools==0.6.1 idna==3.7 -jinja2==3.1.3 +jinja2==3.1.4 jmespath==1.0.1 -mako==1.3.3 +mako==1.3.5 markdown-it-py==3.0.0 markupsafe==2.1.5 mdurl==0.1.2 multidict==6.0.5 -mypy==1.9.0 +mypy==1.10.1 mypy-extensions==1.0.0 -opensearch-py==2.5.0 -orjson==3.10.0 +opensearch-py==2.6.0 +orjson==3.10.6 prettytable==3.10.0 prometheus-client==0.20.0 prompt-toolkit==3.0.36 -psutil==5.9.8 +psutil==6.0.0 pycparser==2.22 -pydantic==2.7.0 -pydantic-core==2.18.1 -pygments==2.17.2 -pyhocon==0.3.60 +pydantic==2.8.2 +pydantic-core==2.20.1 +pygments==2.18.0 +pyhocon==0.3.61 pyjwt==2.8.0 pyparsing==3.1.2 python-dateutil==2.9.0.post0 @@ -52,25 +53,25 @@ requests==2.31.0 requests-aws4auth==1.2.3 requests-unixsocket==0.3.0 rich==13.7.1 -s3transfer==0.10.1 +s3transfer==0.10.2 sanic==23.6.0 sanic-routing==23.12.0 semver==3.0.2 -sh==2.0.6 +sh==2.0.7 shortuuid==1.0.13 six==1.16.0 sqlalchemy==1.4.52 supervisor==4.2.5 tomli==2.0.1 tracerite==1.1.1 -troposphere==4.7.0 +troposphere==4.8.1 types-python-dateutil==2.9.0.20240316 -typing-extensions==4.11.0 +typing-extensions==4.12.2 tzlocal==5.2 -ujson==5.9.0 -urllib3==1.26.18 +ujson==5.10.0 +urllib3==1.26.19 uvloop==0.19.0 -validators==0.28.0 +validators==0.30.0 wcwidth==0.2.13 websockets==12.0 diff --git a/requirements/idea-sdk.in b/requirements/idea-sdk.in index e05bd4c..9d95986 100644 --- a/requirements/idea-sdk.in +++ b/requirements/idea-sdk.in @@ -10,7 +10,7 @@ orjson Click botocore boto3==1.34.84 -requests +requests==2.31 requests-aws4auth requests-unixsocket questionary diff --git a/requirements/idea-virtual-desktop-controller.txt b/requirements/idea-virtual-desktop-controller.txt index a0ca019..df6af81 100644 --- a/requirements/idea-virtual-desktop-controller.txt +++ b/requirements/idea-virtual-desktop-controller.txt @@ -1,43 +1,44 @@ -aiofiles==23.2.1 -alembic==1.13.1 -annotated-types==0.6.0 +aiofiles==24.1.0 +alembic==1.13.2 +annotated-types==0.7.0 arrow==1.3.0 banal==1.0.6 -blinker==1.7.0 +blinker==1.8.2 boto3==1.34.84 -botocore==1.34.84 +botocore==1.34.139 cacheout==0.16.0 certifi==2024.2.2 cffi==1.16.0 cfn-flip==1.3.0 charset-normalizer==3.3.2 click==8.1.7 -cryptography==42.0.5 +cryptography==42.0.8 dataset==1.6.2 +events==0.5 fastcounter==1.1.0 greenlet==3.0.3 html5tagger==1.3.0 httptools==0.6.1 idna==3.7 -jinja2==3.1.3 +jinja2==3.1.4 jmespath==1.0.1 -mako==1.3.3 +mako==1.3.5 markdown-it-py==3.0.0 markupsafe==2.1.5 mdurl==0.1.2 multidict==6.0.5 -mypy==1.9.0 +mypy==1.10.1 mypy-extensions==1.0.0 -opensearch-py==2.5.0 -orjson==3.10.0 +opensearch-py==2.6.0 +orjson==3.10.6 prometheus-client==0.20.0 prompt-toolkit==3.0.36 -psutil==5.9.8 +psutil==6.0.0 pycparser==2.22 -pydantic==2.7.0 -pydantic-core==2.18.1 -pygments==2.17.2 -pyhocon==0.3.60 +pydantic==2.8.2 +pydantic-core==2.20.1 +pygments==2.18.0 +pyhocon==0.3.61 pyjwt==2.8.0 pyparsing==3.1.2 python-dateutil==2.9.0.post0 @@ -50,25 +51,25 @@ requests==2.31.0 requests-aws4auth==1.2.3 requests-unixsocket==0.3.0 rich==13.7.1 -s3transfer==0.10.1 +s3transfer==0.10.2 sanic==23.6.0 sanic-routing==23.12.0 semver==3.0.2 -sh==2.0.6 +sh==2.0.7 shortuuid==1.0.13 six==1.16.0 sqlalchemy==1.4.52 supervisor==4.2.5 tomli==2.0.1 tracerite==1.1.1 -troposphere==4.7.0 +troposphere==4.8.1 types-python-dateutil==2.9.0.20240316 -typing-extensions==4.11.0 +typing-extensions==4.12.2 tzlocal==5.2 -ujson==5.9.0 -urllib3==1.26.18 +ujson==5.10.0 +urllib3==1.26.19 uvloop==0.19.0 -validators==0.28.0 +validators==0.30.0 wcwidth==0.2.13 websockets==12.0 diff --git a/requirements/tests.txt b/requirements/tests.txt index 94846ea..0d63ea5 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -1,11 +1,11 @@ -coverage[toml]==7.4.4 -exceptiongroup==1.2.0 +coverage[toml]==7.5.4 +exceptiongroup==1.2.1 iniconfig==2.0.0 memory-profiler==0.61.0 -packaging==24.0 -pluggy==1.4.0 -psutil==5.9.8 -pytest==8.1.1 +packaging==24.1 +pluggy==1.5.0 +psutil==6.0.0 +pytest==8.2.2 pytest-cov==5.0.0 pytest-mock==3.14.0 tomli==2.0.1 diff --git a/software_versions.yml b/software_versions.yml index cd688c9..b403f17 100644 --- a/software_versions.yml +++ b/software_versions.yml @@ -1,4 +1,4 @@ -aws_cdk_version: 2.137.0 +aws_cdk_version: 2.147.3 node_version: 18.20.2 nvm_version: 0.39.7 python_version: 3.9.19 diff --git a/source/idea/idea-administrator/install/install.sh b/source/idea/idea-administrator/install/install.sh index a660388..fd6ff76 100644 --- a/source/idea/idea-administrator/install/install.sh +++ b/source/idea/idea-administrator/install/install.sh @@ -14,7 +14,7 @@ # IDEA Administrator Installation Script IDEA_APP_DEPLOY_DIR="/root/.idea" -IDEA_CDK_VERSION="2.137.0" +IDEA_CDK_VERSION="2.147.3" SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" diff --git a/source/idea/idea-administrator/resources/config/region_ami_config.yml b/source/idea/idea-administrator/resources/config/region_ami_config.yml index 7ab1ae5..7fbe2b5 100644 --- a/source/idea/idea-administrator/resources/config/region_ami_config.yml +++ b/source/idea/idea-administrator/resources/config/region_ami_config.yml @@ -1,222 +1,167 @@ af-south-1: amazonlinux2: ami-0078f890ffc3a7243 - centos7: ami-0cf2f235226a4d1f2 - rhel7: ami-0fe7507703898a688 rhel8: ami-03b4a7a9322996d1b rhel9: ami-0f03ab0d77d09f69b rocky8: ami-0a78dfcc5ab18ed1d rocky9: ami-01f4e4baf36adc3f8 ap-east-1: amazonlinux2: ami-0e17d4461e0959544 - centos7: ami-039ac400e94785a1d - rhel7: ami-0d113ed541942504a rhel8: ami-04d69e154b3c66ee5 rhel9: ami-07e4c5fb3a8c58b86 rocky8: ami-0f3b7342fb12abe7f rocky9: ami-0a875114b9a10a4f8 ap-northeast-1: amazonlinux2: ami-0705806411562a051 - centos7: ami-06e6d2122baa563c4 - rhel7: ami-05016d58118cb4881 rhel8: ami-0c955bbc0d55874fb rhel9: ami-0c611ef0ef2ab2c7e rocky8: ami-0de0a3d1395d33095 rocky9: ami-04ea6cd6212dc29f8 ap-northeast-2: amazonlinux2: ami-050a4617492ff5822 - centos7: ami-061f5322ab2662c82 - rhel7: ami-004ed0ba77095ba25 rhel8: ami-05bfdd5b68e278b02 rhel9: ami-031d0d21634293534 rocky8: ami-0060e750287d7b7f6 rocky9: ami-061d100da26bfb9f6 ap-northeast-3: amazonlinux2: ami-0a4cde46c8ee66595 - rhel7: ami-0558aa3a1b91c9d74 rhel8: ami-03facf858147a8d5e rhel9: ami-01da5762f5841374c rocky8: ami-0969967bdfccc0ab4 rocky9: ami-0624d74b1373cea69 ap-south-1: amazonlinux2: ami-0451f2687182e0411 - centos7: ami-09f129ee53d3523c0 - rhel7: ami-0ea2ce8b668f422ce rhel8: ami-0805b29fbd93e13e5 rhel9: ami-0afd2363396a19cda rocky8: ami-013451397edf3458d rocky9: ami-0b5a2477d702341d6 ap-south-2: amazonlinux2: ami-07272e8da14db3dfa - centos7: ami-0d121f146c20fafa0 - rhel7: ami-06ed2b77cde70d481 rhel8: ami-0230f07faba0d9f46 rhel9: ami-0f154fee627d322d1 rocky8: ami-04c1d66ac67eb2702 rocky9: ami-0305104288c179d59 ap-southeast-1: amazonlinux2: ami-0fd77db8c27ba5cc5 - centos7: ami-03bfba2e75432064e - rhel7: ami-0883712f4e7f557f7 rhel8: ami-0e28ce9494c87c82b rhel9: ami-0f92bea636dbaf818 rocky8: ami-0c76f9941163a0df0 rocky9: ami-06f280d990052aa61 ap-southeast-2: amazonlinux2: ami-0386c125da6e09148 - centos7: ami-0264ead5294ad1773 - rhel7: ami-01edb389be6d2ae7f rhel8: ami-03f264c165b28d963 rhel9: ami-048a88a89ba8feb52 rocky8: ami-08ad7961abf7fc881 rocky9: ami-061c60691199b23b4 ap-southeast-3: amazonlinux2: ami-05a2cb5da24dd20c3 - centos7: ami-0c654ac429998fb1c - rhel7: ami-0e1bd60bacf164ead rhel8: ami-0d2f2f3c8cce10d90 rhel9: ami-0860c4f5ded440eab rocky8: ami-063a0653f0045582a rocky9: ami-0fe31db6208de6bc7 ap-southeast-4: amazonlinux2: ami-0f68ab67368add313 - centos7: ami-0d3bff5ed9ff3e5a4 - rhel7: ami-03808fa671587a04f rhel8: ami-0d560ffe53f54b59b rhel9: ami-0ad11869d58e6513c rocky9: ami-0c7e453e4139c3918 ca-central-1: amazonlinux2: ami-044fb30603665a990 - centos7: ami-01ebef6e00efb2c20 - rhel7: ami-08ba906b09cdf48ff rhel8: ami-01ba2527c256d3670 rhel9: ami-01b3ffd8e30c60eeb rocky8: ami-0f1b137f1701a0232 rocky9: ami-043547fb13af920aa eu-central-1: amazonlinux2: ami-098efcc0d4f80810e - centos7: ami-0afcbcee3dfbce929 - rhel7: ami-058a887d3af3bc23e rhel8: ami-048ce72c9f98c5cc6 rhel9: ami-0c506a86471fc4ee3 rocky8: ami-04653eb200e1e1879 rocky9: ami-00297d5e47600069b eu-central-2: amazonlinux2: ami-0b9bde5f65ea99f88 - centos7: ami-0e7ae4065721cafb3 - rhel7: ami-092d941941bc1cb73 rhel8: ami-01e4d5af7b9e71cca rhel9: ami-018dc87a94722a3f4 rocky8: ami-0cb3f908f446bf66f rocky9: ami-03f794bce8879ddf5 eu-north-1: amazonlinux2: ami-0f0ec0d37d04440e3 - centos7: ami-0e5125a0f19c52a2b - rhel7: ami-0930c6515d30d4867 rhel8: ami-0b1e1c7d2c2a6477a rhel9: ami-0e0ea049dc7c3f43f rocky8: ami-059464b63014a9d6a rocky9: ami-07c0f40b66e9893c4 eu-south-1: amazonlinux2: ami-0035ac147615d311a - centos7: ami-0a3a6d4d737db3bc1 - rhel7: ami-03e09da05c106a5bc rhel8: ami-06bd15ab0b53afdd1 rhel9: ami-0353a3d62ce2a4d34 rocky8: ami-0eab7c60b1a9777a4 rocky9: ami-02a52521104e7e33c eu-south-2: amazonlinux2: ami-03a3458220cc97680 - centos7: ami-0f4cbddb1f35cb43c - rhel7: ami-04341b15cf57b1df9 rhel8: ami-0592043efe8b23d6d rhel9: ami-0000bfd90e50250bc rocky8: ami-032b8706c37ffbd19 rocky9: ami-0055ed38319871aba eu-west-1: amazonlinux2: ami-04149c54d7c56180d - centos7: ami-00d464afa64e1fc69 - rhel7: ami-018e4344af2a62450 rhel8: ami-0fa2f7b35eeb82b7a rhel9: ami-02c220fcee5dab581 rocky8: ami-03c212e8567b3fbb4 rocky9: ami-075deb8a8baba7096 eu-west-2: amazonlinux2: ami-004961349a19d7a8f - centos7: ami-0de2f45684e59282c - rhel7: ami-0c2f9865057c3dfe1 rhel8: ami-0317ca3d7dd91fe40 rhel9: ami-0f2ebeef87bd0fc55 rocky8: ami-07d2b4d8d9980a125 rocky9: ami-0dc67239a7014b5d7 eu-west-3: amazonlinux2: ami-0720246d895625a23 - centos7: ami-051806c39fa542e22 - rhel7: ami-053b42a6733c52f17 rhel8: ami-07e5c478814a5c77f rhel9: ami-0027189fdc7e828ff rocky8: ami-0ea31728c3d693a46 rocky9: ami-055ef9077256948cc il-central-1: amazonlinux2: ami-08f5bc8f748969943 - rhel7: ami-0fa62108f2a0dfad2 rhel8: ami-0d8818785f5f7b61b rhel9: ami-09a7b4437373f7437 me-central-1: amazonlinux2: ami-0470ab0c1ef0e00d2 - centos7: ami-052fe108e664d633f - rhel7: ami-068543e4b7405fbb2 rhel8: ami-096e2ee07e42e15a1 rhel9: ami-0a5c3f649fcb77765 rocky8: ami-04994559183ff0e97 rocky9: ami-0328e5d1ac6de47fe me-south-1: amazonlinux2: ami-05d40c210353593ff - centos7: ami-09ce1cd69cab28540 - rhel7: ami-0b6a0e920d35d15a7 rhel8: ami-0570bd6ca86d05886 rhel9: ami-0306f394843a0eec3 rocky8: ami-03409713eb5f3513e rocky9: ami-06081408f1fb50fb5 sa-east-1: amazonlinux2: ami-013e1515e9ea9d99e - centos7: ami-015f6bf0657816a2d - rhel7: ami-0562b80a8716922c9 rhel8: ami-0b30b754bf79883b1 rhel9: ami-0e7880ca9f5adf73f rocky8: ami-07ce4a0c554d4d174 rocky9: ami-0af79284ed0d624e0 us-east-1: amazonlinux2: ami-0a699202e5027c10d - centos7: ami-0aedf6b1cb669b4c7 - rhel7: ami-045393c081cabeb1f rhel8: ami-0b324207d4bcaec61 rhel9: ami-0780fb502b20edd73 rocky8: ami-09d91a87b002fc97a rocky9: ami-09c77dc92e45bc3ea us-east-2: amazonlinux2: ami-00cda30cf72311684 - centos7: ami-033adaf0b583374d4 - rhel7: ami-00342897eb8ba6355 rhel8: ami-057094267c651958e rhel9: ami-03e7e733aca9df0ff rocky8: ami-02fb9384e880ed67c rocky9: ami-08f7b2cb6f6b78c21 us-gov-west-1: amazonlinux2: ami-0c4bf799ed0f01f88 - rhel7: ami-09616d1f2ecd77e9b rhel8: ami-0206165c7b00c4adf us-west-1: amazonlinux2: ami-050c61fa1bff25e5a - centos7: ami-0bcd12d19d926f8e9 - rhel7: ami-039ca986f21216c27 rhel8: ami-08ca382a3d70d5193 rhel9: ami-02aa6a38bd99dad6c rocky8: ami-007ccc9f91c5d2146 rocky9: ami-07d56cabf4f83571a us-west-2: amazonlinux2: ami-089313d40efd067a9 - centos7: ami-04f798ca92cc13f74 - rhel7: ami-01788be7cc93be6ee rhel8: ami-030bea4543b3db5de rhel9: ami-0378fd0689802d015 rocky8: ami-07bec6df8beb3ee8f diff --git a/source/idea/idea-administrator/resources/config/templates/global-settings/settings.yml b/source/idea/idea-administrator/resources/config/templates/global-settings/settings.yml index dc8aee0..5ca2a48 100644 --- a/source/idea/idea-administrator/resources/config/templates/global-settings/settings.yml +++ b/source/idea/idea-administrator/resources/config/templates/global-settings/settings.yml @@ -90,6 +90,44 @@ package_config: - autoconf - automake - stress + + application_deb: + # Extra package to install on Scheduler host, including OpenPBS dependencies installed on all Debian Linux OS + - htop + - hwloc + - gcc + - make + - libtool + - libhwloc-dev + - libx11-dev + - libxt-dev + - libedit-dev + - libical-dev + - ncurses-dev + - perl + - postgresql-server-dev-all + - postgresql-contrib + - unzip + - python3-dev + - tcl-dev + - tk-dev + - swig + - libexpat-dev + - libssl-dev + - libxext-dev + - libxft-dev + - autoconf + - automake + - g++ + - expat + - libedit2 + - postgresql + - python3 + - sendmail-bin + - sudo + - tcl + - tk + - libical3 application_7: # Additional packages required for ALI2, centos7, rhel7, and rocky7 @@ -120,6 +158,10 @@ package_config: openldap_client: - openldap-clients + + openldap_client_deb: + - ldap-utils + - sssd-ldap openldap_server: # OpenLDAP Server and dependencies installed on all Linux OS @@ -143,7 +185,6 @@ package_config: # Additional packages required for rhel9, and rocky9 - openldap-compat - sssd: # SSSD and dependencies installed on all Linux OS - adcli @@ -187,6 +228,17 @@ package_config: - sssd-krb5-common - sssd-ldap - sssd-proxy + + sssd_deb: + # SSSD and dependencies installed on all Debian Linux OS + - adcli + - sssd-ad + - sssd-tools + - realmd + - libsss-sudo + - krb5-user + - sssd-krb5 + sssd_7: # Additional packages required for rhel7, centos7, and amazonlinux2 - python-sssdconfig @@ -195,6 +247,7 @@ package_config: # Default packages installed on all Linux OS - chrony - cpp + - dkms - e2fsprogs - e2fsprogs-libs - gcc @@ -295,6 +348,26 @@ package_config: - zlib - zlib-devel + system_deb: + # Default packages installed on all Linux OS + - chrony # chrony-daemon not found, using base package + - build-essential + - htop + - libva2 + - libva-drm2 + - nfs-common + - policycoreutils + - dkms + - git + - jq + - openssl + - libssl-dev + - perl # Consolidating perl packages based on apt output + - perl-base # Consolidating perl packages based on apt output + - vim + - wget + - mesa-utils + system_7: # Additional packages required for rhel7, centos7, and amazonlinux2 - libverto-tevent @@ -313,7 +386,6 @@ package_config: # Additional packages required for rhel9, rocky9 - ec2-hibinit-agent - # used by cluster-manager to convert .pem files to .ppk files putty: - putty @@ -418,7 +490,6 @@ package_config: url: https://d1uj6qtbmh3dt5.cloudfront.net/2023.1/Servers/nice-dcv-2023.1-16388-sles15-x86_64.tgz sha256sum: a84aa662613c2098d15763a46559dc596541471b030fae544269b51b766d4ef3 {%- endif %} - ubuntu: {%- if 'ubuntu1804' in supported_base_os %} ubuntu1804: version: 2023.0-15065-ubuntu1804-x86_64 @@ -463,7 +534,6 @@ package_config: url: https://d1uj6qtbmh3dt5.cloudfront.net/2023.1/Servers/nice-dcv-2023.1-16388-el9-aarch64.tgz sha256sum: a74ee7376bf8595b95386352ff3f95eb5886e7bbc8b8512c53a48be1d3ec6282 {%- endif %} - ubuntu: {%- if 'ubuntu1804' in supported_base_os %} ubuntu1804: version: 2023.0-15065-ubuntu1804-aarch64.tgz @@ -516,7 +586,6 @@ package_config: url: https://d1uj6qtbmh3dt5.cloudfront.net/2023.1/SessionManagerAgents/nice-dcv-session-manager-agent-2023.1.732-1.sles15.x86_64.rpm sha256sum: 172626e2eda8e7c6b5cd26e96a5102096b1a21dceacddf064870bc6df7b1490d {%- endif %} - ubuntu: {%- if 'ubuntu1804' in supported_base_os %} ubuntu1804: version: 2023.0.675-1_amd64.ubuntu1804 @@ -555,7 +624,6 @@ package_config: url: https://d1uj6qtbmh3dt5.cloudfront.net/2023.1/SessionManagerAgents/nice-dcv-session-manager-agent-2023.1.732-1.el9.aarch64.rpm sha256sum: 127bcf74b7d9f5b4ac3a6da037175bb1cefedb15d2abed0ad236a781cfbfe3a8 {%- endif %} - ubuntu: {%- if 'ubuntu1804' in supported_base_os %} ubuntu1804: version: 2023.0.675-1_arm64.ubuntu1804 @@ -589,7 +657,6 @@ package_config: url: https://d1uj6qtbmh3dt5.cloudfront.net/2023.1/Gateway/nice-dcv-connection-gateway-2023.1.710-1.el9.x86_64.rpm sha256sum: 4b28aa3ecb4d681da5fe5f6a4420c5de032ea224111599384b1cf337084be0c5 {%- endif %} - ubuntu: {%- if 'ubuntu1804' in supported_base_os %} ubuntu1804: version: 2023.0.531-1_amd64.ubuntu1804 @@ -622,7 +689,6 @@ package_config: url: https://d1uj6qtbmh3dt5.cloudfront.net/2023.1/Gateway/nice-dcv-connection-gateway-2023.1.710-1.el8.aarch64.rpm sha256sum: 63596f532764ecaf023fe3c16ea53c7fbcebfc3c8da13ef378ce4c49ee295bd7 {%- endif %} - ubuntu: {%- if 'ubuntu1804' in supported_base_os %} ubuntu1804: version: 2023.0.531-1_arm64.ubuntu1804 @@ -661,7 +727,6 @@ package_config: url: https://d1uj6qtbmh3dt5.cloudfront.net/2023.1/SessionManagerBrokers/nice-dcv-session-manager-broker-2023.1.410-1.el9.noarch.rpm sha256sum: 36e67f19f9534c49f4d1c073f619c443cecc34a7bdd624aafc06eeb1db160ba9 {%- endif %} - ubuntu: {%- if 'ubuntu1804' in supported_base_os %} ubuntu1804: version: 2023.0.392-1_all.ubuntu1804 @@ -703,12 +768,11 @@ package_config: label: RHEL 8 | CentOS 8 | Rocky Linux 8 url: https://d1uj6qtbmh3dt5.cloudfront.net/2023.1/Clients/nice-dcv-viewer-2023.1.6203-1.el8.x86_64.rpm rhel_centos_rocky9: - label: AL2023 | RHEL 9 | CentOS 9 | Rocky Linux 9 + label: RHEL 9 | CentOS 9 | Rocky Linux 9 url: https://d1uj6qtbmh3dt5.cloudfront.net/2023.1/Clients/nice-dcv-viewer-2023.1.6203-1.el9.x86_64.rpm suse15: label: SUSE Enterprise Linux 15 url: https://d1uj6qtbmh3dt5.cloudfront.net/2023.1/Clients/nice-dcv-viewer-2023.1.6203-1.sles15.x86_64.rpm - ubuntu: ubuntu1804: label: Ubuntu 18.04 url: https://d1uj6qtbmh3dt5.cloudfront.net/2023.0/Clients/nice-dcv-viewer_2023.0.5483-1_amd64.ubuntu1804.deb @@ -740,11 +804,12 @@ gpu_settings: - g3s - g5 - g5g + - g6 - g4dn - g4ad nvidia_public_driver_versions: ltsb_version: <sb_version 470.239.06 - production_version: &production_version 550.54.15 + production_version: &production_version 550.90.07 p2: *ltsb_version g2: *ltsb_version g3: *production_version @@ -752,6 +817,7 @@ gpu_settings: g4dn: *production_version g5: *production_version g5g: *production_version + g6: *production_version p3: *production_version p4d: *production_version p4de: *production_version diff --git a/source/idea/idea-administrator/resources/input_params/install_params.yml b/source/idea/idea-administrator/resources/input_params/install_params.yml index ab9080c..3ac5849 100644 --- a/source/idea/idea-administrator/resources/input_params/install_params.yml +++ b/source/idea/idea-administrator/resources/input_params/install_params.yml @@ -406,10 +406,6 @@ SocaInputParamSpec: choices: - title: Amazon Linux 2 value: amazonlinux2 - - title: CentOS 7 - value: centos7 - - title: Red Hat Enterprise Linux 7 - value: rhel7 tag: default markdown: ~ diff --git a/source/idea/idea-administrator/src/ideaadministrator/app_main.py b/source/idea/idea-administrator/src/ideaadministrator/app_main.py index e87b512..e830386 100644 --- a/source/idea/idea-administrator/src/ideaadministrator/app_main.py +++ b/source/idea/idea-administrator/src/ideaadministrator/app_main.py @@ -1507,7 +1507,7 @@ def run_integration_tests(cluster_name: str, aws_region: str, aws_profile: str, --aws-region eu-west-1 \\ --admin-username YOUR_ADMIN_USER \\ --admin-password YOUR_ADMIN_PASSWORD \\ - --param base_os=amazonlinux2,centos7,rhel7 \\ + --param base_os=amazonlinux2 \\ --test-case-id SCHEDULER_JOB_TEST_CASES \b diff --git a/source/idea/idea-administrator/src/ideaadministrator_meta/__init__.py b/source/idea/idea-administrator/src/ideaadministrator_meta/__init__.py index 86d4706..bd9fea5 100644 --- a/source/idea/idea-administrator/src/ideaadministrator_meta/__init__.py +++ b/source/idea/idea-administrator/src/ideaadministrator_meta/__init__.py @@ -12,4 +12,4 @@ # pkg config for idea-admin. no dependencies. __name__ = 'idea-administrator' -__version__ = '3.1.7' +__version__ = '3.1.8' diff --git a/source/idea/idea-bootstrap/_templates/linux/aws_ssm.jinja2 b/source/idea/idea-bootstrap/_templates/linux/aws_ssm.jinja2 index 0c957cd..c298363 100644 --- a/source/idea/idea-bootstrap/_templates/linux/aws_ssm.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/aws_ssm.jinja2 @@ -1,9 +1,16 @@ # Begin: AWS Systems Manager Agent -{%- if context.base_os in ('rhel7', 'rhel8', 'rhel9') %} +{%- if context.base_os in ('rhel8', 'rhel9') %} sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/product-id.conf sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/subscription-manager.conf {%- endif %} -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('ubuntu2204') %} +set -x +snap services amazon-ssm-agent +if [[ "$?" != "0" ]]; then + snap install amazon-ssm-agent --classic +fi +{%- endif %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} systemctl status amazon-ssm-agent if [[ "$?" != "0" ]]; then machine=$(uname -m) diff --git a/source/idea/idea-bootstrap/_templates/linux/chronyd.jinja2 b/source/idea/idea-bootstrap/_templates/linux/chronyd.jinja2 index 492789c..ad026ef 100644 --- a/source/idea/idea-bootstrap/_templates/linux/chronyd.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/chronyd.jinja2 @@ -1,6 +1,11 @@ # Begin: Configure chronyd -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} yum remove -y ntp +{%- endif %} +{%- if context.base_os in ('ubuntu2204') %} +apt remove -y ntp +{%- endif %} + mv /etc/chrony.conf /etc/chrony.conf.original echo -e " # use the local instance NTP service, if available @@ -30,5 +35,5 @@ dumponexit dumpdir /var/run/chrony " > /etc/chrony.conf systemctl enable chronyd -{%- endif %} + # End: Configure chronyd diff --git a/source/idea/idea-bootstrap/_templates/linux/cloudwatch_agent.jinja2 b/source/idea/idea-bootstrap/_templates/linux/cloudwatch_agent.jinja2 index 197120f..4ff54d6 100644 --- a/source/idea/idea-bootstrap/_templates/linux/cloudwatch_agent.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/cloudwatch_agent.jinja2 @@ -18,13 +18,13 @@ function get_cloudwatch_agent_download_link() { sed -i 's/%os%/amazon_linux/g' ${CLOUDWATCH_AGENT_BOOTSTRAP_DIR}/cloudwatch_download_link.txt sed -i 's/%ext%/rpm/g' ${CLOUDWATCH_AGENT_BOOTSTRAP_DIR}/cloudwatch_download_link.txt ;; - rhel7 | rhel8 | rhel9 | rocky8 | rocky9) + rhel8 | rhel9 | rocky8 | rocky9) sed -i 's/%os%/redhat/g' ${CLOUDWATCH_AGENT_BOOTSTRAP_DIR}/cloudwatch_download_link.txt sed -i 's/%ext%/rpm/g' ${CLOUDWATCH_AGENT_BOOTSTRAP_DIR}/cloudwatch_download_link.txt ;; - centos7) - sed -i 's/%os%/centos/g' ${CLOUDWATCH_AGENT_BOOTSTRAP_DIR}/cloudwatch_download_link.txt - sed -i 's/%ext%/rpm/g' ${CLOUDWATCH_AGENT_BOOTSTRAP_DIR}/cloudwatch_download_link.txt + ubuntu2204) + sed -i 's/%os%/ubuntu/g' ${CLOUDWATCH_AGENT_BOOTSTRAP_DIR}/cloudwatch_download_link.txt + sed -i 's/%ext%/deb/g' ${CLOUDWATCH_AGENT_BOOTSTRAP_DIR}/cloudwatch_download_link.txt ;; esac local MACHINE=$(uname -m) @@ -42,7 +42,13 @@ CLOUDWATCH_AGENT_DOWNLOAD_LINK="$(get_cloudwatch_agent_download_link)" CLOUDWATCH_AGENT_PACKAGE_NAME="$(basename ${CLOUDWATCH_AGENT_DOWNLOAD_LINK})" pushd ${CLOUDWATCH_AGENT_BOOTSTRAP_DIR} wget "${CLOUDWATCH_AGENT_DOWNLOAD_LINK}" + +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} rpm -U ./${CLOUDWATCH_AGENT_PACKAGE_NAME} +{%- elif context.base_os in ('ubuntu2204') %} +dpkg -i ./${CLOUDWATCH_AGENT_PACKAGE_NAME} +{%- endif %} + popd {%- set cloudwatch_agent_config = context.get_cloudwatch_agent_config(additional_log_files=additional_log_files) %} diff --git a/source/idea/idea-bootstrap/_templates/linux/dcv_server.jinja2 b/source/idea/idea-bootstrap/_templates/linux/dcv_server.jinja2 index 26dd2a9..97b2e17 100644 --- a/source/idea/idea-bootstrap/_templates/linux/dcv_server.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/dcv_server.jinja2 @@ -1,7 +1,7 @@ # Begin: DCV Server DCV_GPG_KEY_DCV_SERVER="{{ context.config.get_string('global-settings.package_config.dcv.gpg_key', required=True) }}" -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7') %} +{%- if context.base_os in ('amazonlinux2') %} DCV_SERVER_X86_64_URL="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.al2_rhel_centos7.url', required=True) }}" DCV_SERVER_X86_64_TGZ="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.al2_rhel_centos7.tgz', required=True) }}" DCV_SERVER_X86_64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.al2_rhel_centos7.version', required=True) }}" @@ -24,38 +24,49 @@ DCV_SERVER_AARCH64_VERSION="{{ context.config.get_string('global-settings.packag DCV_SERVER_AARCH64_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.host.aarch64.linux.rhel_centos_rocky8.sha256sum', required=True) }}" {%- elif context.base_os in ('rhel9', 'rocky9') %} - DCV_SERVER_X86_64_URL="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.rhel_centos_rocky9.url', required=True) }}" - DCV_SERVER_X86_64_TGZ="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.rhel_centos_rocky9.tgz', required=True) }}" - DCV_SERVER_X86_64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.rhel_centos_rocky9.version', required=True) }}" - DCV_SERVER_X86_64_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.rhel_centos_rocky9.sha256sum', required=True) }}" - - DCV_SERVER_AARCH64_URL="{{ context.config.get_string('global-settings.package_config.dcv.host.aarch64.linux.rhel_centos_rocky9.url', required=True) }}" - DCV_SERVER_AARCH64_TGZ="{{ context.config.get_string('global-settings.package_config.dcv.host.aarch64.linux.rhel_centos_rocky9.tgz', required=True) }}" - DCV_SERVER_AARCH64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.host.aarch64.linux.rhel_centos_rocky9.version', required=True) }}" - DCV_SERVER_AARCH64_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.host.aarch64.linux.rhel_centos_rocky9.sha256sum', required=True) }}" +DCV_SERVER_X86_64_URL="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.rhel_centos_rocky9.url', required=True) }}" +DCV_SERVER_X86_64_TGZ="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.rhel_centos_rocky9.tgz', required=True) }}" +DCV_SERVER_X86_64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.rhel_centos_rocky9.version', required=True) }}" +DCV_SERVER_X86_64_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.rhel_centos_rocky9.sha256sum', required=True) }}" + +DCV_SERVER_AARCH64_URL="{{ context.config.get_string('global-settings.package_config.dcv.host.aarch64.linux.rhel_centos_rocky9.url', required=True) }}" +DCV_SERVER_AARCH64_TGZ="{{ context.config.get_string('global-settings.package_config.dcv.host.aarch64.linux.rhel_centos_rocky9.tgz', required=True) }}" +DCV_SERVER_AARCH64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.host.aarch64.linux.rhel_centos_rocky9.version', required=True) }}" +DCV_SERVER_AARCH64_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.host.aarch64.linux.rhel_centos_rocky9.sha256sum', required=True) }}" + +{%- elif context.base_os == 'ubuntu2204' %} +DCV_SERVER_X86_64_URL="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.ubuntu2204.url', required=True) }}" +DCV_SERVER_X86_64_TGZ="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.ubuntu2204.tgz', required=True) }}" +DCV_SERVER_X86_64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.ubuntu2204.version', required=True) }}" +DCV_SERVER_X86_64_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.ubuntu2204.sha256sum', required=True) }}" + +DCV_SERVER_AARCH64_URL="{{ context.config.get_string('global-settings.package_config.dcv.host.aarch64.linux.ubuntu2204.url', required=True) }}" +DCV_SERVER_AARCH64_TGZ="{{ context.config.get_string('global-settings.package_config.dcv.host.aarch64.linux.ubuntu2204.tgz', required=True) }}" +DCV_SERVER_AARCH64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.host.aarch64.linux.ubuntu2204.version', required=True) }}" +DCV_SERVER_AARCH64_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.host.aarch64.linux.ubuntu2204.sha256sum', required=True) }}" {%- endif %} log_info "Installing GPU drivers" -{% if context.is_gpu_instance_type() -%} +{% if context.is_gpu_instance_type() %} sudo rm -rf /etc/X11/XF86Config* - {%- include '_templates/linux/gpu_drivers.jinja2' %} -{% else -%} + {% include '_templates/linux/gpu_drivers.jinja2' %} +{% else %} log_info "GPU InstanceType not detected. Skipping GPU driver installation." -{% endif -%} +{% endif %} {%- if not context.is_gpu_instance_type() and context.vars.session.type.lower() == 'console' %} {%- include '_templates/linux/x_dummy_driver.jinja2' %} install_x_dummy_driver {%- endif %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} if [[ -z "$(rpm -qa gnome-terminal)" ]]; then +{%- elif context.base_os in ('ubuntu2204') %} +if [[ -z "$(dpkg -l lightdm | grep ^ii)" ]]; then +{%- endif %} {% if context.base_os == 'amazonlinux2' -%} DCV_AMAZONLINUX_PKGS=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.dcv_amazonlinux', required=True)) }}) yum install -y $(echo ${DCV_AMAZONLINUX_PKGS[*]}) -{% elif context.base_os in ('rhel7') -%} - # RHEL 7.x - yum groups mark convert - yum groupinstall "Server with GUI" -y --skip-broken {% elif context.base_os in ('rhel8', 'rhel9', 'rocky8', 'rocky9') %} EXCLUDE=() {%- if context.is_amd_gpu() %} @@ -81,16 +92,22 @@ ResultActive=no" > /etc/polkit-1/localauthority/50-local.d/repos.pkla sed -i 's,Exec=/usr/libexec/gsd-subman,#Exec=/usr/libexec/gsd-subman,' /etc/xdg/autostart/org.gnome.SettingsDaemon.Subscription.desktop sed -i 's,ExecStart=/usr/libexec/gsd-subman,#ExecStart=/usr/libexec/gsd-subman,' /lib/systemd/user/org.gnome.SettingsDaemon.Subscription.service yum -y remove subscription-manager-cockpit -{% elif context.base_os == 'centos7' -%} - # CentOS 7.x - yum groups mark convert - yum groupinstall "GNOME Desktop" -y --skip-broken +{%- elif context.base_os in ('ubuntu2204') %} + DEBIAN_FRONTEND=noninteractive apt install -y ubuntu-desktop-minimal lightdm libvdpau1 libxcb-damage0 libxcb-xtest0 mesa-vdpau-drivers vdpau-driver-all + echo "/usr/sbin/lightdm" > /etc/X11/default-display-manager + DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true dpkg-reconfigure lightdm + echo set shared/default-x-display-manager lightdm | debconf-communicate {% endif -%} else - log_info "Found gnome-terminal pre-installed... skipping dcv prereq installation..." + log_info "Found window manager pre-installed... skipping dcv prereq installation..." fi +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} rpm --import ${DCV_GPG_KEY_DCV_SERVER} +{%- elif context.base_os in ('ubuntu2204') %} +curl -fsSL "${DCV_GPG_KEY_DCV_SERVER}" | gpg --dearmor | sudo tee /usr/share/keyrings/dcv.gpg > /dev/null +{%- endif %} + machine=$(uname -m) #x86_64 or aarch64 DCV_SERVER_URL="" DCV_SERVER_TGZ="" @@ -110,7 +127,12 @@ else DCV_SERVER_SHA256_HASH=${DCV_SERVER_AARCH64_SHA256_HASH} fi +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} if [[ -z "$(rpm -qa nice-dcv-server)" ]]; then +{%- elif context.base_os in ('ubuntu2204') %} +if [[ -z "$(dpkg -l nice-dcv-server | grep ^ii)" ]]; then +{%- endif %} + wget ${DCV_SERVER_URL} if [[ $(sha256sum ${DCV_SERVER_TGZ} | awk '{print $1}') != ${DCV_SERVER_SHA256_HASH} ]]; then echo -e "FATAL ERROR: Checksum for DCV Server failed. File may be compromised." > /etc/motd @@ -123,18 +145,17 @@ if [[ -z "$(rpm -qa nice-dcv-server)" ]]; then rpm -ivh nice-xdcv-*.${machine}.rpm rpm -ivh nice-dcv-server-*.${machine}.rpm rpm -ivh nice-dcv-web-viewer-*.${machine}.rpm - {% elif context.base_os in ('rhel7', 'centos7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') -%} + {%- elif context.base_os in ('rhel8', 'rhel9', 'rocky8', 'rocky9') %} rpm -ivh nice-xdcv-*.${machine}.rpm --nodeps rpm -ivh nice-dcv-server-*.${machine}.rpm --nodeps rpm -ivh nice-dcv-web-viewer-*.${machine}.rpm --nodeps - {% endif -%} - - {% if context.is_gpu_instance_type() -%} - if [[ $machine == "x86_64" ]]; then - echo "Detected GPU instance, adding support for nice-dcv-gl" - rpm -ivh nice-dcv-gl*.x86_64.rpm - fi - {% endif -%} + {%- elif context.base_os in ('ubuntu2204') %} + dpkg -i nice-xdcv_*.deb + dpkg -i nice-dcv-server_*.deb + dpkg -i nice-dcv-web-viewer_*.deb + usermod -aG video dcv + {% endif %} + popd rm -rf nice-dcv-${DCV_SERVER_VERSION} rm -rf ${DCV_SERVER_TGZ} @@ -144,10 +165,14 @@ fi {% if context.base_os == 'amazonlinux2' %} echo "Base os is {{ context.base_os }}. No need for firewall disabling" -{% else %} +{% elif context.base_os in ('rhel8', 'rhel9', 'rocky8', 'rocky9') %} # RHEL 7.x/8.x and CentOS 7.x/8.x systemctl stop firewalld systemctl disable firewalld -{% endif -%} +{% elif context.base_os in ('ubuntu2204') %} + # Ubuntu + systemctl stop ufw + systemctl disable ufw +{% endif %} # End: DCV Server diff --git a/source/idea/idea-bootstrap/_templates/linux/dcv_session_manager_agent.jinja2 b/source/idea/idea-bootstrap/_templates/linux/dcv_session_manager_agent.jinja2 index 882380b..6f8a8e4 100644 --- a/source/idea/idea-bootstrap/_templates/linux/dcv_session_manager_agent.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/dcv_session_manager_agent.jinja2 @@ -1,7 +1,7 @@ # BEGIN: DCV Session Manager Agent DCV_GPG_KEY_DCV_AGENT="{{ context.config.get_string('global-settings.package_config.dcv.gpg_key', required=True) }}" -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7') %} +{%- if context.base_os in ('amazonlinux2') %} DCV_SESSION_MANAGER_AGENT_X86_64_URL="{{ context.config.get_string('global-settings.package_config.dcv.agent.x86_64.linux.al2_rhel_centos7.url', required=True) }}" DCV_SESSION_MANAGER_AGENT_X86_64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.agent.x86_64.linux.al2_rhel_centos7.version', required=True) }}" DCV_SESSION_MANAGER_AGENT_X86_64_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.agent.x86_64.linux.al2_rhel_centos7.sha256sum', required=True) }}" @@ -17,17 +17,31 @@ DCV_SESSION_MANAGER_AGENT_AARCH64_URL="{{ context.config.get_string('global-sett DCV_SESSION_MANAGER_AGENT_AARCH64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.agent.aarch64.linux.rhel_centos_rocky8.version', required=True) }}" DCV_SESSION_MANAGER_AGENT_AARCH64_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.agent.aarch64.linux.rhel_centos_rocky8.sha256sum', required=True) }}" - {%- elif context.base_os in ('rhel9', 'rocky9') %} - DCV_SESSION_MANAGER_AGENT_X86_64_URL="{{ context.config.get_string('global-settings.package_config.dcv.agent.x86_64.linux.rhel_centos_rocky9.url', required=True) }}" - DCV_SESSION_MANAGER_AGENT_X86_64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.agent.x86_64.linux.rhel_centos_rocky9.version', required=True) }}" - DCV_SESSION_MANAGER_AGENT_X86_64_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.agent.x86_64.linux.rhel_centos_rocky9.sha256sum', required=True) }}" - DCV_SESSION_MANAGER_AGENT_AARCH64_URL="{{ context.config.get_string('global-settings.package_config.dcv.agent.aarch64.linux.rhel_centos_rocky9.url', required=True) }}" - DCV_SESSION_MANAGER_AGENT_AARCH64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.agent.aarch64.linux.rhel_centos_rocky9.version', required=True) }}" - DCV_SESSION_MANAGER_AGENT_AARCH64_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.agent.aarch64.linux.rhel_centos_rocky9.sha256sum', required=True) }}" +{%- elif context.base_os in ('rhel9', 'rocky9') %} +DCV_SESSION_MANAGER_AGENT_X86_64_URL="{{ context.config.get_string('global-settings.package_config.dcv.agent.x86_64.linux.rhel_centos_rocky9.url', required=True) }}" +DCV_SESSION_MANAGER_AGENT_X86_64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.agent.x86_64.linux.rhel_centos_rocky9.version', required=True) }}" +DCV_SESSION_MANAGER_AGENT_X86_64_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.agent.x86_64.linux.rhel_centos_rocky9.sha256sum', required=True) }}" +DCV_SESSION_MANAGER_AGENT_AARCH64_URL="{{ context.config.get_string('global-settings.package_config.dcv.agent.aarch64.linux.rhel_centos_rocky9.url', required=True) }}" +DCV_SESSION_MANAGER_AGENT_AARCH64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.agent.aarch64.linux.rhel_centos_rocky9.version', required=True) }}" +DCV_SESSION_MANAGER_AGENT_AARCH64_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.agent.aarch64.linux.rhel_centos_rocky9.sha256sum', required=True) }}" + +{%- elif context.base_os in ('ubuntu2204') %} +DCV_SESSION_MANAGER_AGENT_X86_64_URL="{{ context.config.get_string('global-settings.package_config.dcv.agent.x86_64.linux.ubuntu2204.url', required=True) }}" +DCV_SESSION_MANAGER_AGENT_X86_64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.agent.x86_64.linux.ubuntu2204.version', required=True) }}" +DCV_SESSION_MANAGER_AGENT_X86_64_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.agent.x86_64.linux.ubuntu2204.sha256sum', required=True) }}" +DCV_SESSION_MANAGER_AGENT_AARCH64_URL="{{ context.config.get_string('global-settings.package_config.dcv.agent.aarch64.linux.ubuntu2204.url', required=True) }}" +DCV_SESSION_MANAGER_AGENT_AARCH64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.agent.aarch64.linux.ubuntu2204.version', required=True) }}" +DCV_SESSION_MANAGER_AGENT_AARCH64_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.agent.aarch64.linux.ubuntu2204.sha256sum', required=True) }}" + {%- endif %} -rpm --import ${DCV_GPG_KEY_DCV_AGENT} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +rpm --import ${DCV_GPG_KEY_DCV_SERVER} +{%- elif context.base_os in ('ubuntu2204') %} +curl -fsSL "${DCV_GPG_KEY_DCV_SERVER}" | gpg --dearmor | sudo tee /usr/share/keyrings/dcv.gpg > /dev/null +{%- endif %} + machine=$(uname -m) #x86_64 or aarch64 AGENT_URL="" AGENT_VERSION="" @@ -44,18 +58,30 @@ else AGENT_SHA256_HASH=${DCV_SESSION_MANAGER_AGENT_AARCH64_SHA256_HASH} fi +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} if [[ -z "$(rpm -qa nice-dcv-session-manager-agent)" ]]; then +{%- elif context.base_os in ('ubuntu2204') %} +if [[ -z "$(dpkg -l nice-dcv-session-manager-agent | grep ^ii)" ]]; then +{%- endif %} wget ${AGENT_URL} + {%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} if [[ $(sha256sum nice-dcv-session-manager-agent-${AGENT_VERSION}.rpm | awk '{print $1}') != ${AGENT_SHA256_HASH} ]]; then + {%- elif context.base_os in ('ubuntu2204') %} + if [[ $(sha256sum nice-dcv-session-manager-agent_${AGENT_VERSION}.deb | awk '{print $1}') != ${AGENT_SHA256_HASH} ]]; then + {%- endif %} echo -e "FATAL ERROR: Checksum for DCV Session Manager Agent failed. File may be compromised." > /etc/motd exit 1 fi + {%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} yum install -y nice-dcv-session-manager-agent-${AGENT_VERSION}.rpm + {%- elif context.base_os in ('ubuntu2204') %} + dpkg -i nice-dcv-session-manager-agent_${AGENT_VERSION}.deb + {%- endif %} else log_info "Found nice-dcv-session-manager-agent pre-installed... skipping installation..." fi log_info "# installing dcv agent complete ..." -rm -rf nice-dcv-session-manager-agent-${AGENT_VERSION}.rpm +rm -rf nice-dcv-session-manager-agent*.* # END: DCV Session Manager Agent diff --git a/source/idea/idea-bootstrap/_templates/linux/disable_auto_upgrades.jinja2 b/source/idea/idea-bootstrap/_templates/linux/disable_auto_upgrades.jinja2 new file mode 100644 index 0000000..915c65c --- /dev/null +++ b/source/idea/idea-bootstrap/_templates/linux/disable_auto_upgrades.jinja2 @@ -0,0 +1,12 @@ +{% if context.base_os in ('ubuntu2204') %} +tee /etc/apt/apt.conf.d/20auto-upgrades > /dev/null << EOF +APT::Periodic::Update-Package-Lists "0"; +APT::Periodic::Download-Upgradeable-Packages "0"; +APT::Periodic::AutocleanInterval "0"; +APT::Periodic::Unattended-Upgrade "0"; +EOF + + +apt-mark hold linux-image-aws linux-aws linux-headers-aws + +{% endif %} \ No newline at end of file diff --git a/source/idea/idea-bootstrap/_templates/linux/disable_nouveau_drivers.jinja2 b/source/idea/idea-bootstrap/_templates/linux/disable_nouveau_drivers.jinja2 index 9332574..6b66c87 100644 --- a/source/idea/idea-bootstrap/_templates/linux/disable_nouveau_drivers.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/disable_nouveau_drivers.jinja2 @@ -1,6 +1,6 @@ {%- if context.is_nvidia_gpu() %} # Begin: Disable NVIDIA Nouveau Drivers - Is GPU Instance Type: {{ context.is_gpu_instance_type() }}, Is NVIDIA GPU: {{ context.is_nvidia_gpu() }} -{%- if context.base_os in ('centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('rhel8', 'rhel9', 'rocky8', 'rocky9', 'ubuntu2204') %} grep -q "rdblacklist=nouveau" /etc/default/grub if [[ "$?" != "0" ]]; then log_info "Disabling the nouveau open source driver for NVIDIA graphics cards" @@ -12,8 +12,11 @@ blacklist nvidiafb blacklist rivatv EOF echo GRUB_CMDLINE_LINUX="rdblacklist=nouveau" >> /etc/default/grub + {%- if context.base_os in ('rhel8', 'rhel9', 'rocky8', 'rocky9') %} grub2-mkconfig -o /boot/grub2/grub.cfg - + {%- elif context.base_os in ('ubuntu2204') %} + update-grub + {%- endif %} set_reboot_required "Disable NVIDIA Nouveau Drivers" fi {%- else %} diff --git a/source/idea/idea-bootstrap/_templates/linux/disable_se_linux.jinja2 b/source/idea/idea-bootstrap/_templates/linux/disable_se_linux.jinja2 index 6855fcf..aed5a6c 100644 --- a/source/idea/idea-bootstrap/_templates/linux/disable_se_linux.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/disable_se_linux.jinja2 @@ -1,4 +1,4 @@ -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} # Begin: Disable SE Linux sestatus | grep -q "disabled" if [[ "$?" != "0" ]]; then diff --git a/source/idea/idea-bootstrap/_templates/linux/disable_strict_host_check.jinja2 b/source/idea/idea-bootstrap/_templates/linux/disable_strict_host_check.jinja2 index 2cc5dd0..8b603a3 100644 --- a/source/idea/idea-bootstrap/_templates/linux/disable_strict_host_check.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/disable_strict_host_check.jinja2 @@ -1,5 +1,5 @@ # Begin: Disable Strict Host Check -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9', 'ubuntu2204') %} echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config echo "UserKnownHostsFile /dev/null" >> /etc/ssh/ssh_config {%- endif %} diff --git a/source/idea/idea-bootstrap/_templates/linux/disable_ulimit.jinja2 b/source/idea/idea-bootstrap/_templates/linux/disable_ulimit.jinja2 index 381c1e2..480a1de 100644 --- a/source/idea/idea-bootstrap/_templates/linux/disable_ulimit.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/disable_ulimit.jinja2 @@ -1,5 +1,5 @@ # Begin: Disable ulimit -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9', 'ubuntu2204') %} echo -e " * hard memlock unlimited * soft memlock unlimited diff --git a/source/idea/idea-bootstrap/_templates/linux/efs_mount_helper.jinja2 b/source/idea/idea-bootstrap/_templates/linux/efs_mount_helper.jinja2 index 6904a1a..9b12d7d 100644 --- a/source/idea/idea-bootstrap/_templates/linux/efs_mount_helper.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/efs_mount_helper.jinja2 @@ -1,8 +1,8 @@ # Begin: AWS EFS Mount Helper installation -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{% include '_templates/linux/stunnel.jinja2' %} - {% include '_templates/linux/stunnel.jinja2' %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} function install_efs_mount_helper () { which amazon-efs-mount-watchdog > /dev/null 2>&1 @@ -10,11 +10,9 @@ function install_efs_mount_helper () { log_info "Installing Amazon EFS Mount Helper for {{ context.base_os }}" {%- if context.base_os in ('amazonlinux2') %} yum install -y amazon-efs-utils - {%- elif context.base_os in ('centos7','rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} + {%- elif context.base_os in ('rhel8', 'rhel9', 'rocky8', 'rocky9') %} log_info "Installing Amazon EFS Mount Helper from Github" - {%- if context.base_os in ('rhel7', 'centos7') %} - yum -y install git make - {%- elif context.base_os in ('rhel8', 'rhel9', 'rocky8', 'rocky9') %} + {%- if context.base_os in ('rhel8', 'rhel9', 'rocky8', 'rocky9') %} yum -y install git make rpm-build {%- endif %} git clone https://github.com/aws/efs-utils @@ -29,4 +27,18 @@ function install_efs_mount_helper () { install_efs_mount_helper {%- endif %} +{%- if context.base_os in ('ubuntu2204') %} + +if [[ -z "$(dpkg -l amazon-efs-utils | grep ^ii)" ]]; then + apt install -y build-essential pkg-config cargo libssl-dev + git clone https://github.com/aws/efs-utils + cd efs-utils + ./build-deb.sh + apt -y install ./build/amazon-efs-utils*.deb +else + log_info "Found existing Amazon EFS Mount Helper on system" +fi + +{%- endif %} + # End: AWS EFS Mount Helper diff --git a/source/idea/idea-bootstrap/_templates/linux/epel_repo.jinja2 b/source/idea/idea-bootstrap/_templates/linux/epel_repo.jinja2 index 481f703..57f406f 100644 --- a/source/idea/idea-bootstrap/_templates/linux/epel_repo.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/epel_repo.jinja2 @@ -5,16 +5,11 @@ if [[ ! -f "/etc/yum.repos.d/epel.repo" ]]; then yum update --security -y fi {%- endif %} -{%- if context.base_os in ('centos7', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('rocky8', 'rocky9') %} if [[ ! -f "/etc/yum.repos.d/epel.repo" ]]; then yum -y install epel-release fi {%- endif %} -{%- if context.base_os == 'rhel7' %} -if [[ ! -f "/etc/yum.repos.d/epel.repo" ]]; then - yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -fi -{%- endif %} {%- if context.base_os == 'rhel8' %} if [[ ! -f "/etc/yum.repos.d/epel.repo" ]]; then yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm diff --git a/source/idea/idea-bootstrap/_templates/linux/fsx_lustre_client.jinja2 b/source/idea/idea-bootstrap/_templates/linux/fsx_lustre_client.jinja2 index 44580c3..a356933 100644 --- a/source/idea/idea-bootstrap/_templates/linux/fsx_lustre_client.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/fsx_lustre_client.jinja2 @@ -3,46 +3,6 @@ if [[ -z "$(rpm -qa lustre-client)" ]]; then amazon-linux-extras install -y lustre fi -{%- elif context.base_os in ('centos7', 'rhel7') %} -if [[ -z "$(rpm -qa lustre-client)" ]]; then - kernel=$(uname -r) - machine=$(uname -m) - log_info "Found kernel version: $kernel running on: $machine" - if [[ $kernel == *"3.10.0-1160"*$machine ]]; then - wget https://fsx-lustre-client-repo-public-keys.s3.amazonaws.com/fsx-rpm-public-key.asc -O /tmp/fsx-rpm-public-key.asc - rpm --import /tmp/fsx-rpm-public-key.asc - wget https://fsx-lustre-client-repo.s3.amazonaws.com/el/7/fsx-lustre-client.repo -O /etc/yum.repos.d/aws-fsx.repo - yum install -y kmod-lustre-client lustre-client - set_reboot_required "FSx for Lustre client installed" - elif [[ $kernel == *"3.10.0-1127"*$machine ]]; then - wget https://fsx-lustre-client-repo-public-keys.s3.amazonaws.com/fsx-rpm-public-key.asc -O /tmp/fsx-rpm-public-key.asc - rpm --import /tmp/fsx-rpm-public-key.asc - wget https://fsx-lustre-client-repo.s3.amazonaws.com/el/7/fsx-lustre-client.repo -O /etc/yum.repos.d/aws-fsx.repo - sed -i 's#7#7.8#' /etc/yum.repos.d/aws-fsx.repo - yum install -y kmod-lustre-client lustre-client - set_reboot_required "FSx for Lustre client installed" - elif [[ $kernel == *"3.10.0-1062"*$machine ]]; then - wget https://fsx-lustre-client-repo-public-keys.s3.amazonaws.com/fsx-rpm-public-key.asc -O /tmp/fsx-rpm-public-key.asc - rpm --import /tmp/fsx-rpm-public-key.asc - wget https://fsx-lustre-client-repo.s3.amazonaws.com/el/7/fsx-lustre-client.repo -O /etc/yum.repos.d/aws-fsx.repo - sed -i 's#7#7.7#' /etc/yum.repos.d/aws-fsx.repo - yum install -y kmod-lustre-client lustre-client - set_reboot_required "FSx for Lustre client installed" - elif [[ $kernel == *"3.10.0-957"*$machine ]]; then - yum -y install https://downloads.whamcloud.com/public/lustre/lustre-2.12.9/el7/client/RPMS/x86_64/kmod-lustre-client-2.12.9-1.el7.x86_64.rpm - yum -y install https://downloads.whamcloud.com/public/lustre/lustre-2.12.9/el7/client/RPMS/x86_64/lustre-client-2.12.9-1.el7.x86_64.rpm - set_reboot_required "FSx for Lustre client installed" - elif [[ $kernel == *"4.18.0-193"*$machine ]]; then - # FSX for Lustre on aarch64 is supported only on 4.18.0-193 - wget https://fsx-lustre-client-repo-public-keys.s3.amazonaws.com/fsx-rpm-public-key.asc -O /tmp/fsx-rpm-public-key.asc - rpm --import /tmp/fsx-rpm-public-key.asc - wget https://fsx-lustre-client-repo.s3.amazonaws.com/centos/7/fsx-lustre-client.repo -O /etc/yum.repos.d/aws-fsx.repo - yum install -y kmod-lustre-client lustre-client - set_reboot_required "FSx for Lustre client installed" - else - log_error "Can't install FSx for Lustre client as kernel version: $kernel isn't matching expected versions: (x86_64: 3.10.0-957, -1062, -1127, -1160, aarch64: 4.18.0-193)!" - fi -fi {%- endif %} {%- if context.base_os in ('rhel8', 'rocky8') %} if [[ -z "$(rpm -qa lustre-client)" ]]; then @@ -102,7 +62,52 @@ if [[ -z "$(rpm -qa lustre-client)" ]]; then fi fi {%- endif %} +{%- if context.base_os in ('rhel9') %} +if [[ -z "$(rpm -qa lustre-client)" ]]; then + kernel=$(uname -r) + machine=$(uname -m) + log_info "Found kernel version: $kernel running on: $machine" + if [[ $kernel == *"5.14.0-427"*$machine ]]; then + curl https://fsx-lustre-client-repo-public-keys.s3.amazonaws.com/fsx-rpm-public-key.asc -o /tmp/fsx-rpm-public-key.asc + sudo rpm --import /tmp/fsx-rpm-public-key.asc + sudo curl https://fsx-lustre-client-repo.s3.amazonaws.com/el/9/fsx-lustre-client.repo -o /etc/yum.repos.d/aws-fsx.repo + sudo sed -i 's#9#9.4#' /etc/yum.repos.d/aws-fsx.repo + sudo yum clean all + sudo yum install -y kmod-lustre-client lustre-client + set_reboot_required "FSx for Lustre client installed" + elif [[ $kernel == *"5.14.0-362"*$machine ]]; then + curl https://fsx-lustre-client-repo-public-keys.s3.amazonaws.com/fsx-rpm-public-key.asc -o /tmp/fsx-rpm-public-key.asc + sudo rpm --import /tmp/fsx-rpm-public-key.asc + sudo curl https://fsx-lustre-client-repo.s3.amazonaws.com/el/9/fsx-lustre-client.repo -o /etc/yum.repos.d/aws-fsx.repo + sudo sed -i 's#9#9.3#' /etc/yum.repos.d/aws-fsx.repo + sudo yum clean all + sudo yum install -y kmod-lustre-client lustre-client + set_reboot_required "FSx for Lustre client installed" + elif [[ $kernel == *"5.14.0-70"*$machine ]]; then + curl https://fsx-lustre-client-repo-public-keys.s3.amazonaws.com/fsx-rpm-public-key.asc -o /tmp/fsx-rpm-public-key.asc + sudo rpm --import /tmp/fsx-rpm-public-key.asc + sudo curl https://fsx-lustre-client-repo.s3.amazonaws.com/el/8/fsx-lustre-client.repo -o /etc/yum.repos.d/aws-fsx.repo + sudo sed -i 's#9#9.0#' /etc/yum.repos.d/aws-fsx.repo + sudo yum clean all + sudo yum install -y kmod-lustre-client lustre-client + set_reboot_required "FSx for Lustre client installed" + else + log_error "Can't install FSx for Lustre client as kernel version $kernel isn't matching expected versions: (x86_64: 5.14.0-362, -70)!" + fi +fi +{%- endif %} +{%- if context.base_os in ('ubuntu2204') %} + if [[ -z "$(dpkg -l lustre-client-utils | grep ^ii)" ]]; then + wget -O - https://fsx-lustre-client-repo-public-keys.s3.amazonaws.com/fsx-ubuntu-public-key.asc | gpg --dearmor | sudo tee /usr/share/keyrings/fsx-ubuntu-public-key.gpg >/dev/null + bash -c 'echo "deb [signed-by=/usr/share/keyrings/fsx-ubuntu-public-key.gpg] https://fsx-lustre-client-repo.s3.amazonaws.com/ubuntu jammy main" > /etc/apt/sources.list.d/fsxlustreclientrepo.list && apt update' + kernel=$(uname -r) + DEBIAN_FRONTEND=noninteractive apt install -y lustre-client-modules-$kernel + set_reboot_required "FSx for Lustre client installed" + else + log_info "Lustre Client Already Installed" + fi +{%- endif %} # Performance tuning if [[ -z "$(grep ksocklnd /etc/modprobe.d/modprobe.conf)" ]]; then {% include '_templates/linux/fsx_lustre_client_tuning_prereboot.jinja2' %} diff --git a/source/idea/idea-bootstrap/_templates/linux/fsx_lustre_client_tuning_postmount.jinja2 b/source/idea/idea-bootstrap/_templates/linux/fsx_lustre_client_tuning_postmount.jinja2 index c12ab3b..2554cb5 100644 --- a/source/idea/idea-bootstrap/_templates/linux/fsx_lustre_client_tuning_postmount.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/fsx_lustre_client_tuning_postmount.jinja2 @@ -1,6 +1,6 @@ # Begin: FSx Lustre Client Tuning - Post-Mount # https://docs.aws.amazon.com/fsx/latest/LustreGuide/performance.html#performance-tips -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9', 'ubuntu2204') %} NPROCS=$(nproc) GB_MEM=$(free --si -g | egrep '^Mem:' | awk '{print $2}') log_info "Detected ${NPROCS} CPUs / ${GB_MEM} GiB memory for Lustre performance tuning" diff --git a/source/idea/idea-bootstrap/_templates/linux/fsx_lustre_client_tuning_prereboot.jinja2 b/source/idea/idea-bootstrap/_templates/linux/fsx_lustre_client_tuning_prereboot.jinja2 index 8539c14..4fc4949 100644 --- a/source/idea/idea-bootstrap/_templates/linux/fsx_lustre_client_tuning_prereboot.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/fsx_lustre_client_tuning_prereboot.jinja2 @@ -1,6 +1,6 @@ # Begin: FSx Lustre Client Tuning - Pre-Reboot # https://docs.aws.amazon.com/fsx/latest/LustreGuide/performance.html#performance-tips -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9', 'ubuntu2204') %} NPROCS=$(nproc) GB_MEM=$(free --si -g | egrep '^Mem:' | awk '{print $2}') log_info "Detected ${NPROCS} CPUs / ${GB_MEM} GiB memory for Lustre performance tuning" diff --git a/source/idea/idea-bootstrap/_templates/linux/gpu_drivers.jinja2 b/source/idea/idea-bootstrap/_templates/linux/gpu_drivers.jinja2 index 0b55f4f..f2e3b20 100644 --- a/source/idea/idea-bootstrap/_templates/linux/gpu_drivers.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/gpu_drivers.jinja2 @@ -33,6 +33,8 @@ function install_nvidia_grid_drivers () { log_info "X server configuration for GPU end..." set_reboot_required "Installed NVIDIA Grid Driver" popd + sudo touch /etc/modprobe.d/nvidia.conf + echo "options nvidia NVreg_EnableGpuFirmware=0" | tee --append /etc/modprobe.d/nvidia.conf } function install_nvidia_public_drivers() { @@ -95,8 +97,13 @@ function install_amd_gpu_drivers() { # mkdir -p /root/bootstrap/gpu_drivers pushd /root/bootstrap/gpu_drivers + {% if context.base_os == 'ubuntu2204' -%} + wget https://repo.radeon.com/amdgpu-install/6.0.2/ubuntu/jammy/amdgpu-install_6.0.60002-1_all.deb + DEBIAN_FRONTEND=noninteractive apt install -y ./amdgpu-install_6.0.60002-1_all.deb - {%- if context.base_os in ('rhel7', 'centos7', 'amazonlinux2') %} + amdgpu-install --usecase=workstation --vulkan=pro --opencl=rocr --no-32 -y --accept-eula + {%- endif %} + {%- if context.base_os in ('amazonlinux2') %} local AWS=$(command -v aws) local DRIVER_BUCKET_REGION=$(curl -s --head {{ context.config.get_string('global-settings.gpu_settings.amd.s3_bucket_url', required=True) }} | grep bucket-region | awk '{print $2}' | tr -d '\r\n') $AWS --region ${DRIVER_BUCKET_REGION} s3 cp --quiet --recursive {{ context.config.get_string('global-settings.gpu_settings.amd.s3_bucket_path', required=True) }} . @@ -235,6 +242,15 @@ function install_gpu_drivers () { install_nvidia_public_drivers fi ;; + g6) + log_info "Intel / NVIDIA L4" + # Tesla driver: Yes, GRID driver: Yes + if [[ ${NODE_TYPE} == "dcv" ]]; then + install_nvidia_grid_drivers + else + install_nvidia_public_drivers + fi + ;; g5g) log_info "Arm / NVIDIA T4G" # Tesla driver: Yes, GRID driver: No @@ -270,7 +286,11 @@ function install_gpu_drivers () { ;; esac } + install_gpu_drivers +{%- if context.base_os in ('ubuntu2204') %} +sed -i '/^Section\ "Device"/a \ \ \ \ \option \ \ \ \ \ \ \ \ "HardDPMS" "false"' /etc/X11/xorg.conf +{%- endif %} {%- else %} log_info "GPU InstanceType not detected. Skip." {%- endif %} diff --git a/source/idea/idea-bootstrap/_templates/linux/join_activedirectory.jinja2 b/source/idea/idea-bootstrap/_templates/linux/join_activedirectory.jinja2 index 9a31775..01f3157 100644 --- a/source/idea/idea-bootstrap/_templates/linux/join_activedirectory.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/join_activedirectory.jinja2 @@ -107,6 +107,10 @@ function ad_automation_wait_for_authorization_and_join () { fi } +{% if context.base_os in ('ubuntu2204') %} +sed -i '/kdc_timesync = 1/a\ rdns = false' /etc/krb5.conf +{% endif %} + ad_automation_request_authorization ad_automation_wait_for_authorization_and_join # ad_automation_wait_for_authorization_and_join exports IDEA_HOSTNAME for our Kerberos info diff --git a/source/idea/idea-bootstrap/_templates/linux/join_openldap.jinja2 b/source/idea/idea-bootstrap/_templates/linux/join_openldap.jinja2 index ff34c56..d9f1418 100644 --- a/source/idea/idea-bootstrap/_templates/linux/join_openldap.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/join_openldap.jinja2 @@ -68,7 +68,7 @@ mkdir -p /etc/openldap/cacerts/ DS_TLS_CERTIFICATE=$(get_secret "${IDEA_DS_TLS_CERTIFICATE_SECRET_ARN}") echo -n "${DS_TLS_CERTIFICATE}" > /etc/openldap/cacerts/openldap-server.pem -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7') %} +{%- if context.base_os in ('amazonlinux2') %} authconfig --disablesssd \ --disablesssdauth \ --disableldap \ @@ -108,6 +108,9 @@ authselect select sssd with-mkhomedir --force systemctl enable oddjobd systemctl restart oddjobd {%- endif %} +{%- if context.base_os in ('ubuntu2204') %} +pam-auth-update --enable sss +{%- endif %} systemctl enable sssd systemctl restart sssd diff --git a/source/idea/idea-bootstrap/_templates/linux/jq.jinja2 b/source/idea/idea-bootstrap/_templates/linux/jq.jinja2 index 4989c8d..0a861b8 100644 --- a/source/idea/idea-bootstrap/_templates/linux/jq.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/jq.jinja2 @@ -1,11 +1,19 @@ # Begin: Install jq -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} which jq > /dev/null 2>&1 if [[ "$?" != "0" ]]; then log_info "installing jq" yum install -y jq fi {%- endif %} +{%- if context.base_os in ('ubuntu2204') %} +which jq > /dev/null 2>&1 +if [[ "$?" != "0" ]]; then + log_info "installing jq" + apt install -y jq +fi +{%- endif %} + # End: Install jq diff --git a/source/idea/idea-bootstrap/_templates/linux/motd.jinja2 b/source/idea/idea-bootstrap/_templates/linux/motd.jinja2 index 3e3e441..43799b1 100644 --- a/source/idea/idea-bootstrap/_templates/linux/motd.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/motd.jinja2 @@ -1,5 +1,5 @@ # Begin: motd update -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9', 'ubuntu2204') %} echo -e " ________ _________ / _/ __ \/ ____/ | diff --git a/source/idea/idea-bootstrap/_templates/linux/mount_shared_storage.jinja2 b/source/idea/idea-bootstrap/_templates/linux/mount_shared_storage.jinja2 index e12d8ae..9fefc7f 100644 --- a/source/idea/idea-bootstrap/_templates/linux/mount_shared_storage.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/mount_shared_storage.jinja2 @@ -1,5 +1,5 @@ # Begin: Mount Shared Storage -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9', 'ubuntu2204') %} {%- if context.has_storage_provider('fsx_lustre') or context.has_storage_provider('fsx_cache') %} {% include '_templates/linux/fsx_lustre_client.jinja2' %} {%- endif %} diff --git a/source/idea/idea-bootstrap/_templates/linux/nfs_utils.jinja2 b/source/idea/idea-bootstrap/_templates/linux/nfs_utils.jinja2 index b5b49e2..f55f73d 100644 --- a/source/idea/idea-bootstrap/_templates/linux/nfs_utils.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/nfs_utils.jinja2 @@ -1,12 +1,19 @@ # Begin: NFS Utils and dependency items -{%- if context.base_os in ('centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('rhel8', 'rhel9', 'rocky8', 'rocky9') %} if [[ -z "$(rpm -qa nfs-utils)" ]]; then log_info "# installing nfs-utils" yum install -y nfs-utils fi {%- endif %} +{%- if context.base_os in ('ubuntu2204') %} +if [[ -z "$(dpkg -l nfs-common | grep ^ii)" ]]; then + log_info "# installing nfs-common" + apt update && apt install -y nfs-common +fi +{%- endif %} + {% include '_templates/linux/efs_mount_helper.jinja2' %} # End: NFS Utils diff --git a/source/idea/idea-bootstrap/_templates/linux/openpbs.jinja2 b/source/idea/idea-bootstrap/_templates/linux/openpbs.jinja2 index 617e39c..94bb26f 100644 --- a/source/idea/idea-bootstrap/_templates/linux/openpbs.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/openpbs.jinja2 @@ -1,5 +1,5 @@ # Begin: Install OpenPBS -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9', 'ubuntu2204') %} {%- if context.config.get_string('global-settings.package_config.openpbs.type') == 'release' %} function install_openpbs () { local OPENPBS_VERSION="{{ context.config.get_string('global-settings.package_config.openpbs.version', required=True) }}" @@ -18,12 +18,12 @@ function install_openpbs () { log_info "OpenPBS not detected or incorrect version, Installing OpenPBS version: ${OPENPBS_VERSION}..." OPENPBS_PKGS="{{ ' '.join(context.config.get_list('global-settings.package_config.openpbs.packages')) }}" - {%- if context.base_os == 'rhel7' %} - yum install -y $(echo ${OPENPBS_PKGS[*]}) --enablerepo rhel-7-server-rhui-optional-rpms - {%- endif %} - {%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} + {%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} yum install -y $(echo ${OPENPBS_PKGS[*]}) {%- endif %} + {%- if context.base_os in ('ubuntu2204') %} + apt install -y $(echo ${OPENPBS_PKGS[*]}) + {%- endif %} mkdir -p "${OPENPBS_WORK_DIR}" pushd ${OPENPBS_WORK_DIR} # ADD A WAITER SO THAT IF CONNECTION IS THROTTLED WE CAN CONTINUE AFTER WAITING. @@ -62,12 +62,12 @@ function install_openpbs () { log_info "OpenPBS Not Detected, Installing OpenPBS ..." OPENPBS_PKGS="{{ ' '.join(context.config.get_list('global-settings.package_config.openpbs.packages')) }}" - {%- if context.base_os == 'rhel7' %} - yum install -y $(echo ${OPENPBS_PKGS[*]}) --enablerepo rhel-7-server-rhui-optional-rpms - {%- endif %} - {%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} + {%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} yum install -y $(echo ${OPENPBS_PKGS[*]}) {%- endif %} + {%- if context.base_os in ('ubuntu2204') %} + apt install -y $(echo ${OPENPBS_PKGS[*]}) + {%- endif %} mkdir -p "${OPENPBS_WORK_DIR}" pushd ${OPENPBS_WORK_DIR} git clone https://github.com/openpbs/openpbs.git diff --git a/source/idea/idea-bootstrap/_templates/linux/openpbs_client.jinja2 b/source/idea/idea-bootstrap/_templates/linux/openpbs_client.jinja2 index 30b5156..a936f65 100644 --- a/source/idea/idea-bootstrap/_templates/linux/openpbs_client.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/openpbs_client.jinja2 @@ -20,4 +20,7 @@ echo -e " systemctl start pbs systemctl enable pbs + +echo 'source /etc/profile.d/pbs.sh >/dev/null 2>&1' >> /etc/bash.bashrc + # End: OpenPBS Client diff --git a/source/idea/idea-bootstrap/_templates/linux/prometheus.jinja2 b/source/idea/idea-bootstrap/_templates/linux/prometheus.jinja2 index 73da1f8..1afffa4 100644 --- a/source/idea/idea-bootstrap/_templates/linux/prometheus.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/prometheus.jinja2 @@ -1,5 +1,5 @@ # Begin: Install Prometheus -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9', 'ubuntu2204') %} PROMETHEUS_AMD64_URL="{{ context.config.get_string('global-settings.package_config.prometheus.installer.linux.x86_64', required=True) }}" PROMETHEUS_ARM64_URL="{{ context.config.get_string('global-settings.package_config.prometheus.installer.linux.aarch64', required=True) }}" function install_prometheus () { diff --git a/source/idea/idea-bootstrap/_templates/linux/prometheus_node_exporter.jinja2 b/source/idea/idea-bootstrap/_templates/linux/prometheus_node_exporter.jinja2 index 103e505..172223e 100644 --- a/source/idea/idea-bootstrap/_templates/linux/prometheus_node_exporter.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/prometheus_node_exporter.jinja2 @@ -1,5 +1,5 @@ # Begin: Install Prometheus Node Exporter -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') and context.is_prometheus_exporter_enabled('node_exporter') %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9', 'ubuntu2204') and context.is_prometheus_exporter_enabled('node_exporter') %} PROMETHEUS_NODE_EXPORTER_AMD64_URL="{{ context.config.get_string('global-settings.package_config.prometheus.exporters.node_exporter.linux.x86_64', required=True) }}" PROMETHEUS_NODE_EXPORTER_ARM64_URL="{{ context.config.get_string('global-settings.package_config.prometheus.exporters.node_exporter.linux.aarch64', required=True) }}" function install_prometheus_node_exporter () { diff --git a/source/idea/idea-bootstrap/_templates/linux/stunnel.jinja2 b/source/idea/idea-bootstrap/_templates/linux/stunnel.jinja2 index c404cb5..31dd690 100644 --- a/source/idea/idea-bootstrap/_templates/linux/stunnel.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/stunnel.jinja2 @@ -4,11 +4,11 @@ # https://docs.aws.amazon.com/efs/latest/ug/encryption-in-transit.html # Mounts will appear connecting to localhost / '127.0.0.1' as they are tunneled in TLS. # -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9',) %} function install_stunnel () { {%- if context.base_os in ('amazonlinux2') %} STUNNEL_CMD='stunnel5' - {%- elif context.base_os in ('centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} + {%- elif context.base_os in ('rhel8', 'rhel9', 'rocky8', 'rocky9', 'ubuntu2204') %} STUNNEL_CMD='stunnel' {%- endif %} which ${STUNNEL_CMD} > /dev/null 2>&1 @@ -29,5 +29,17 @@ fi } install_stunnel -{%- endif %} + +{% elif context.base_os in ('ubuntu2204',) %} + +if [[ -z "$(dpkg -l stunnel4 | grep ^ii)" ]]; then + apt update + apt install -y stunnel4 +else + log_info "Found existing stunnel on system" +fi + +{% endif %} + + # End: Install stunnel diff --git a/source/idea/idea-bootstrap/_templates/linux/sudoer_secure_path.jinja2 b/source/idea/idea-bootstrap/_templates/linux/sudoer_secure_path.jinja2 index a303607..9cc19e6 100644 --- a/source/idea/idea-bootstrap/_templates/linux/sudoer_secure_path.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/sudoer_secure_path.jinja2 @@ -1,6 +1,6 @@ # Begin: Update Sudoer Secure Path # Enables sudo users to execute commands on this path. -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9', 'ubuntu2204') %} echo 'Defaults secure_path="{{ secure_path }}"' > /etc/sudoers.d/secure_path {%- endif %} # End: Update Sudoer Secure Path diff --git a/source/idea/idea-bootstrap/_templates/linux/system_packages.jinja2 b/source/idea/idea-bootstrap/_templates/linux/system_packages.jinja2 index 1d7c56c..78321ac 100644 --- a/source/idea/idea-bootstrap/_templates/linux/system_packages.jinja2 +++ b/source/idea/idea-bootstrap/_templates/linux/system_packages.jinja2 @@ -1,76 +1,100 @@ # Begin: System Packages Install SYSTEM_PKGS=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.system', required=True)) }}) +SYSTEM_PKGS_DEB=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.system_deb', required=True)) }}) + SYSTEM_PKGS_7=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.system_7', required=True)) }}) SYSTEM_PKGS_8=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.system_8', required=True)) }}) SYSTEM_PKGS_9=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.system_9', required=True)) }}) APPLICATION_PKGS=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.application', required=True)) }}) +APPLICATION_PKGS_DEB=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.application_deb', required=True)) }}) + APPLICATION_PKGS_7=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.application_7', required=True)) }}) APPLICATION_PKGS_8=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.application_8', required=True)) }}) + SSSD_PKGS=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.sssd', required=True)) }}) -SSSD_PKGS_7=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.sssd_7', required=True)) }}) -OPENLDAP_CLIENT_PKGS=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.openldap_client', required=True)) }}) +SSSD_PKGS_DEB=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.sssd_deb', required=True)) }}) -DEFAULT_PACKAGES_FOR_ALL_OS=$(echo ${SYSTEM_PKGS[*]} ${APPLICATION_PKGS[*]} ${SSSD_PKGS[*]} ${OPENLDAP_CLIENT_PKGS[*]}) +SSSD_PKGS_7=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.sssd_7', required=True)) }}) -{%- if context.base_os == 'rhel7' %} - yum install -y $DEFAULT_PACKAGES_FOR_ALL_OS $(echo ${SYSTEM_PKGS_7[*]} ${APPLICATION_PKGS_7[*]} ${SSSD_PKGS_7[*]}) --enablerepo rhel-7-server-rhui-optional-rpms -{%- elif context.base_os in ('amazonlinux2', 'centos7') %} - yum install -y $DEFAULT_PACKAGES_FOR_ALL_OS $(echo ${SYSTEM_PKGS_7[*]} ${APPLICATION_PKGS_7[*]} ${SSSD_PKGS_7[*]}) -{%- elif context.base_os in ('rhel8', 'rhel9', 'rocky8', 'rocky9') %} - dnf install -y dnf-plugins-core - {%- if context.base_os == 'rhel8' %} - dnf config-manager --set-enabled codeready-builder-for-rhel-8-rhui-rpms - ADDITIONAL_PKGS_TO_INSTALL=$(echo ${SYSTEM_PKGS_8[*]} ${APPLICATION_PKGS_8[*]}) +OPENLDAP_CLIENT_PKGS=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.openldap_client', required=True)) }}) +OPENLDAP_CLIENT_PKGS_DEB=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.openldap_client_deb', required=True)) }}) + +DEFAULT_PACKAGES_FOR_RPM=$(echo ${SYSTEM_PKGS[*]} ${APPLICATION_PKGS[*]} ${SSSD_PKGS[*]} ${OPENLDAP_CLIENT_PKGS[*]}) +DEFAULT_PACKAGES_FOR_DEB=$(echo ${SYSTEM_PKGS_DEB[*]} ${APPLICATION_PKGS_DEB[*]} ${SSSD_PKGS_DEB[*]} ${OPENLDAP_CLIENT_PKGS_DEB[*]}) + +{%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} + {%- if context.base_os in ('amazonlinux2') %} + yum install -y $DEFAULT_PACKAGES_FOR_RPM $(echo ${SYSTEM_PKGS_7[*]} ${APPLICATION_PKGS_7[*]} ${SSSD_PKGS_7[*]}) + {%- elif context.base_os in ('rhel8', 'rhel9', 'rocky8', 'rocky9') %} + dnf install -y dnf-plugins-core + + {%- if context.base_os == 'rhel8' %} + dnf config-manager --set-enabled codeready-builder-for-rhel-8-rhui-rpms + ADDITIONAL_PKGS_TO_INSTALL=$(echo ${SYSTEM_PKGS_8[*]} ${APPLICATION_PKGS_8[*]}) + + {%- elif context.base_os == 'rhel9' %} + dnf config-manager --set-enabled codeready-builder-for-rhel-9-rhui-rpms + ADDITIONAL_PKGS_TO_INSTALL=$(echo ${SYSTEM_PKGS_9[*]}) + + {%- elif context.base_os == 'rocky8' %} + dnf config-manager --set-enabled powertools + ADDITIONAL_PKGS_TO_INSTALL=$(echo ${SYSTEM_PKGS_8[*]} ${APPLICATION_PKGS_8[*]}) + + {%- elif context.base_os == 'rocky9' %} + # PowerTool is known as crb on Rocky9 https://wiki.rockylinux.org/rocky/repo/#notes-on-crb + dnf config-manager --set-enabled crb + ADDITIONAL_PKGS_TO_INSTALL=$(echo ${SYSTEM_PKGS_9[*]}) + {%- endif %} + + EXCLUDE=() + + {%- if context.is_amd_gpu() %} + # Don't upgrade the kernel and kernel packages to higher versions as AMD GPU driver support is dependent on the kernel version + EXCLUDE+=('kernel*el8_8*' 'kernel*el9_2*') + {%- endif %} + + {%- if context.job_has_param('enable_efa_support') %} + # EFA installer provides an older version of this library + EXCLUDE+=() + {%- endif %} + + printf -v EXCLUDE_JOINED '%s,' "${EXCLUDE[@]}" + command="dnf --exclude=${EXCLUDE_JOINED%,} install -y $DEFAULT_PACKAGES_FOR_RPM $ADDITIONAL_PKGS_TO_INSTALL" + MAX_ATTEMPT=10 + CURRENT_ATTEMPT=0 + SLEEP_INTERVAL=5 + while ! ($command); do + ((CURRENT_ATTEMPT=CURRENT_ATTEMPT+1)) + if [[ $CURRENT_ATTEMPT -ge $MAX_ATTEMPT ]]; then + echo "Error: unable to execute dnf install command: $command" + break + fi + sleep $SLEEP_INTERVAL + done + systemctl enable hibinit-agent + {%- endif %} - {%- elif context.base_os == 'rhel9' %} - dnf config-manager --set-enabled codeready-builder-for-rhel-9-rhui-rpms - ADDITIONAL_PKGS_TO_INSTALL=$(echo ${SYSTEM_PKGS_9[*]}) + if [[ $(rpm -qa kernel | wc -l) -gt "1" ]]; then + set_reboot_required "Updated kernel installed" + fi +{%- endif %} - {%- elif context.base_os == 'rocky8' %} - dnf config-manager --set-enabled powertools - ADDITIONAL_PKGS_TO_INSTALL=$(echo ${SYSTEM_PKGS_8[*]} ${APPLICATION_PKGS_8[*]}) - {%- elif context.base_os == 'rocky9' %} - # PowerTool is known as crb on Rocky9 https://wiki.rockylinux.org/rocky/repo/#notes-on-crb - dnf config-manager --set-enabled crb - ADDITIONAL_PKGS_TO_INSTALL=$(echo ${SYSTEM_PKGS_9[*]}) - {%- endif %} +{%- if context.base_os in ('ubuntu2204') %} + DEBIAN_FRONTEND=noninteractive apt install -yq $DEFAULT_PACKAGES_FOR_DEB - EXCLUDE=() + if [[ $(dpkg -l | grep linux-image | wc -l) -gt "2" ]]; then + set_reboot_required "Updated kernel installed" + fi - {%- if context.is_amd_gpu() %} - # Don't upgrade the kernel and kernel packages to higher versions as AMD GPU driver support is dependent on the kernel version - EXCLUDE+=('kernel*el8_8*' 'kernel*el9_2*') - {%- endif %} +{%- endif %} - {%- if context.job_has_param('enable_efa_support') %} - # EFA installer provides an older version of this library - EXCLUDE+=() - {%- endif %} - printf -v EXCLUDE_JOINED '%s,' "${EXCLUDE[@]}" - command="dnf --exclude=${EXCLUDE_JOINED%,} install -y $DEFAULT_PACKAGES_FOR_ALL_OS $ADDITIONAL_PKGS_TO_INSTALL" - MAX_ATTEMPT=10 - CURRENT_ATTEMPT=0 - SLEEP_INTERVAL=5 - while ! ($command); do - ((CURRENT_ATTEMPT=CURRENT_ATTEMPT+1)) - if [[ $CURRENT_ATTEMPT -ge $MAX_ATTEMPT ]]; then - echo "Error: unable to execute dnf install command: $command" - break - fi - sleep $SLEEP_INTERVAL - done - systemctl enable hibinit-agent -{%- endif %} -if [[ $(rpm -qa kernel | wc -l) -gt "1" ]]; then - set_reboot_required "Updated kernel installed" -fi # End: System Packages Install diff --git a/source/idea/idea-bootstrap/_templates/linux/system_upgrade.jinja2 b/source/idea/idea-bootstrap/_templates/linux/system_upgrade.jinja2 new file mode 100644 index 0000000..6e1139b --- /dev/null +++ b/source/idea/idea-bootstrap/_templates/linux/system_upgrade.jinja2 @@ -0,0 +1,5 @@ +{% if context.base_os in ('ubuntu2204') %} +apt update +apt upgrade -y +set_reboot_required "Packages Upgraded" +{% endif %} \ No newline at end of file diff --git a/source/idea/idea-bootstrap/_templates/linux/systemd_resolved.jinja2 b/source/idea/idea-bootstrap/_templates/linux/systemd_resolved.jinja2 new file mode 100644 index 0000000..b68e8f9 --- /dev/null +++ b/source/idea/idea-bootstrap/_templates/linux/systemd_resolved.jinja2 @@ -0,0 +1,4 @@ +{%- if context.base_os in ('ubuntu2204') %} +echo "DNSStubListener=no" >> /etc/systemd/resolved.conf +systemctl restart systemd-resolved +{%- endif %} \ No newline at end of file diff --git a/source/idea/idea-bootstrap/dcv-broker/install_app.sh.jinja2 b/source/idea/idea-bootstrap/dcv-broker/install_app.sh.jinja2 index 8ffe869..c878260 100644 --- a/source/idea/idea-bootstrap/dcv-broker/install_app.sh.jinja2 +++ b/source/idea/idea-bootstrap/dcv-broker/install_app.sh.jinja2 @@ -11,7 +11,7 @@ source "${SCRIPT_DIR}/../common/bootstrap_common.sh" # DCV Broker DCV_GPG_KEY="{{ context.config.get_string('global-settings.package_config.dcv.gpg_key', required=True) }}" -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7') %} +{%- if context.base_os in ('amazonlinux2') %} DCV_SESSION_MANAGER_BROKER_NOARCH_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.broker.linux.al2_rhel_centos7.version', required=True) }}" DCV_SESSION_MANAGER_BROKER_URL="{{ context.config.get_string('global-settings.package_config.dcv.broker.linux.al2_rhel_centos7.url', required=True) }}" DCV_SESSION_MANAGER_BROKER_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.broker.linux.al2_rhel_centos7.sha256sum', required=True) }}" diff --git a/source/idea/idea-bootstrap/dcv-connection-gateway/install_app.sh.jinja2 b/source/idea/idea-bootstrap/dcv-connection-gateway/install_app.sh.jinja2 index e16ad90..ef52f98 100644 --- a/source/idea/idea-bootstrap/dcv-connection-gateway/install_app.sh.jinja2 +++ b/source/idea/idea-bootstrap/dcv-connection-gateway/install_app.sh.jinja2 @@ -43,7 +43,7 @@ mkdir -p ${APP_DIR} tar -xvf ${BOOTSTRAP_DIR}/${PACKAGE_ARCHIVE} -C ${APP_DIR} DCV_GPG_KEY="{{ context.config.get_string('global-settings.package_config.dcv.gpg_key', required=True) }}" -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7') %} +{%- if context.base_os in ('amazonlinux2') %} DCV_CONNECTION_GATEWAY_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.connection_gateway.x86_64.linux.al2_rhel_centos7.version', required=True) }}" DCV_CONNECTION_GATEWAY_URL="{{ context.config.get_string('global-settings.package_config.dcv.connection_gateway.x86_64.linux.al2_rhel_centos7.url', required=True) }}" DCV_CONNECTION_GATEWAY_SHA256_HASH="{{ context.config.get_string('global-settings.package_config.dcv.connection_gateway.x86_64.linux.al2_rhel_centos7.sha256sum', required=True) }}" @@ -56,7 +56,7 @@ DCV_CONNECTION_GATEWAY_SHA256_HASH="{{ context.config.get_string('global-setting INTERNAL_ALB_ENDPOINT="{{ context.config.get_cluster_internal_endpoint() }}" GATEWAY_TO_BROKER_PORT="{{ context.config.get_string("virtual-desktop-controller.dcv_broker.gateway_communication_port", required=True) }}" -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7') %} +{%- if context.base_os in ('amazonlinux2') %} DCV_SERVER_X86_64_URL="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.al2_rhel_centos7.url', required=True) }}" DCV_SERVER_X86_64_TGZ="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.al2_rhel_centos7.tgz', required=True) }}" DCV_SERVER_X86_64_VERSION="{{ context.config.get_string('global-settings.package_config.dcv.host.x86_64.linux.al2_rhel_centos7.version', required=True) }}" @@ -140,7 +140,7 @@ function install_dcv_web_viewer() { pushd nice-dcv-${DCV_SERVER_VERSION} {% if context.base_os == 'amazonlinux2' -%} rpm -ivh nice-dcv-web-viewer-*.${machine}.rpm - {% elif context.base_os in ('rhel7', 'centos7', 'rhel8', 'rocky8') -%} + {% elif context.base_os in ('rhel8', 'rocky8') -%} rpm -ivh nice-dcv-web-viewer-*.${machine}.rpm --nodeps {% endif -%} popd diff --git a/source/idea/idea-bootstrap/openldap-server/_templates/install_openldap.jinja2 b/source/idea/idea-bootstrap/openldap-server/_templates/install_openldap.jinja2 index 0a644ee..98493ec 100644 --- a/source/idea/idea-bootstrap/openldap-server/_templates/install_openldap.jinja2 +++ b/source/idea/idea-bootstrap/openldap-server/_templates/install_openldap.jinja2 @@ -18,7 +18,7 @@ OPENLDAP_SERVER_PKGS_7=({{ ' '.join(context.config.get_list('global-settings.pac OPENLDAP_SERVER_PKGS_8=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.openldap_server_8', required=True)) }}) OPENLDAP_SERVER_PKGS_9=({{ ' '.join(context.config.get_list('global-settings.package_config.linux_packages.openldap_server_9', required=True)) }}) -{%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7') %} +{%- if context.base_os in ('amazonlinux2') %} yum install -y $(echo ${OPENLDAP_SERVER_PKGS[*]} ${OPENLDAP_SERVER_PKGS_7[*]}) {%- elif context.base_os in ('rhel8', 'rocky8') %} dnf install -y $(echo ${OPENLDAP_SERVER_PKGS[*]} ${OPENLDAP_SERVER_PKGS_8[*]}) diff --git a/source/idea/idea-bootstrap/virtual-desktop-host-linux/configure_dcv_host.sh.jinja2 b/source/idea/idea-bootstrap/virtual-desktop-host-linux/configure_dcv_host.sh.jinja2 index f3399d7..e8ed26f 100644 --- a/source/idea/idea-bootstrap/virtual-desktop-host-linux/configure_dcv_host.sh.jinja2 +++ b/source/idea/idea-bootstrap/virtual-desktop-host-linux/configure_dcv_host.sh.jinja2 @@ -41,9 +41,17 @@ IDEA_SESSION_ID="{{ context.vars.idea_session_id }}" IDEA_SESSION_OWNER="{{ context.vars.session_owner }}" function install_microphone_redirect() { + {%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} if [[ -z "$(rpm -qa pulseaudio-utils)" ]]; then + {%- elif context.base_os in ('ubuntu2204') %} + if [[ -z "$(dpkg -l pulseaudio-utils | grep ^ii)" ]]; then + {%- endif %} echo "Installing microphone redirect..." + {%- if context.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9') %} yum install -y pulseaudio-utils + {%- elif context.base_os in ('ubuntu2204') %} + apt install -y pulseaudio-utils + {%- endif %} else log_info "Found pulseaudio-utils pre-installed... skipping installation..." fi @@ -330,6 +338,8 @@ if [[ -f ${IDEA_CLUSTER_HOME}/dcv_host/userdata_customizations.sh ]]; then /bin/bash ${IDEA_CLUSTER_HOME}/dcv_host/userdata_customizations.sh >> ${BOOTSTRAP_DIR}/logs/userdata_customizations.log 2>&1 fi +{% include '_templates/linux/system_upgrade.jinja2' %} + # notify controller CONTROLLER_EVENTS_QUEUE_URL="{{ context.config.get_string('virtual-desktop-controller.events_sqs_queue_url', required=True) }}" MESSAGE="{{ context.vars.dcv_host_ready_message }}" @@ -343,4 +353,4 @@ if [[ "${REBOOT_REQUIRED}" == "yes" ]]; then reboot else /bin/bash ${SCRIPT_DIR}/configure_dcv_host_post_reboot.sh -fi +fi \ No newline at end of file diff --git a/source/idea/idea-bootstrap/virtual-desktop-host-linux/setup.sh.jinja2 b/source/idea/idea-bootstrap/virtual-desktop-host-linux/setup.sh.jinja2 index cc921ca..35db3ae 100644 --- a/source/idea/idea-bootstrap/virtual-desktop-host-linux/setup.sh.jinja2 +++ b/source/idea/idea-bootstrap/virtual-desktop-host-linux/setup.sh.jinja2 @@ -50,6 +50,10 @@ echo -n "no" > ${BOOTSTRAP_DIR}/reboot_required.txt SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) source "${SCRIPT_DIR}/../common/bootstrap_common.sh" +{% include '_templates/linux/disable_auto_upgrades.jinja2' %} + +{% include '_templates/linux/systemd_resolved.jinja2' %} + {% include '_templates/linux/idea_proxy.jinja2' %} {% include '_templates/linux/idea_service_account.jinja2' %} @@ -61,7 +65,7 @@ source "${SCRIPT_DIR}/../common/bootstrap_common.sh" {% include '_templates/linux/mount_shared_storage.jinja2' %} if [[ ! -f ${BOOTSTRAP_DIR}/idea_preinstalled_packages.log ]]; then - {%- if context.base_os in ('amazonlinux2', 'centos7', 'rhel7') %} + {%- if context.base_os in ('amazonlinux2') %} yum install -y deltarpm {%- elif context.base_os in ('rhel8', 'rocky8') %} #drpm isn't available in rhel9 or rocky9 diff --git a/source/idea/idea-cluster-manager/src/ideaclustermanager/app/accounts/db/single_sign_on_state_dao.py b/source/idea/idea-cluster-manager/src/ideaclustermanager/app/accounts/db/single_sign_on_state_dao.py index 049d436..fae47a4 100644 --- a/source/idea/idea-cluster-manager/src/ideaclustermanager/app/accounts/db/single_sign_on_state_dao.py +++ b/source/idea/idea-cluster-manager/src/ideaclustermanager/app/accounts/db/single_sign_on_state_dao.py @@ -16,7 +16,6 @@ from typing import Optional, Dict from boto3.dynamodb.conditions import Attr - class SingleSignOnStateDAO: def __init__(self, context: SocaContext, logger=None): diff --git a/source/idea/idea-cluster-manager/src/ideaclustermanager_meta/__init__.py b/source/idea/idea-cluster-manager/src/ideaclustermanager_meta/__init__.py index f72a273..c776214 100644 --- a/source/idea/idea-cluster-manager/src/ideaclustermanager_meta/__init__.py +++ b/source/idea/idea-cluster-manager/src/ideaclustermanager_meta/__init__.py @@ -10,4 +10,4 @@ # and limitations under the License. __name__ = 'idea-cluster-manager' -__version__ = '3.1.7' +__version__ = '3.1.8' diff --git a/source/idea/idea-cluster-manager/webapp/.env b/source/idea/idea-cluster-manager/webapp/.env index fe4bd00..fc00fbd 100644 --- a/source/idea/idea-cluster-manager/webapp/.env +++ b/source/idea/idea-cluster-manager/webapp/.env @@ -1,4 +1,4 @@ REACT_APP_IDEA_HTTP_ENDPOINT="http://localhost:8080" REACT_APP_IDEA_ALB_ENDPOINT="http://localhost:8080" REACT_APP_IDEA_HTTP_API_SUFFIX="/api/v1" -REACT_APP_IDEA_RELEASE_VERSION="3.1.7" +REACT_APP_IDEA_RELEASE_VERSION="3.1.8" diff --git a/source/idea/idea-cluster-manager/webapp/package.json b/source/idea/idea-cluster-manager/webapp/package.json index 577f8b8..31d6078 100644 --- a/source/idea/idea-cluster-manager/webapp/package.json +++ b/source/idea/idea-cluster-manager/webapp/package.json @@ -1,6 +1,6 @@ { "name": "web-portal", - "version": "3.1.7", + "version": "3.1.8", "private": true, "dependencies": { "@cloudscape-design/components": "^3.0.82", @@ -96,9 +96,7 @@ }, "browserslist": { "production": [ - ">0.2%", - "not dead", - "not op_mini all" + "defaults" ], "development": [ "last 1 chrome version", diff --git a/source/idea/idea-cluster-manager/webapp/src/client/data-model.ts b/source/idea/idea-cluster-manager/webapp/src/client/data-model.ts index ca87d41..e5406b6 100644 --- a/source/idea/idea-cluster-manager/webapp/src/client/data-model.ts +++ b/source/idea/idea-cluster-manager/webapp/src/client/data-model.ts @@ -15,7 +15,7 @@ * and limitations under the License. */ -export type VirtualDesktopBaseOS = "amazonlinux2" | "centos7" | "rhel7" | "rhel8" | "rhel9" | "rocky8" | "rocky9" | "windows"; +export type VirtualDesktopBaseOS = "amazonlinux2" | "rhel8" | "rhel9" | "rocky8" | "rocky9" | "windows" | "ubuntu2204"; export type VirtualDesktopSessionType = "CONSOLE" | "VIRTUAL"; export type SocaMemoryUnit = "bytes" | "kib" | "mib" | "gib" | "tib" | "kb" | "mb" | "gb" | "tb"; export type VirtualDesktopSessionState = diff --git a/source/idea/idea-cluster-manager/webapp/src/common/app-context.ts b/source/idea/idea-cluster-manager/webapp/src/common/app-context.ts index 9a85b43..6974b06 100644 --- a/source/idea/idea-cluster-manager/webapp/src/common/app-context.ts +++ b/source/idea/idea-cluster-manager/webapp/src/common/app-context.ts @@ -20,6 +20,7 @@ import Utils from "./utils"; import {Constants} from "./constants"; import {IdeaAuthenticationContext} from "./authentication-context"; import {IdeaClients} from "../client"; +import AppLogger from "./app-logger"; export interface AppContextProps { httpEndpoint: string @@ -64,11 +65,17 @@ class AppContext { private onLogin?: () => Promise private onLogout?: () => Promise + private logger: AppLogger + constructor(props: AppContextProps) { this.props = props const authEndpoint = `${props.httpEndpoint}${Utils.getApiContextPath(Constants.MODULE_CLUSTER_MANAGER)}` + this.logger = new AppLogger({ + name: 'app-context.ts' + }) + const initializeServiceWorker = () => { if (this.props.serviceWorkerRegistration) { this.props.serviceWorkerRegistration.active!.postMessage({ @@ -119,23 +126,34 @@ class AppContext { // 2. check for login status changes and take respective actions if (IS_LOGGED_IN_INTERVAL != null) { + this.logger.debug('Clearing existing IS_LOGGED_IN_INTERVAL.') clearInterval(IS_LOGGED_IN_INTERVAL) } - + IS_LOGGED_IN_INTERVAL = setInterval(() => { - + this.logger.debug('Executing IS_LOGGED_IN_INTERVAL callback.') + // initializing service worker in this interval ensures that in the event the service worker was stopped and - // started, the service worker knows the authentication endpoints + // started, the service worker knows the authentication endpoints + this.logger.debug('Initializing service worker.') initializeServiceWorker() - + // check if the user is logged in. this may query the service worker or authentication context based on current session management mode. + this.logger.debug('Checking if the user is logged in.') this.authService.isLoggedIn().then((status) => { + this.logger.debug(`User logged in status: ${status}`) if (this.isLoggedIn && !status) { - this.authService.logout().finally() + this.logger.debug('User was logged in but now is not. Initiating logout process.') + this.authService.logout().finally(() => { + this.logger.debug('Logout process completed.') + }) } this.isLoggedIn = status + }).catch(error => { + // Optionally handle errors + this.logger.error('Error while checking login status:', error) }) - }, 10000) + }, 10000) } static setOnRoute(onRoute: any) { diff --git a/source/idea/idea-cluster-manager/webapp/src/common/app-logger.ts b/source/idea/idea-cluster-manager/webapp/src/common/app-logger.ts index 2969faf..9ff5778 100644 --- a/source/idea/idea-cluster-manager/webapp/src/common/app-logger.ts +++ b/source/idea/idea-cluster-manager/webapp/src/common/app-logger.ts @@ -39,7 +39,7 @@ export interface AppLoggerProps { } /*** - * AppLoger class as a central logging function across IDEA frontend components + * AppLogger class as a central logging function across IDEA frontend components * * To enable debug logging in production environments: * 1. navigate to browser menu-> developer tools -> console diff --git a/source/idea/idea-cluster-manager/webapp/src/common/authentication-context.ts b/source/idea/idea-cluster-manager/webapp/src/common/authentication-context.ts index 2776543..6612075 100644 --- a/source/idea/idea-cluster-manager/webapp/src/common/authentication-context.ts +++ b/source/idea/idea-cluster-manager/webapp/src/common/authentication-context.ts @@ -327,14 +327,18 @@ export class IdeaAuthenticationContext { * this ensures session is not invalidated due to network errors, where the session state is still valid and user does not need to re-login. */ private renewAccessToken(): Promise { - + this.logger.debug('Renew access token process started.') + // before renewing, check if the current in-memory tokens are stale. // this can only happen when using local storage, as another tab may renew the access token and update local storage. if (this.localStorage != null) { // this may need some sort of lock in future as there will be concurrent renewal scenario when multiple tabs are active. // since local storage is not recommended for production, this is safe to ignore. + this.logger.debug('Local storage is not null, checking for stale tokens.') let accessToken = this.localStorage.getItem(KEY_ACCESS_TOKEN) + this.logger.debug(`Local storage access token: ${accessToken}`) if (accessToken !== this.accessToken) { + this.logger.debug('Detected stale in-memory access token, initializing from local storage.') this.initializeFromLocalStorage() if (!this.isAccessTokenExpired()) { this.logger.info('✓ refreshed stale access token') @@ -342,42 +346,50 @@ export class IdeaAuthenticationContext { } } } - + if (!this.isAccessTokenExpired()) { + this.logger.debug('Access token is still valid, no need to renew.') return Promise.resolve(true) } - + if (this.refreshToken == null) { + this.logger.debug('No refresh token available, cannot renew access token.') return Promise.resolve(false) } - + this.logger.info('renewing access token ...') - + let username if (this.claimsProvider == null) { if (this.accessToken != null) { + this.logger.debug('Parsing claims from access token.') let claims = JwtTokenUtils.parseJwtToken(this.accessToken) username = claims.username } else if (this.idToken != null) { + this.logger.debug('Parsing claims from ID token.') let claims = JwtTokenUtils.parseJwtToken(this.idToken) username = claims['cognito:username'] } else { - console.info('✗ failed to renew token.') + this.logger.info('✗ failed to renew token due to missing tokens.') return Promise.resolve(false) } } else { + this.logger.debug('Fetching username from claims provider.') username = this.claimsProvider.getUsername() } - + if (this.renewalInProgress != null) { + this.logger.debug('Renewal already in progress, returning the existing promise.') return this.renewalInProgress } - + let authFlow = 'REFRESH_TOKEN_AUTH' if (this.ssoAuth) { authFlow = 'SSO_REFRESH_TOKEN_AUTH' } - + + this.logger.debug(`Auth flow selected: ${authFlow}`) + let request = { header: { namespace: 'Auth.InitiateAuth', @@ -389,8 +401,12 @@ export class IdeaAuthenticationContext { refresh_token: this.refreshToken } } - + + this.logger.debug(`Auth request payload: ${JSON.stringify(request)}`) + const authEndpoint = `${this.authEndpoint}/${request.header.namespace}` + this.logger.debug(`Auth endpoint: ${authEndpoint}`) + this.renewalInProgress = this._fetch(authEndpoint, { method: 'POST', headers: { @@ -398,12 +414,14 @@ export class IdeaAuthenticationContext { }, body: JSON.stringify(request) }).then(result => { + this.logger.debug(`Auth response received: ${JSON.stringify(result)}`) if (result.success && result.payload.auth) { this.logger.info('✓ access token renewed successfully') this.saveAuthResult(result.payload.auth, this.ssoAuth) return true } else { if (result.error_code === NETWORK_TIMEOUT || result.error_code === NETWORK_ERROR || result.error_code === SERVER_ERROR) { + this.logger.debug(`Network or server error encountered: ${result.error_code}`) throw result } else { this.logger.info('✗ failed to renew token.') @@ -411,11 +429,13 @@ export class IdeaAuthenticationContext { } } }).finally(() => { + this.logger.debug('Renewal process completed, clearing renewalInProgress marker.') this.renewalInProgress = null }) - + return this.renewalInProgress } + invoke(url: string, request: any, isPublic: boolean = false): Promise { diff --git a/source/idea/idea-cluster-manager/webapp/src/common/utils.ts b/source/idea/idea-cluster-manager/webapp/src/common/utils.ts index 160879a..b21c41b 100644 --- a/source/idea/idea-cluster-manager/webapp/src/common/utils.ts +++ b/source/idea/idea-cluster-manager/webapp/src/common/utils.ts @@ -633,18 +633,16 @@ class Utils { switch (name) { case 'amazonlinux2': return 'Amazon Linux 2' - case 'centos7': - return 'CentOS 7' - case 'rhel7': - return 'Red Hat Enterprise Linux 7' case 'rhel8': return 'Red Hat Enterprise Linux 8' case 'rhel9': return 'Red Hat Enterprise Linux 9' case 'rocky8': return 'Rocky Linux 8' - case 'rocky9': + case 'rocky9': return 'Rocky Linux 9' + case "ubuntu2204": + return "Ubuntu 22.04"; case 'windows': return 'Windows' } diff --git a/source/idea/idea-cluster-manager/webapp/src/index.tsx b/source/idea/idea-cluster-manager/webapp/src/index.tsx index 420262c..03dd251 100644 --- a/source/idea/idea-cluster-manager/webapp/src/index.tsx +++ b/source/idea/idea-cluster-manager/webapp/src/index.tsx @@ -113,38 +113,50 @@ interface InitializeAppProps { } const initializeApp = (props: InitializeAppProps) => { - let httpEndpoint - let albEndpoint + let httpEndpoint; + let albEndpoint; if (currentUrl.origin.startsWith('http://localhost')) { - httpEndpoint = process.env.REACT_APP_IDEA_HTTP_ENDPOINT! - albEndpoint = process.env.REACT_APP_IDEA_ALB_ENDPOINT! + LOGGER.debug('Running in local environment'); + httpEndpoint = process.env.REACT_APP_IDEA_HTTP_ENDPOINT!; + albEndpoint = process.env.REACT_APP_IDEA_ALB_ENDPOINT!; } else { - httpEndpoint = currentUrl.origin - albEndpoint = currentUrl.origin + LOGGER.debug('Running in production environment'); + httpEndpoint = currentUrl.origin; + albEndpoint = currentUrl.origin; } + LOGGER.debug('HTTP Endpoint: ', httpEndpoint); + LOGGER.debug('ALB Endpoint: ', albEndpoint); + if (window.idea.context == null) { + LOGGER.debug('Initializing new AppContext'); window.idea.context = new AppContext({ httpEndpoint: httpEndpoint, albEndpoint: albEndpoint, releaseVersion: IDEA_RELEASE_VERSION, app: window.idea.app, serviceWorkerRegistration: props.serviceWorkerRegistration - }) + }); + } else { + LOGGER.debug('AppContext already initialized'); } + LOGGER.debug('Getting root element for ReactDOM'); const root = ReactDOM.createRoot( document.getElementById('app') as HTMLElement - ) + ); + LOGGER.debug('Rendering the application'); root.render( - - + + - ) -} + ); + + LOGGER.debug('Application initialized'); +}; const sessionManagement = Utils.asString(window.idea.app.session_management, 'local-storage') diff --git a/source/idea/idea-cluster-manager/webapp/src/pages/auth/auth-layout.tsx b/source/idea/idea-cluster-manager/webapp/src/pages/auth/auth-layout.tsx index 5b38ca6..f6603a1 100644 --- a/source/idea/idea-cluster-manager/webapp/src/pages/auth/auth-layout.tsx +++ b/source/idea/idea-cluster-manager/webapp/src/pages/auth/auth-layout.tsx @@ -16,6 +16,7 @@ import {AppLayout, Grid} from "@cloudscape-design/components"; import {AppContext} from "../../common"; import './auth.scss' import Utils from "../../common/utils"; +import AppLogger from "../../common/app-logger"; export interface AuthLayoutProps { loading?: boolean @@ -28,47 +29,62 @@ export interface AuthLayoutState { class AuthLayout extends Component { + private logger: AppLogger + constructor(props: AuthLayoutProps) { super(props); this.state = { ready: false } + this.logger = new AppLogger({ + name: 'auth-layout.ts' + }) + this.logger.debug('AuthLayout component constructed with initial state: ', this.state); } - componentDidMount() { + this.logger.debug('AuthLayout component mounted. Checking login status.'); AppContext.get().auth().isLoggedIn().then((status) => { + this.logger.debug(`Login status received: ${status}`); // show loading animation spinner until the initial sso redirect is not complete - if(!status && Utils.isSsoEnabled() && typeof window.idea.app.sso_auth_status === 'undefined') { - return + if (!status && Utils.isSsoEnabled() && typeof window.idea.app.sso_auth_status === 'undefined') { + this.logger.debug('SSO is enabled and auth status is undefined. Waiting for SSO redirect completion.'); + return; } + this.logger.debug('Setting state to ready.'); this.setState({ ready: true }, () => { - Utils.hideLoadingAnimation() + this.logger.debug('State set to ready. Hiding loading animation.'); + Utils.hideLoadingAnimation(); }) - }) + }).catch(error => { + this.logger.error('Error while checking login status: ', error); + }); } isLoading(): boolean { - if(this.props.loading == null) { - return false + if (this.props.loading == null) { + this.logger.debug('Loading prop is null. Returning false.'); + return false; } - return this.props.loading + this.logger.debug(`Loading prop is: ${this.props.loading}`); + return this.props.loading; } render() { + this.logger.debug(`Rendering AuthLayout component. Ready state: ${this.state.ready}`); return
- {!this.isLoading() && this.props.content} -

{AppContext.get().getCopyRightText()}

+ { !this.isLoading() && this.props.content } +

{ AppContext.get().getCopyRightText() }

@@ -77,4 +93,5 @@ class AuthLayout extends Component { } } -export default AuthLayout +export default AuthLayout; + diff --git a/source/idea/idea-cluster-manager/webapp/src/pages/hpc/update-hpc-application.tsx b/source/idea/idea-cluster-manager/webapp/src/pages/hpc/update-hpc-application.tsx index 87f9889..03dfbc8 100644 --- a/source/idea/idea-cluster-manager/webapp/src/pages/hpc/update-hpc-application.tsx +++ b/source/idea/idea-cluster-manager/webapp/src/pages/hpc/update-hpc-application.tsx @@ -447,8 +447,13 @@ class UpdateHpcApplication extends Component { if (this.state.updatedApplication.job_script_type === 'jinja2') { - const matches = this.state.jobScriptTemplate.match(`{{.*(\\b${name}\\b).*}}`) - if (matches == null || matches.length === 0) { + const matches1 = this.state.jobScriptTemplate.match(`{{.*(\\b${name}\\b).*}}`) + const matches2 = this.state.jobScriptTemplate.match(`{%.*(\\b${name}\\b).*%}`) + const matches = [ + ...(matches1 || []), + ...(matches2 || []) + ]; + if (matches.length === 0) { return false } return matches[1] === name diff --git a/source/idea/idea-cluster-manager/webapp/src/pages/hpc/update-queue-profile.tsx b/source/idea/idea-cluster-manager/webapp/src/pages/hpc/update-queue-profile.tsx index 8c9ee74..56ddc85 100644 --- a/source/idea/idea-cluster-manager/webapp/src/pages/hpc/update-queue-profile.tsx +++ b/source/idea/idea-cluster-manager/webapp/src/pages/hpc/update-queue-profile.tsx @@ -423,14 +423,6 @@ class HpcUpdateQueueProfile extends Component { + IDEA_AUTH_CONTEXT.isLoggedIn(); +}, 1000 * 60 * 5); + self.addEventListener('message', (event) => { if (event.data && event.data.type) { switch (event.data.type) { diff --git a/source/idea/idea-cluster-manager/webapp/src/service/auth-service.ts b/source/idea/idea-cluster-manager/webapp/src/service/auth-service.ts index d3d1fc7..8f78e9e 100644 --- a/source/idea/idea-cluster-manager/webapp/src/service/auth-service.ts +++ b/source/idea/idea-cluster-manager/webapp/src/service/auth-service.ts @@ -18,6 +18,7 @@ import {AUTH_LOGIN_CHALLENGE, AUTH_PASSWORD_RESET_REQUIRED, UNAUTHORIZED_ACCESS} import Utils from "../common/utils"; import {JwtTokenClaims} from "../common/token-utils"; import {IdeaClients} from "../client"; +import AppLogger from "../common/app-logger"; export interface AuthServiceProps { localStorage: LocalStorageService, @@ -38,10 +39,15 @@ class AuthService { private activeIsLoggedInPromise: Promise | null + private logger: AppLogger + constructor(props: AuthServiceProps) { this.props = props this.claims = null this.activeIsLoggedInPromise = null + this.logger = new AppLogger({ + name: 'auth-service.ts' + }) } setHooks(onLogin: () => Promise, onLogout: () => Promise) { @@ -269,38 +275,49 @@ class AuthService { } isLoggedIn(): Promise { - - if(this.activeIsLoggedInPromise != null) { + this.logger.debug('isLoggedIn method invoked.') + + if (this.activeIsLoggedInPromise != null) { + this.logger.debug('Returning existing active isLoggedIn promise.') return this.activeIsLoggedInPromise } - + + this.logger.debug('Creating new isLoggedIn promise.') this.activeIsLoggedInPromise = this.props.clients.auth().isLoggedIn().then(status => { - + this.logger.debug(`Auth service reported login status: ${status}`) + // if already logged in do, nothing if (status) { + this.logger.debug('User is already logged in. Fetching claims.') return this.props.clients.auth().getClaims().then(claims => { this.claims = claims + this.logger.debug('Claims fetched successfully.') return true }) } - + if (typeof window.idea.app.sso === 'undefined' || !window.idea.app.sso) { + this.logger.debug('SSO is not defined or not enabled.') return false } - + // if SSO is enabled, check for SSO auth if (Utils.isSsoEnabled()) { + this.logger.debug('SSO is enabled. Checking SSO auth status.') let authStatus = window.idea.app.sso_auth_status + this.logger.debug(`SSO auth status: ${authStatus}`) if (authStatus) { if (authStatus === 'SUCCESS' && window.idea.app.sso_auth_code) { + this.logger.debug('SSO auth was successful. Using SSO auth code for login.') return this.login_using_sso_auth_code(window.idea.app.sso_auth_code).then(status => { // discard the sso_auth_code after use as auth code is one time use only. // this also prevents re-triggering SSO auth flow after the user has logged out manually. window.idea.app.sso_auth_code = null - if(status) { + this.logger.debug(`Login using SSO auth code was ${status ? 'successful' : 'unsuccessful'}.`) + if (status) { return this.props.clients.auth().getClaims().then(claims => { this.claims = claims - // console.log("loginSSO claims: ", claims) + this.logger.debug('Claims fetched successfully after SSO login.') return true }) } else { @@ -308,20 +325,25 @@ class AuthService { } }) } else { + this.logger.debug('SSO auth status is not SUCCESS or no SSO auth code is available. Redirecting to login page.') // redirect to login page return false } } else { + this.logger.debug('SSO auth status is null. Redirecting to SSO.') window.location.href = '/sso' } } + this.logger.debug('SSO is not enabled.') return false }).finally(() => { + this.logger.debug('isLoggedIn promise settled. Clearing active isLoggedIn promise.') this.activeIsLoggedInPromise = null }) - + return this.activeIsLoggedInPromise } + logout() { return this.props.clients.auth() diff --git a/source/idea/idea-data-model/src/ideadatamodel/constants.py b/source/idea/idea-data-model/src/ideadatamodel/constants.py index 41738b8..8c393e1 100644 --- a/source/idea/idea-data-model/src/ideadatamodel/constants.py +++ b/source/idea/idea-data-model/src/ideadatamodel/constants.py @@ -72,7 +72,7 @@ SCALING_MODE_MULTIPLE_JOBS = 'batch' DEFAULT_SCALING_MODE = SCALING_MODE_SINGLE_JOB -ALLOWED_BASEOS = ['amazonlinux2', 'centos7', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9'] +ALLOWED_BASEOS = ['amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9', 'ubuntu2204'] TOPIC_BROADCAST = 'idea.app.broadcast' MESSAGE_RELOAD = 'app.reload' @@ -234,15 +234,14 @@ # Supported OS OS_AMAZONLINUX2 = 'amazonlinux2' -OS_RHEL7 = 'rhel7' OS_RHEL8 = 'rhel8' OS_RHEL9 = 'rhel9' OS_ROCKY8 = 'rocky8' OS_ROCKY9 = 'rocky9' -OS_CENTOS7 = 'centos7' +OS_UBUNTU2204 = 'ubuntu2204' OS_WINDOWS = 'windows' -SUPPORTED_OS = (OS_AMAZONLINUX2, OS_CENTOS7, OS_RHEL7, OS_RHEL8, OS_RHEL9, OS_WINDOWS, OS_ROCKY8, OS_ROCKY9) -SUPPORTED_LINUX_OS = (OS_AMAZONLINUX2, OS_CENTOS7, OS_RHEL7, OS_RHEL8, OS_RHEL9, OS_ROCKY8, OS_ROCKY9) +SUPPORTED_OS = (OS_AMAZONLINUX2, OS_RHEL8, OS_RHEL9, OS_WINDOWS, OS_ROCKY8, OS_ROCKY9, OS_UBUNTU2204) +SUPPORTED_LINUX_OS = (OS_AMAZONLINUX2, OS_RHEL8, OS_RHEL9, OS_ROCKY8, OS_ROCKY9, OS_UBUNTU2204) # Platforms PLATFORM_LINUX = 'linux' diff --git a/source/idea/idea-data-model/src/ideadatamodel/virtual_desktop/virtual_desktop_model.py b/source/idea/idea-data-model/src/ideadatamodel/virtual_desktop/virtual_desktop_model.py index 8f18647..e42de81 100644 --- a/source/idea/idea-data-model/src/ideadatamodel/virtual_desktop/virtual_desktop_model.py +++ b/source/idea/idea-data-model/src/ideadatamodel/virtual_desktop/virtual_desktop_model.py @@ -96,12 +96,11 @@ class VirtualDesktopScheduleType(str, Enum): class VirtualDesktopBaseOS(str, Enum): AMAZON_LINUX2 = constants.OS_AMAZONLINUX2 - CENTOS7 = constants.OS_CENTOS7 - RHEL7 = constants.OS_RHEL7 RHEL8 = constants.OS_RHEL8 RHEL9 = constants.OS_RHEL9 ROCKY8 = constants.OS_ROCKY8 ROCKY9 = constants.OS_ROCKY9 + UBUNTU2204 = constants.OS_UBUNTU2204 WINDOWS = constants.OS_WINDOWS diff --git a/source/idea/idea-data-model/src/ideadatamodel_meta/__init__.py b/source/idea/idea-data-model/src/ideadatamodel_meta/__init__.py index 2de2ef5..d931249 100644 --- a/source/idea/idea-data-model/src/ideadatamodel_meta/__init__.py +++ b/source/idea/idea-data-model/src/ideadatamodel_meta/__init__.py @@ -10,4 +10,4 @@ # and limitations under the License. __name__ = 'idea-data-model' -__version__ = '3.1.7' +__version__ = '3.1.8' diff --git a/source/idea/idea-scheduler/src/ideascheduler/app/provisioning/job_provisioner/cloudformation_stack_builder.py b/source/idea/idea-scheduler/src/ideascheduler/app/provisioning/job_provisioner/cloudformation_stack_builder.py index ca6e763..5ab366f 100644 --- a/source/idea/idea-scheduler/src/ideascheduler/app/provisioning/job_provisioner/cloudformation_stack_builder.py +++ b/source/idea/idea-scheduler/src/ideascheduler/app/provisioning/job_provisioner/cloudformation_stack_builder.py @@ -487,22 +487,27 @@ def build_metrics(self) -> SocaAnonymousMetrics: metrics.KeepForever = str(self.job.provisioning_options.keep_forever).lower() metrics.FsxLustre = str(self.job.params.fsx_lustre.enabled).lower() - if Utils.get_as_bool(self.job.params.fsx_lustre.enabled, default=False): - deployment_type = Utils.get_as_string(self.job.params.fsx_lustre.deployment_type, default=constants.DEFAULT_FSX_LUSTRE_DEPLOYMENT_TYPE).upper() - - if deployment_type in constants.FSX_LUSTRE_PER_UNIT_THROUGHPUT_TYPES: - per_unit_throughput = Utils.get_as_int(self.job.params.fsx_lustre.per_unit_throughput, default=100) + if not self.job.params.fsx_lustre.existing_fsx: + if Utils.get_as_bool(self.job.params.fsx_lustre.enabled, default=False): + deployment_type = Utils.get_as_string(self.job.params.fsx_lustre.deployment_type, default=constants.DEFAULT_FSX_LUSTRE_DEPLOYMENT_TYPE).upper() + + if deployment_type in constants.FSX_LUSTRE_PER_UNIT_THROUGHPUT_TYPES: + per_unit_throughput = Utils.get_as_int(self.job.params.fsx_lustre.per_unit_throughput, default=100) + else: + # Scratch filesystems + per_unit_throughput = 200 + + metrics.FsxLustreInfo = { + 'DeploymentType': deployment_type, + 'PerUnitStorageThroughput': per_unit_throughput, + 'Size': Utils.get_as_int(self.job.params.fsx_lustre.size.int_val(), default=0) + } else: - # Scratch filesystems - per_unit_throughput = 200 - + metrics.FsxLustreInfo = {} + else: metrics.FsxLustreInfo = { - 'DeploymentType': deployment_type, - 'PerUnitStorageThroughput': per_unit_throughput, - 'Size': Utils.get_as_int(self.job.params.fsx_lustre.size.int_val(), default=0) + 'ExistingFSx':self.job.params.fsx_lustre.existing_fsx } - else: - metrics.FsxLustreInfo = {} metrics.TerminateWhenIdle = str(self.job.provisioning_options.terminate_when_idle).lower() metrics.Dcv = 'false' @@ -534,7 +539,8 @@ def build_template(self) -> str: # build fsx for lustre if self.job.params.fsx_lustre.enabled: - self.template.add_resource(self.build_fsx_lustre()) + if not self.job.params.fsx_lustre.existing_fsx: + self.template.add_resource(self.build_fsx_lustre()) # send anonymous metrics to AWS if self.job.params.enable_anonymous_metrics: diff --git a/source/idea/idea-scheduler/src/ideascheduler/cli/ami_builder.py b/source/idea/idea-scheduler/src/ideascheduler/cli/ami_builder.py index 76967d0..c7e11c2 100644 --- a/source/idea/idea-scheduler/src/ideascheduler/cli/ami_builder.py +++ b/source/idea/idea-scheduler/src/ideascheduler/cli/ami_builder.py @@ -527,7 +527,7 @@ def ami_builder(): @click.option('--ami-name', help='AMI Name. Default: idea-compute-node-{baseos}') @click.option('--ami-version', help='AMI Version. Default: MMDDYYYY-HHmmss') @click.option('--base-ami', help='AMI Id of the base image using which the AMI Builder EC2 instance will be launched') -@click.option('--base-os', help='BaseOS of the AMI. Must be one of: [amazonlinux2, rhel7, centos7]') +@click.option('--base-os', help='BaseOS of the AMI. Must be one of: [amazonlinux2]') @click.option('--instance-type', help='Instance Type. Specify a GPU instance type to install GPU Drivers. Default: c5.large') @click.option('--instance-profile-arn', help='IAM Instance Profile ARN') @click.option('--security-group-ids', help='Security Group Ids. Provide multiple security group ids separated by comma (,)') @@ -593,7 +593,7 @@ def build(no_stop: bool, no_terminate: bool, security_group_ids: str, **kwargs): @click.option('--ami-name', help='AMI Name. Default: idea-compute-node-{baseos}') @click.option('--ami-version', help='AMI Version. Default: MMDDYYYY-HHmmss') @click.option('--base-ami', help='AMI Id of the base image using which the AMI Builder EC2 instance will be launched') -@click.option('--base-os', help='BaseOS of the AMI. Must be one of: [amazonlinux2, rhel7, centos7]') +@click.option('--base-os', help='BaseOS of the AMI. Must be one of: [amazonlinux2]') @click.option('--instance-type', help='Instance Type. Specify a GPU instance type to install GPU Drivers. Default: c5.large') @click.option('--block-device-name', help='EBS block device name.') @click.option('--ebs-volume-size', type=int, help='EBS volume size in GB') diff --git a/source/idea/idea-scheduler/src/ideascheduler_meta/__init__.py b/source/idea/idea-scheduler/src/ideascheduler_meta/__init__.py index 41d7f7d..e03f031 100644 --- a/source/idea/idea-scheduler/src/ideascheduler_meta/__init__.py +++ b/source/idea/idea-scheduler/src/ideascheduler_meta/__init__.py @@ -12,4 +12,4 @@ # pkgconfig for ideascheduler. no dependencies # noqa __name__ = 'idea-scheduler' -__version__ = '3.1.7' +__version__ = '3.1.8' diff --git a/source/idea/idea-sdk/src/ideasdk/aws/aws_util.py b/source/idea/idea-sdk/src/ideasdk/aws/aws_util.py index 7b50f10..29e13c9 100644 --- a/source/idea/idea-sdk/src/ideasdk/aws/aws_util.py +++ b/source/idea/idea-sdk/src/ideasdk/aws/aws_util.py @@ -112,7 +112,7 @@ def get_instance_type_class(instance_type: str) -> Tuple[str, bool]: return 'Inf', False elif family.startswith(('trn1n', 'trn1', 'trn')): return 'Trn', False - elif family.startswith(('g4dn', 'g4ad', 'g5', 'g5g', 'g3s', 'g3', 'g2', 'g')): + elif family.startswith(('g4dn', 'g4ad', 'g5', 'g5g', 'g6', 'g3s', 'g3', 'g2', 'g')): return 'G', False elif family.startswith(('f1', 'f')): return 'F', False diff --git a/source/idea/idea-sdk/src/ideasdk/bootstrap/bootstrap_userdata_builder.py b/source/idea/idea-sdk/src/ideasdk/bootstrap/bootstrap_userdata_builder.py index bf78eec..f7567ed 100644 --- a/source/idea/idea-sdk/src/ideasdk/bootstrap/bootstrap_userdata_builder.py +++ b/source/idea/idea-sdk/src/ideasdk/bootstrap/bootstrap_userdata_builder.py @@ -135,7 +135,11 @@ def _build_linux_userdata_substitution(self) -> str: fi which unzip > /dev/null 2>&1 if [[ "$?" != "0" ]]; then - yum install -y unzip + if [[ $BASE_OS =~ ^(ubuntu2204)$ ]]; then + apt install -y unzip + else + yum install -y unzip + fi fi unzip -q awscliv2.zip ./aws/install --bin-dir /bin --update @@ -230,7 +234,11 @@ def _build_linux_userdata_non_substitution(self) -> str: fi which unzip > /dev/null 2>&1 if [[ "$?" != "0" ]]; then - yum install -y unzip + if [[ $BASE_OS =~ ^(ubuntu2204)$ ]]; then + apt install -y unzip + else + yum install -y unzip + fi fi unzip -q awscliv2.zip ./aws/install --bin-dir /bin --update diff --git a/source/idea/idea-sdk/src/ideasdk/context/bootstrap_context.py b/source/idea/idea-sdk/src/ideasdk/context/bootstrap_context.py index 6ef2332..03c2b28 100644 --- a/source/idea/idea-sdk/src/ideasdk/context/bootstrap_context.py +++ b/source/idea/idea-sdk/src/ideasdk/context/bootstrap_context.py @@ -94,10 +94,10 @@ def no_proxy(self) -> str: @property def default_system_user(self) -> str: - if self.base_os in ('amazonlinux2', 'rhel7', 'rhel8', 'rhel9', 'rocky8', 'rocky9'): + if self.base_os in ('amazonlinux2', 'rhel8', 'rhel9', 'rocky8', 'rocky9'): return 'ec2-user' - if self.base_os == 'centos7': - return 'centos' + if self.base_os == 'ubuntu2204': + return 'ubuntu' raise exceptions.general_exception(f'unknown system user name for base_os: {self.base_os}') def has_storage_provider(self, provider: str) -> bool: diff --git a/source/idea/idea-sdk/src/ideasdk_meta/__init__.py b/source/idea/idea-sdk/src/ideasdk_meta/__init__.py index 4ca3be9..bbe2772 100644 --- a/source/idea/idea-sdk/src/ideasdk_meta/__init__.py +++ b/source/idea/idea-sdk/src/ideasdk_meta/__init__.py @@ -12,4 +12,4 @@ # pkgconfig for soca-sdk. no dependencies # noqa __name__ = 'idea-sdk' -__version__ = '3.1.7' +__version__ = '3.1.8' diff --git a/source/idea/idea-virtual-desktop-controller/resources/api/api_doc.yml b/source/idea/idea-virtual-desktop-controller/resources/api/api_doc.yml index d3df1c5..155399c 100644 --- a/source/idea/idea-virtual-desktop-controller/resources/api/api_doc.yml +++ b/source/idea/idea-virtual-desktop-controller/resources/api/api_doc.yml @@ -55,38 +55,6 @@ spec: "unit": "gb" } } - }, - { - "name": "My RHEL 7 Session", - "owner": "testuser3", - "software_stack": { - "base_os": "rhel7", - "id": "ss-base-us-west-2-rhel7-x86-64-base" - }, - "hibernation_enabled": false, - "server": { - "instance_type": "t3.large", - "root_volume_size": { - "value": 300, - "unit": "gb" - } - } - }, - { - "name": "My CentOS 7 Session", - "owner": "testuser4", - "software_stack": { - "base_os": "centos7", - "id": "ss-base-us-west-2-centos7-x86-64-base" - }, - "hibernation_enabled": false, - "server": { - "instance_type": "t3.large", - "root_volume_size": { - "value": 300, - "unit": "gb" - } - } } ] } @@ -145,52 +113,6 @@ spec: }, "schedule": { - }, - "hibernation_enabled": false, - "is_launched_by_admin": true - }, - { - "dcv_session_id": "", - "idea_session_id": "78204668-fb46-49b0-9df6-a64060ea189c", - "name": "My RHEL 7 Session", - "owner": "testuser3", - "type": "VIRTUAL", - "server": { - "instance_id": "i-09ad56a78e999405c" - }, - "created_on": "2022-08-24T23:08:03.179000+00:00", - "updated_on": "2022-08-24T23:08:03.180000+00:00", - "state": "PROVISIONING", - "description": "", - "software_stack": { - "id": "ss-base-us-west-2-rhel7-x86-64-base", - "base_os": "rhel7" - }, - "schedule": { - - }, - "hibernation_enabled": false, - "is_launched_by_admin": true - }, - { - "dcv_session_id": "", - "idea_session_id": "78204668-fb46-49b0-9df6-a64060ea189d", - "name": "My CentOS 7 Session", - "owner": "testuser4", - "type": "VIRTUAL", - "server": { - "instance_id": "i-09ad56a78e999405d" - }, - "created_on": "2022-08-24T24:08:03.179000+00:00", - "updated_on": "2022-08-24T24:08:03.180000+00:00", - "state": "PROVISIONING", - "description": "", - "software_stack": { - "id": "ss-base-us-west-2-centos7-x86-64-base", - "base_os": "centos7" - }, - "schedule": { - }, "hibernation_enabled": false, "is_launched_by_admin": true @@ -255,60 +177,6 @@ spec: } } } - - name: Create new RHEL 7 Session (as user "testuser") - value: | - { - "header": { - "namespace": "VirtualDesktop.CreateSession", - "request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "version": 1 - }, - "payload": { - "session": { - "name": "My RHEL 7 Session", - "owner": "testuser", - "software_stack": { - "base_os": "rhel7", - "id": "ss-base-us-west-2-rhel7-x86-64-base" - }, - "hibernation_enabled": false, - "server": { - "instance_type": "t3.large", - "root_volume_size": { - "value": 300, - "unit": "gb" - } - } - } - } - } - - name: Create new Cent OS 7 Session (as user "testuser") - value: | - { - "header": { - "namespace": "VirtualDesktop.CreateSession", - "request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "version": 1 - }, - "payload": { - "session": { - "name": "My CentOS 7 Session", - "owner": "testuser", - "software_stack": { - "base_os": "centos7", - "id": "ss-base-us-west-2-centos7-x86-64-base" - }, - "hibernation_enabled": false, - "server": { - "instance_type": "t3.large", - "root_volume_size": { - "value": 300, - "unit": "gb" - } - } - } - } - } response: examples: - name: Create new Windows Session (as user "testuser") @@ -378,72 +246,4 @@ spec: "namespace": "VirtualDesktop.CreateSession", "request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } - } - - name: Create new RHEL 7 Session (as user "testuser") - value: | - { - "success": true, - "payload": { - "session": { - "dcv_session_id": "", - "idea_session_id": "78204668-fb46-49b0-9df6-a64060ea189a", - "name": "My RHEL 7 Session", - "owner": "testuser", - "type": "VIRTUAL", - "server": { - "instance_id": "i-09ad56a78e999405a" - }, - "created_on": "2022-08-24T21:08:03.179000+00:00", - "updated_on": "2022-08-24T21:08:03.180000+00:00", - "state": "PROVISIONING", - "description": "", - "software_stack": { - "id": "ss-base-us-west-2-rhel7-x86-64-base", - "base_os": "rhel7" - }, - "schedule": { - - }, - "hibernation_enabled": false, - "is_launched_by_admin": false - } - }, - "header": { - "namespace": "VirtualDesktop.CreateSession", - "request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" - } - } - - name: Create new Cent OS 7 Session (as user "testuser") - value: | - { - "success": true, - "payload": { - "session": { - "dcv_session_id": "", - "idea_session_id": "78204668-fb46-49b0-9df6-a64060ea189a", - "name": "My CentOS 7 Session", - "owner": "testuser", - "type": "VIRTUAL", - "server": { - "instance_id": "i-09ad56a78e999405a" - }, - "created_on": "2022-08-24T21:08:03.179000+00:00", - "updated_on": "2022-08-24T21:08:03.180000+00:00", - "state": "PROVISIONING", - "description": "", - "software_stack": { - "id": "ss-base-us-west-2-centos7-x86-64-base", - "base_os": "centos7" - }, - "schedule": { - - }, - "hibernation_enabled": false, - "is_launched_by_admin": false - } - }, - "header": { - "namespace": "VirtualDesktop.CreateSession", - "request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" - } - } + } \ No newline at end of file diff --git a/source/idea/idea-virtual-desktop-controller/resources/base-software-stack-config.yaml b/source/idea/idea-virtual-desktop-controller/resources/base-software-stack-config.yaml index 1d258ab..d36e384 100644 --- a/source/idea/idea-virtual-desktop-controller/resources/base-software-stack-config.yaml +++ b/source/idea/idea-virtual-desktop-controller/resources/base-software-stack-config.yaml @@ -181,254 +181,6 @@ amazonlinux2: us-west-2: - ami-id: ami-089313d40efd067a9 ss-id-suffix: base -centos7: - arm64: - default-description: 'CentOS 7 - arm64' - default-min-ram-unit: gb - default-min-ram-value: 4 - default-min-storage-unit: gb - default-min-storage-value: 10 - default-name: 'CentOS 7 - arm64' - af-south-1: - - ami-id: ami-0e88079e08c51419c - ss-id-suffix: base - ap-east-1: - - ami-id: ami-04b61d6a053ad2539 - ss-id-suffix: base - ap-northeast-1: - - ami-id: ami-0052528bdd809d899 - ss-id-suffix: base - ap-northeast-2: - - ami-id: ami-052d9a481ce0de50a - ss-id-suffix: base - ap-south-1: - - ami-id: ami-0a69d3ff816398377 - ss-id-suffix: base - ap-southeast-1: - - ami-id: ami-091062b883853b295 - ss-id-suffix: base - ap-southeast-2: - - ami-id: ami-0cfdc63b39f103cab - ss-id-suffix: base - ca-central-1: - - ami-id: ami-052a1a6ef4db58dd8 - ss-id-suffix: base - eu-central-1: - - ami-id: ami-0162ae2b9d245b9a5 - ss-id-suffix: base - eu-north-1: - - ami-id: ami-00658799cfc32659e - ss-id-suffix: base - eu-south-1: - - ami-id: ami-0c28ae8b6a03e9904 - ss-id-suffix: base - eu-west-1: - - ami-id: ami-0c47424ef2c94b774 - ss-id-suffix: base - eu-west-2: - - ami-id: ami-02868404201349f83 - ss-id-suffix: base - eu-west-3: - - ami-id: ami-07dd7b23f721e7bbc - ss-id-suffix: base - me-south-1: - - ami-id: ami-02d946c5a59126c32 - ss-id-suffix: base - sa-east-1: - - ami-id: ami-05b835a95ace17eee - ss-id-suffix: base - us-east-1: - - ami-id: ami-0144a5a84f5699847 - ss-id-suffix: base - us-east-2: - - ami-id: ami-0fb25f99cfe1c665e - ss-id-suffix: base - us-west-1: - - ami-id: ami-0de261f921415431f - ss-id-suffix: base - us-west-2: - - ami-id: ami-0fbf55055efe5787e - ss-id-suffix: base - x86-64: - default-description: 'CentOS 7 - x86_64' - default-min-ram-unit: gb - default-min-ram-value: 4 - default-min-storage-unit: gb - default-min-storage-value: 10 - default-name: 'CentOS 7 - x86_64' - af-south-1: - - ami-id: ami-0cf2f235226a4d1f2 - ss-id-suffix: base - ap-east-1: - - ami-id: ami-039ac400e94785a1d - ss-id-suffix: base - ap-northeast-1: - - ami-id: ami-06e6d2122baa563c4 - ss-id-suffix: base - ap-northeast-2: - - ami-id: ami-061f5322ab2662c82 - ss-id-suffix: base - ap-south-1: - - ami-id: ami-09f129ee53d3523c0 - ss-id-suffix: base - ap-south-2: - - ami-id: ami-0d121f146c20fafa0 - ss-id-suffix: base - ap-southeast-1: - - ami-id: ami-03bfba2e75432064e - ss-id-suffix: base - ap-southeast-2: - - ami-id: ami-0264ead5294ad1773 - ss-id-suffix: base - ap-southeast-3: - - ami-id: ami-0c654ac429998fb1c - ss-id-suffix: base - ap-southeast-4: - - ami-id: ami-0d3bff5ed9ff3e5a4 - ss-id-suffix: base - ca-central-1: - - ami-id: ami-01ebef6e00efb2c20 - ss-id-suffix: base - eu-central-1: - - ami-id: ami-0afcbcee3dfbce929 - ss-id-suffix: base - eu-central-2: - - ami-id: ami-0e7ae4065721cafb3 - ss-id-suffix: base - eu-north-1: - - ami-id: ami-0e5125a0f19c52a2b - ss-id-suffix: base - eu-south-1: - - ami-id: ami-0a3a6d4d737db3bc1 - ss-id-suffix: base - eu-south-2: - - ami-id: ami-0f4cbddb1f35cb43c - ss-id-suffix: base - eu-west-1: - - ami-id: ami-00d464afa64e1fc69 - ss-id-suffix: base - eu-west-2: - - ami-id: ami-0de2f45684e59282c - ss-id-suffix: base - eu-west-3: - - ami-id: ami-051806c39fa542e22 - ss-id-suffix: base - me-central-1: - - ami-id: ami-052fe108e664d633f - ss-id-suffix: base - me-south-1: - - ami-id: ami-09ce1cd69cab28540 - ss-id-suffix: base - sa-east-1: - - ami-id: ami-015f6bf0657816a2d - ss-id-suffix: base - us-east-1: - - ami-id: ami-0aedf6b1cb669b4c7 - ss-id-suffix: base - us-east-2: - - ami-id: ami-033adaf0b583374d4 - ss-id-suffix: base - us-west-1: - - ami-id: ami-0bcd12d19d926f8e9 - ss-id-suffix: base - us-west-2: - - ami-id: ami-04f798ca92cc13f74 - ss-id-suffix: base -rhel7: - x86-64: - default-description: 'RHEL 7 - x86_64' - default-min-ram-unit: gb - default-min-ram-value: 4 - default-min-storage-unit: gb - default-min-storage-value: 10 - default-name: 'RHEL 7 - x86_64' - af-south-1: - - ami-id: ami-0fe7507703898a688 - ss-id-suffix: base - ap-east-1: - - ami-id: ami-0d113ed541942504a - ss-id-suffix: base - ap-northeast-1: - - ami-id: ami-05016d58118cb4881 - ss-id-suffix: base - ap-northeast-2: - - ami-id: ami-004ed0ba77095ba25 - ss-id-suffix: base - ap-northeast-3: - - ami-id: ami-0558aa3a1b91c9d74 - ss-id-suffix: base - ap-south-1: - - ami-id: ami-0ea2ce8b668f422ce - ss-id-suffix: base - ap-south-2: - - ami-id: ami-06ed2b77cde70d481 - ss-id-suffix: base - ap-southeast-1: - - ami-id: ami-0883712f4e7f557f7 - ss-id-suffix: base - ap-southeast-2: - - ami-id: ami-01edb389be6d2ae7f - ss-id-suffix: base - ap-southeast-3: - - ami-id: ami-0e1bd60bacf164ead - ss-id-suffix: base - ap-southeast-4: - - ami-id: ami-03808fa671587a04f - ss-id-suffix: base - ca-central-1: - - ami-id: ami-08ba906b09cdf48ff - ss-id-suffix: base - eu-central-1: - - ami-id: ami-058a887d3af3bc23e - ss-id-suffix: base - eu-central-2: - - ami-id: ami-092d941941bc1cb73 - ss-id-suffix: base - eu-north-1: - - ami-id: ami-0930c6515d30d4867 - ss-id-suffix: base - eu-south-1: - - ami-id: ami-03e09da05c106a5bc - ss-id-suffix: base - eu-south-2: - - ami-id: ami-04341b15cf57b1df9 - ss-id-suffix: base - eu-west-1: - - ami-id: ami-018e4344af2a62450 - ss-id-suffix: base - eu-west-2: - - ami-id: ami-0c2f9865057c3dfe1 - ss-id-suffix: base - eu-west-3: - - ami-id: ami-053b42a6733c52f17 - ss-id-suffix: base - il-central-1: - - ami-id: ami-0fa62108f2a0dfad2 - ss-id-suffix: base - me-central-1: - - ami-id: ami-068543e4b7405fbb2 - ss-id-suffix: base - me-south-1: - - ami-id: ami-0b6a0e920d35d15a7 - ss-id-suffix: base - sa-east-1: - - ami-id: ami-0562b80a8716922c9 - ss-id-suffix: base - us-east-1: - - ami-id: ami-045393c081cabeb1f - ss-id-suffix: base - us-east-2: - - ami-id: ami-00342897eb8ba6355 - ss-id-suffix: base - us-gov-west-1: - - ami-id: ami-09616d1f2ecd77e9b - ss-id-suffix: base - us-west-1: - - ami-id: ami-039ca986f21216c27 - ss-id-suffix: base - us-west-2: - - ami-id: ami-01788be7cc93be6ee - ss-id-suffix: base rhel8: arm64: default-description: 'RHEL 8 - arm64' @@ -618,6 +370,65 @@ rhel8: us-west-2: - ami-id: ami-030bea4543b3db5de ss-id-suffix: base +ubuntu2204: + x86-64: + default-description: Ubuntu 22.04 - x86_64 + default-min-ram-unit: gb + default-min-ram-value: 4 + default-min-storage-unit: gb + default-min-storage-value: 10 + default-name: Ubuntu 22.04 - x86_64 + ap-northeast-1: + - ami-id: ami-0c507bac12676abde + ss-id-suffix: base + ap-northeast-2: + - ami-id: ami-0146f53dcc4173b9b + ss-id-suffix: base + ap-south-1: + - ami-id: ami-00d1d69533a194191 + ss-id-suffix: base + ap-southeast-1: + - ami-id: ami-0f2c63fb38cd238b9 + ss-id-suffix: base + ap-southeast-2: + - ami-id: ami-009d0779401611280 + ss-id-suffix: base + ca-central-1: + - ami-id: ami-090a0eb43b8941c4b + ss-id-suffix: base + eu-central-1: + - ami-id: ami-04e945a5ffd095d8e + ss-id-suffix: base + eu-south-1: + - ami-id: ami-0d7a57c64ff08d049 + ss-id-suffix: base + eu-west-1: + - ami-id: ami-0095aed963d3ed501 + ss-id-suffix: base + eu-west-2: + - ami-id: ami-03559713c297ec8fb + ss-id-suffix: base + eu-west-3: + - ami-id: ami-006309dc998f7abfe + ss-id-suffix: base + il-central-1: + - ami-id: ami-0b1718066f1418840 + ss-id-suffix: base + us-east-1: + - ami-id: ami-04ffc9f7871904759 + ss-id-suffix: base + us-east-2: + - ami-id: ami-073ff8e13d826b7f8 + ss-id-suffix: base + us-west-1: + - ami-id: ami-033592d7e35594a4c + ss-id-suffix: base + us-west-2: + - ami-id: ami-0e537d0faf7bc0031 + ss-id-suffix: base + us-gov-west-1: + - ami-id: ami-0158011b8a9e6533f + ss-id-suffix: base rhel9: arm64: default-description: 'RHEL 9 - arm64' diff --git a/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller/app/api/virtual_desktop_api.py b/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller/app/api/virtual_desktop_api.py index ddec51e..0531cb9 100644 --- a/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller/app/api/virtual_desktop_api.py +++ b/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller/app/api/virtual_desktop_api.py @@ -344,16 +344,13 @@ def validate_create_session_request(self, session: VirtualDesktopSession) -> (Vi return session, False # Technical Validation for Hibernation. - if session.hibernation_enabled and session.software_stack.base_os in {VirtualDesktopBaseOS.RHEL7, VirtualDesktopBaseOS.CENTOS7}: - session.failure_reason = f'OS {session.software_stack.base_os} does not support Instance Hibernation' - return session, False - elif session.hibernation_enabled and session.software_stack.base_os is VirtualDesktopBaseOS.WINDOWS: + if session.hibernation_enabled and session.software_stack.base_os is VirtualDesktopBaseOS.WINDOWS: ram = self.controller_utils.get_instance_ram(session.server.instance_type).as_unit(SocaMemoryUnit.GiB) if ram.value > 16: session.failure_reason = f'OS {session.software_stack.base_os} does not support Instance Hibernation for instances with RAM greater than 16GiB.' return session, False else: - # amazonlinux2, rhel8, rocky8 support hibernation + # amazonlinux2, ubuntu2204, rhel8, rocky8 support hibernation pass # Technical Validations for Session Type diff --git a/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller/app/clients/dcv_broker_client/dcv_broker_client_utils.py b/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller/app/clients/dcv_broker_client/dcv_broker_client_utils.py index 4e0aa04..753a6bd 100644 --- a/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller/app/clients/dcv_broker_client/dcv_broker_client_utils.py +++ b/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller/app/clients/dcv_broker_client/dcv_broker_client_utils.py @@ -107,7 +107,7 @@ def get_session_object_from_error_result(session_json) -> VirtualDesktopSession: @staticmethod def get_storage_root_for_base_os(base_os: VirtualDesktopBaseOS, owner) -> str: - if base_os in (VirtualDesktopBaseOS.AMAZON_LINUX2, VirtualDesktopBaseOS.CENTOS7, VirtualDesktopBaseOS.RHEL7, VirtualDesktopBaseOS.RHEL8, VirtualDesktopBaseOS.RHEL9, VirtualDesktopBaseOS.ROCKY8, VirtualDesktopBaseOS.ROCKY9): + if base_os in (VirtualDesktopBaseOS.AMAZON_LINUX2, VirtualDesktopBaseOS.RHEL8, VirtualDesktopBaseOS.RHEL9, VirtualDesktopBaseOS.ROCKY8, VirtualDesktopBaseOS.ROCKY9, VirtualDesktopBaseOS.UBUNTU2204): return f'/data/home/{owner}/storage-root' return f'C:\\session-storage\\{owner}' @@ -123,6 +123,7 @@ def get_commands_to_execute_for_resuming_session(self, session: VirtualDesktopSe f'--owner {session.owner} --storage-root `"{storage_root}`" ' if Utils.is_not_empty(permissions_content): permissions_folder = f'C:\\Program Files\\NICE\\DCV\\{session.dcv_session_id}\\' + command_list.append(f'Start-Sleep -Seconds 10') command_list.append(f'Remove-Item -Recurse -Force "{permissions_folder}"') command_list.append(f'New-Item -Path "{permissions_folder}" -ItemType Directory') command_list.append(f'New-Item -Path "{permissions_folder}" -Name "idea.perm" -ItemType File -Force -Value "{permissions_content}"') diff --git a/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller/app/sessions/virtual_desktop_session_db.py b/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller/app/sessions/virtual_desktop_session_db.py index 3ef77c2..e07d963 100644 --- a/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller/app/sessions/virtual_desktop_session_db.py +++ b/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller/app/sessions/virtual_desktop_session_db.py @@ -432,7 +432,7 @@ def _list_from_index(self, options: ListSessionsRequest) -> Dict: # needs to see all OS's no point adding a filter for OS at this point continue elif listing_filter.key == sessions_constants.USER_SESSION_DB_FILTER_BASE_OS_KEY and listing_filter.value == 'linux': - listing_filter.value = [VirtualDesktopBaseOS.AMAZON_LINUX2.value, VirtualDesktopBaseOS.RHEL7.value, VirtualDesktopBaseOS.CENTOS7.value, VirtualDesktopBaseOS.RHEL8.value, VirtualDesktopBaseOS.RHEL9.value, VirtualDesktopBaseOS.ROCKY8.value, VirtualDesktopBaseOS.ROCKY9.value] + listing_filter.value = [VirtualDesktopBaseOS.AMAZON_LINUX2.value, VirtualDesktopBaseOS.RHEL8.value, VirtualDesktopBaseOS.RHEL9.value, VirtualDesktopBaseOS.ROCKY8.value, VirtualDesktopBaseOS.ROCKY9.value, VirtualDesktopBaseOS.UBUNTU2204.value] new_filters.append(listing_filter) diff --git a/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller_meta/__init__.py b/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller_meta/__init__.py index e2a0dc8..941cb87 100644 --- a/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller_meta/__init__.py +++ b/source/idea/idea-virtual-desktop-controller/src/ideavirtualdesktopcontroller_meta/__init__.py @@ -10,4 +10,4 @@ # and limitations under the License. __name__ = 'idea-virtual-desktop-controller' -__version__ = '3.1.7' +__version__ = '3.1.8'