From 5ad117f0e348f360163c7754c866f08c68b6ba7b Mon Sep 17 00:00:00 2001 From: Kharkunov Eugene Date: Mon, 12 Aug 2024 21:26:06 +0300 Subject: [PATCH] Move Artifact registry to other region. --- .github/workflows/application-build.yml | 2 +- .github/workflows/docker-env-build.yml | 6 ++-- build.gradle | 2 +- server/README.md | 12 +++---- server/build-docker.sh | 4 +-- server/docker/Dockerfile.android-env | 2 +- server/docker/Dockerfile.android.ndk25-env | 2 +- server/docker/Dockerfile.base-env | 2 +- server/docker/Dockerfile.emsdk.2011-env | 2 +- server/docker/Dockerfile.emsdk.3155-env | 2 +- server/docker/Dockerfile.linux-env | 2 +- server/docker/Dockerfile.nssdk.1532-env | 2 +- server/docker/Dockerfile.nssdk.1753-env | 2 +- server/docker/Dockerfile.ps4.10500-env | 2 +- server/docker/Dockerfile.ps4.11000-env | 2 +- server/docker/Dockerfile.ps5.8000-env | 2 +- server/docker/Dockerfile.wine-env | 2 +- server/docker/Dockerfile.winsdk.2019-env | 2 +- server/docker/Dockerfile.winsdk.2022-env | 2 +- server/docker/common-services.yml | 2 +- server/docker/docker-compose.yml | 40 +++++++++++----------- 21 files changed, 48 insertions(+), 48 deletions(-) diff --git a/.github/workflows/application-build.yml b/.github/workflows/application-build.yml index 786152d4..dd3237c4 100644 --- a/.github/workflows/application-build.yml +++ b/.github/workflows/application-build.yml @@ -9,7 +9,7 @@ on: - "manifestmergetool-v[0-9]+.[0-9]+.[0-9]+" env: - GOOGLE_ARTIFACT_REGISTRY: europe-north1-docker.pkg.dev + GOOGLE_ARTIFACT_REGISTRY: europe-west1-docker.pkg.dev MAVEN_SERVICE_ACCOUNT: hip-terrier-registry@extender-426409.iam.gserviceaccount.com jobs: diff --git a/.github/workflows/docker-env-build.yml b/.github/workflows/docker-env-build.yml index d3332386..70c7c636 100644 --- a/.github/workflows/docker-env-build.yml +++ b/.github/workflows/docker-env-build.yml @@ -17,9 +17,9 @@ on: env: - GOOGLE_ARTIFACT_REGISTRY: europe-north1-docker.pkg.dev - PUBLIC_REGISTRY: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry - PRIVATE_REGISTRY: europe-north1-docker.pkg.dev/extender-426409/extender-private-registry + GOOGLE_ARTIFACT_REGISTRY: europe-west1-docker.pkg.dev + PUBLIC_REGISTRY: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry + PRIVATE_REGISTRY: europe-west1-docker.pkg.dev/extender-426409/extender-private-registry PRIVATE_PLATFORMS: "nssdk ps4 ps5" jobs: diff --git a/build.gradle b/build.gradle index 1376fa65..443b03d4 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ publishing { repositories { maven { name "extenderRepo" - url "artifactregistry://europe-north1-maven.pkg.dev/extender-426409/extender-maven/" + url "artifactregistry://europe-west1-maven.pkg.dev/extender-426409/extender-maven/" } } } diff --git a/server/README.md b/server/README.md index beb1f2a8..1ffb1499 100644 --- a/server/README.md +++ b/server/README.md @@ -19,11 +19,11 @@ Extender instance should run in preconfigured environment (where necessary SDKs, ``` 3. Configure Docker to use Artifact registries ```sh - gcloud auth configure-docker europe-north1-docker.pkg.dev + gcloud auth configure-docker europe-west1-docker.pkg.dev ``` 4. Check that everything set up correctly by pulling base image. Run ```sh - docker pull europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:latest + docker pull europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:latest ``` ## How to build docker images locally @@ -43,9 +43,9 @@ By default all built images tagged with `latest` version. ## How to add new Docker image with new environment 1. Place new Dockerfile in `server/docker` folder. Docker file should have name in format `Dockerfile.[.]-env` (version can be optional if Dockerfile contains some common stuff for other images). 2. Depends on plaform choose right base image (for `FROM` instruction): - 1. `europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-android-env` for any **Android-based** images - 2. `europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-wine-env` for any **Windows-based** images - 3. `europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env` for the rest of cases + 1. `europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-android-env` for any **Android-based** images + 2. `europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-wine-env` for any **Windows-based** images + 3. `europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env` for the rest of cases 3. Set exact version of base image in `FROM` instruction. 4. Add appropriate command to `server/build-docker.sh` script. 5. Run `server/build-docker.sh` and check that everything is built correctly. @@ -142,7 +142,7 @@ As an example show stepp on Android NDK25 Docker image. ``` or single docker build command ```sh - DM_PACKAGES_URL= docker buildx build --secret id=DM_PACKAGES_URL --platform linux/amd64 -t europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-android-env:latest -f ./server/docker/Dockerfile.android-env ./server/docker + DM_PACKAGES_URL= docker buildx build --secret id=DM_PACKAGES_URL --platform linux/amd64 -t europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-android-env:latest -f ./server/docker/Dockerfile.android-env ./server/docker ``` 3. Create new git tag according to name convention: `[.]-` diff --git a/server/build-docker.sh b/server/build-docker.sh index d968bad3..a8b06803 100755 --- a/server/build-docker.sh +++ b/server/build-docker.sh @@ -3,8 +3,8 @@ set -e SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -DOCKER_REGISTRY=europe-north1-docker.pkg.dev/extender-426409/extender-public-registry -DOCKER_PRIVATE_REGISTRY=europe-north1-docker.pkg.dev/extender-426409/extender-private-registry +DOCKER_REGISTRY=europe-west1-docker.pkg.dev/extender-426409/extender-public-registry +DOCKER_PRIVATE_REGISTRY=europe-west1-docker.pkg.dev/extender-426409/extender-private-registry # base images echo "Base image" diff --git a/server/docker/Dockerfile.android-env b/server/docker/Dockerfile.android-env index 858e2c56..f29934b2 100644 --- a/server/docker/Dockerfile.android-env +++ b/server/docker/Dockerfile.android-env @@ -1,4 +1,4 @@ -FROM europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 +FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 # Technically part of the Android build, but also required by the GradleService.java # until it can be disabled (e.g. by looking for the existance of GRADLE_USER_HOME) diff --git a/server/docker/Dockerfile.android.ndk25-env b/server/docker/Dockerfile.android.ndk25-env index 3187ca74..dacf2ed0 100644 --- a/server/docker/Dockerfile.android.ndk25-env +++ b/server/docker/Dockerfile.android.ndk25-env @@ -1,4 +1,4 @@ -FROM europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-android-env:1.3.0 +FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-android-env:1.3.0 # # Android SDK/NDK diff --git a/server/docker/Dockerfile.base-env b/server/docker/Dockerfile.base-env index 710dd0b3..48f4139b 100644 --- a/server/docker/Dockerfile.base-env +++ b/server/docker/Dockerfile.base-env @@ -85,7 +85,7 @@ RUN \ RUN \ - export DOTNET_VERSION=$(dotnet --info | grep -A 1 'Host' | grep 'Version' | awk '{print $NF}') && \ + export DOTNET_VERSION=$(${DOTNET_ROOT}/dotnet --info | grep -A 1 'Host' | grep 'Version' | awk '{print $NF}') && \ echo ${DOTNET_VERSION} > ${DOTNET_VERSION_FILE} # Final cleanup diff --git a/server/docker/Dockerfile.emsdk.2011-env b/server/docker/Dockerfile.emsdk.2011-env index cb5f4f95..b5aa7cb7 100644 --- a/server/docker/Dockerfile.emsdk.2011-env +++ b/server/docker/Dockerfile.emsdk.2011-env @@ -1,4 +1,4 @@ -FROM europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 +FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 # # EMSCRIPTEN diff --git a/server/docker/Dockerfile.emsdk.3155-env b/server/docker/Dockerfile.emsdk.3155-env index 699117d0..1543502b 100644 --- a/server/docker/Dockerfile.emsdk.3155-env +++ b/server/docker/Dockerfile.emsdk.3155-env @@ -1,4 +1,4 @@ -FROM europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 +FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 # Ubuntu still seem to use python3 3.8 as default version RUN \ diff --git a/server/docker/Dockerfile.linux-env b/server/docker/Dockerfile.linux-env index bf0388d6..698b1ec4 100644 --- a/server/docker/Dockerfile.linux-env +++ b/server/docker/Dockerfile.linux-env @@ -1,4 +1,4 @@ -FROM europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 +FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 RUN \ echo "LINUX TOOLS + COMPILER" && \ diff --git a/server/docker/Dockerfile.nssdk.1532-env b/server/docker/Dockerfile.nssdk.1532-env index bb2c042e..76200d78 100644 --- a/server/docker/Dockerfile.nssdk.1532-env +++ b/server/docker/Dockerfile.nssdk.1532-env @@ -1,4 +1,4 @@ -FROM europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 +FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 # Added in version 1.4.4 ENV NINTENDO_SDK_ROOT_15_3_2=${PLATFORMSDK_DIR}/nx-15.3.2 diff --git a/server/docker/Dockerfile.nssdk.1753-env b/server/docker/Dockerfile.nssdk.1753-env index cadd3356..32a830e9 100644 --- a/server/docker/Dockerfile.nssdk.1753-env +++ b/server/docker/Dockerfile.nssdk.1753-env @@ -1,4 +1,4 @@ -FROM europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 +FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 ENV NINTENDO_SDK_ROOT_17_5=${PLATFORMSDK_DIR}/nx-17.5.3 ENV SWITCH_SDK_17_FILENAME=nx64-sdk-17.5.3.tar.gz diff --git a/server/docker/Dockerfile.ps4.10500-env b/server/docker/Dockerfile.ps4.10500-env index ea637587..cdd3461b 100644 --- a/server/docker/Dockerfile.ps4.10500-env +++ b/server/docker/Dockerfile.ps4.10500-env @@ -1,4 +1,4 @@ -FROM europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 +FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 ENV PS4_SDK_10=${PLATFORMSDK_DIR}/ps4-sdk-10.500 diff --git a/server/docker/Dockerfile.ps4.11000-env b/server/docker/Dockerfile.ps4.11000-env index f8cee1f1..5f8c6ecc 100644 --- a/server/docker/Dockerfile.ps4.11000-env +++ b/server/docker/Dockerfile.ps4.11000-env @@ -1,4 +1,4 @@ -FROM europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 +FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 ENV PS4_SDK_11_VERSION=11.000 ENV PS4_SDK_11=${PLATFORMSDK_DIR}/ps4-sdk-${PS4_SDK_11_VERSION} diff --git a/server/docker/Dockerfile.ps5.8000-env b/server/docker/Dockerfile.ps5.8000-env index e3526a43..7ebdc3b9 100644 --- a/server/docker/Dockerfile.ps5.8000-env +++ b/server/docker/Dockerfile.ps5.8000-env @@ -1,4 +1,4 @@ -FROM europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 +FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 ENV PS5_SDK_8_VERSION=8.000 ENV PS5_SDK_8=${PLATFORMSDK_DIR}/ps5-sdk-${PS5_SDK_8_VERSION} diff --git a/server/docker/Dockerfile.wine-env b/server/docker/Dockerfile.wine-env index 642f6bcf..ab0a2e45 100644 --- a/server/docker/Dockerfile.wine-env +++ b/server/docker/Dockerfile.wine-env @@ -1,4 +1,4 @@ -FROM europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 +FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:1.2.0 # Installation notes: https://wiki.winehq.org/Ubuntu # TODO: Backup the files as descibed here: https://wiki.winehq.org/Ubuntu diff --git a/server/docker/Dockerfile.winsdk.2019-env b/server/docker/Dockerfile.winsdk.2019-env index 71131d44..f270b291 100644 --- a/server/docker/Dockerfile.winsdk.2019-env +++ b/server/docker/Dockerfile.winsdk.2019-env @@ -1,4 +1,4 @@ -FROM europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-wine-env:1.2.0 +FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-wine-env:1.2.0 ENV \ PLATFORMSDK_WIN32=$PLATFORMSDK_DIR/Win32 \ diff --git a/server/docker/Dockerfile.winsdk.2022-env b/server/docker/Dockerfile.winsdk.2022-env index 8516f96c..e0e20732 100644 --- a/server/docker/Dockerfile.winsdk.2022-env +++ b/server/docker/Dockerfile.winsdk.2022-env @@ -1,4 +1,4 @@ -FROM europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-wine-env:1.2.0 +FROM europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-wine-env:1.2.0 ENV PLATFORMSDK_WIN32=$PLATFORMSDK_DIR/Win32 diff --git a/server/docker/common-services.yml b/server/docker/common-services.yml index c937a8ae..9f331631 100644 --- a/server/docker/common-services.yml +++ b/server/docker/common-services.yml @@ -14,7 +14,7 @@ services: - ./../app/:/app/:ro - ./../manifestmergetool/app/manifestmergetool.jar:/etc/extender/apps/manifestmergetool.jar:ro - ./../configs:/etc/defold/extender:ro - entrypoint: ["java","-Xmx4g","-XX:MaxDirectMemorySize=2g","-jar","/app/extender.jar"] + entrypoint: ["java","-Xdebug","-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005","-Xmx4g","-XX:MaxDirectMemorySize=2g","-jar","/app/extender.jar"] environment: - EXAMPLE_VAR=1 # - DM_DEBUG_COMMANDS=1 diff --git a/server/docker/docker-compose.yml b/server/docker/docker-compose.yml index cf067500..c06ce010 100644 --- a/server/docker/docker-compose.yml +++ b/server/docker/docker-compose.yml @@ -2,7 +2,7 @@ name: extender services: frontend-dev: - image: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:latest extends: file: common-services.yml service: common_builder @@ -25,7 +25,7 @@ services: aliases: - frontend linux-dev: - image: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-linux-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-linux-env:latest extends: file: common-services.yml service: remote_builder @@ -38,7 +38,7 @@ services: aliases: - linux android_ndk25-dev: - image: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-android-ndk25-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-android-ndk25-env:latest extends: file: common-services.yml service: common_builder @@ -51,7 +51,7 @@ services: aliases: - android-ndk25 emscripten_2011-dev: - image: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-2011-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-2011-env:latest extends: file: common-services.yml service: remote_builder @@ -64,7 +64,7 @@ services: aliases: - emsdk-2011 emscripten_3155-dev: - image: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-3155-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-3155-env:latest extends: file: common-services.yml service: remote_builder @@ -77,7 +77,7 @@ services: aliases: - emsdk-3155 nssdk_1532-dev: - image: europe-north1-docker.pkg.dev/extender-426409/extender-private-registry/extender-nssdk-1532-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-private-registry/extender-nssdk-1532-env:latest extends: file: common-services.yml service: remote_builder @@ -91,7 +91,7 @@ services: aliases: - nssdk-1532 nssdk_1753-dev: - image: europe-north1-docker.pkg.dev/extender-426409/extender-private-registry/extender-nssdk-1753-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-private-registry/extender-nssdk-1753-env:latest extends: file: common-services.yml service: remote_builder @@ -105,7 +105,7 @@ services: aliases: - nssdk-1753 ps4_11000-dev: - image: europe-north1-docker.pkg.dev/extender-426409/extender-private-registry/extender-ps4-11000-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-private-registry/extender-ps4-11000-env:latest extends: file: common-services.yml service: remote_builder @@ -119,7 +119,7 @@ services: aliases: - ps4-11000 ps4_10500-dev: - image: europe-north1-docker.pkg.dev/extender-426409/extender-private-registry/extender-ps4-10500-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-private-registry/extender-ps4-10500-env:latest extends: file: common-services.yml service: remote_builder @@ -133,7 +133,7 @@ services: aliases: - ps4-10500 ps5_8000-dev: - image: europe-north1-docker.pkg.dev/extender-426409/extender-private-registry/extender-ps5-8000-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-private-registry/extender-ps5-8000-env:latest extends: file: common-services.yml service: remote_builder @@ -147,7 +147,7 @@ services: aliases: - ps5-8000 win_2019-dev: - image: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-winsdk-2019-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-winsdk-2019-env:latest extends: file: common-services.yml service: remote_builder @@ -160,7 +160,7 @@ services: aliases: - winsdk-2019 win_2022-dev: - image: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-winsdk-2022-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-winsdk-2022-env:latest extends: file: common-services.yml service: remote_builder @@ -175,7 +175,7 @@ services: # services for integration testing frontend-integration-test: - image: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:latest extends: file: common-services.yml service: test_builder @@ -191,7 +191,7 @@ services: aliases: - frontend linux-integration-test: - image: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-linux-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-linux-env:latest extends: file: common-services.yml service: test_remote_builder @@ -203,7 +203,7 @@ services: aliases: - linux android_ndk25-integration-test: - image: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-android-ndk25-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-android-ndk25-env:latest extends: file: common-services.yml service: test_builder @@ -216,7 +216,7 @@ services: aliases: - android-ndk25 emscripten_2011-integration-test: - image: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-2011-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-2011-env:latest extends: file: common-services.yml service: test_remote_builder @@ -227,7 +227,7 @@ services: aliases: - emsdk-2011 emscripten_3155-integration-test: - image: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-3155-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-emsdk-3155-env:latest extends: file: common-services.yml service: test_remote_builder @@ -238,7 +238,7 @@ services: aliases: - emsdk-3155 win_2019-integration-test: - image: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-winsdk-2019-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-winsdk-2019-env:latest extends: file: common-services.yml service: test_remote_builder @@ -249,7 +249,7 @@ services: aliases: - winsdk-2019 win_2022-integration-test: - image: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-winsdk-2022-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-winsdk-2022-env:latest extends: file: common-services.yml service: test_remote_builder @@ -262,7 +262,7 @@ services: # linux service for auth testing frontend-auth-test: - image: europe-north1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:latest + image: europe-west1-docker.pkg.dev/extender-426409/extender-public-registry/extender-base-env:latest extends: file: common-services.yml service: test_builder