From a5edc94da877bb26a060b90955e2adb41234b94f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ritzl?= Date: Tue, 28 Nov 2023 15:29:38 +0100 Subject: [PATCH 1/6] Added dev setup scripts --- server/scripts/publish-darwin-dev.sh | 27 +++++++++++++++++++ .../resources/application-standalone-dev.yml | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100755 server/scripts/publish-darwin-dev.sh diff --git a/server/scripts/publish-darwin-dev.sh b/server/scripts/publish-darwin-dev.sh new file mode 100755 index 00000000..10c5d283 --- /dev/null +++ b/server/scripts/publish-darwin-dev.sh @@ -0,0 +1,27 @@ +#!/bin/bash -e + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +SOURCE_DIR=${SCRIPT_DIR}/../.. + +VERSION=$(date "+%Y%m%d_%H%M") + +PRODUCTION_VARIANT=dev +TARGET_HOST_URL=build-darwin-${PRODUCTION_VARIANT}.defold.com +TARGET_HOST=i-0d371683f5c876b73 +TARGET_USER=ec2-user +TARGET_DIR=/usr/local/extender-${PRODUCTION_VARIANT} +TARGET_KEY=~/.ssh/defold2_ec2.pem + +source ${SCRIPT_DIR}/standalone/publish-standalone.sh + +check_uncommitted_changes ${SOURCE_DIR} +build_artifact ${SOURCE_DIR} +deploy_artifact ${SOURCE_DIR} ${TARGET_DIR} ${VERSION} ${TARGET_HOST} ${TARGET_USER} ${TARGET_KEY} ${PRODUCTION_VARIANT} + +SERVER=https://${TARGET_HOST_URL} + +echo "**********************************" +echo "Checking the server version at ${SERVER}:" +wget -q -O - $SERVER +echo "" +echo "**********************************" diff --git a/server/src/main/resources/application-standalone-dev.yml b/server/src/main/resources/application-standalone-dev.yml index e41626fe..8f379cf0 100644 --- a/server/src/main/resources/application-standalone-dev.yml +++ b/server/src/main/resources/application-standalone-dev.yml @@ -3,7 +3,7 @@ server: port: 9010 extender: - sdk.location: /usr/local/extender/sdk + sdk.location: /usr/local/extender-dev/sdk cache: enabled: false remote-builder: From c11819409b46f30447168c64a2e98627d5813960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ritzl?= Date: Wed, 29 Nov 2023 10:11:28 +0100 Subject: [PATCH 2/6] Added dev and local configs --- server/src/main/resources/application-dev.yml | 18 ++++++++---------- .../src/main/resources/application-local.yaml | 15 +++++++++++++++ .../resources/application-standalone-dev.yml | 4 +++- 3 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 server/src/main/resources/application-local.yaml diff --git a/server/src/main/resources/application-dev.yml b/server/src/main/resources/application-dev.yml index 0aa9304e..b210ec75 100644 --- a/server/src/main/resources/application-dev.yml +++ b/server/src/main/resources/application-dev.yml @@ -1,15 +1,13 @@ extender: - sdk: - cache-clear-on-exit: false + sdk.cache-size: 5 cache: + type: S3 + s3.bucket: defold-extender-cache-dev + remote-builder: enabled: true - type: LOCAL - local.basedir: /var/extender/cache/data - #type: S3 - #s3.bucket: defold-extender-cache-dev + url: https://build-darwin-dev.defold.com - remote-builder: - enabled: false - # This points to the host machine from inside docker - url: http://host.docker.internal:9010 +endpoints: + health: + sensitive: true diff --git a/server/src/main/resources/application-local.yaml b/server/src/main/resources/application-local.yaml new file mode 100644 index 00000000..0aa9304e --- /dev/null +++ b/server/src/main/resources/application-local.yaml @@ -0,0 +1,15 @@ + +extender: + sdk: + cache-clear-on-exit: false + cache: + enabled: true + type: LOCAL + local.basedir: /var/extender/cache/data + #type: S3 + #s3.bucket: defold-extender-cache-dev + + remote-builder: + enabled: false + # This points to the host machine from inside docker + url: http://host.docker.internal:9010 diff --git a/server/src/main/resources/application-standalone-dev.yml b/server/src/main/resources/application-standalone-dev.yml index 8f379cf0..d0ad4e80 100644 --- a/server/src/main/resources/application-standalone-dev.yml +++ b/server/src/main/resources/application-standalone-dev.yml @@ -3,7 +3,9 @@ server: port: 9010 extender: - sdk.location: /usr/local/extender-dev/sdk + sdk: + location: /usr/local/extender-dev/sdk + cache-size: 5 cache: enabled: false remote-builder: From 8879f9dec8b69c9a55d9e7549b8e3c76dbb69f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ritzl?= Date: Wed, 29 Nov 2023 14:44:41 +0100 Subject: [PATCH 3/6] Formatting --- server/src/main/resources/application-dev.yml | 3 ++- server/src/main/resources/application-production.yml | 3 ++- server/src/main/resources/application-stage.yml | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/server/src/main/resources/application-dev.yml b/server/src/main/resources/application-dev.yml index b210ec75..ff8e93da 100644 --- a/server/src/main/resources/application-dev.yml +++ b/server/src/main/resources/application-dev.yml @@ -1,6 +1,7 @@ extender: - sdk.cache-size: 5 + sdk: + cache-size: 5 cache: type: S3 s3.bucket: defold-extender-cache-dev diff --git a/server/src/main/resources/application-production.yml b/server/src/main/resources/application-production.yml index 3529f916..c38d69f7 100644 --- a/server/src/main/resources/application-production.yml +++ b/server/src/main/resources/application-production.yml @@ -1,6 +1,7 @@ extender: - sdk.cache-size: 5 + sdk: + cache-size: 5 cache: type: S3 s3.bucket: defold-extender-cache-prod diff --git a/server/src/main/resources/application-stage.yml b/server/src/main/resources/application-stage.yml index 98920706..fb9b7884 100644 --- a/server/src/main/resources/application-stage.yml +++ b/server/src/main/resources/application-stage.yml @@ -1,6 +1,7 @@ extender: - sdk.cache-size: 5 + sdk: + cache-size: 5 cache: type: S3 s3.bucket: defold-extender-cache-stage From 436dee385d26c876ca642b4ce5f9224b616d90a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ritzl?= Date: Wed, 29 Nov 2023 16:18:00 +0100 Subject: [PATCH 4/6] Added arm64 setup instruactions --- README_AWS.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README_AWS.md b/README_AWS.md index 5201d9b7..171d73d3 100644 --- a/README_AWS.md +++ b/README_AWS.md @@ -16,6 +16,17 @@ Login using [AWS Session Manager](README_SETUP_RELEASE.md) # install openjdk brew install openjdk@17 +# on arm64 macOS +# https://earthly.dev/blog/homebrew-on-m1/ +echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/ec2-user/.zprofile +eval "$(/opt/homebrew/bin/brew shellenv)" + +# on arm64 macOS +# if not set it seems like Ruby is having certificate verification issues such as: +# 'certificate verify failed (unable to get local issuer certificate)'' +echo 'export SSL_CERT_FILE=/etc/ssl/cert.pem' >> /Users/ec2-user/.zprofile +export SSL_CERT_FILE=/etc/ssl/cert.pem + # symlink openjdk # depending on install location use one of these: sudo ln -sfn /usr/local/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk From 39fc0f2b9389fe005d37c06936c7602347ede50c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ritzl?= Date: Wed, 29 Nov 2023 16:25:40 +0100 Subject: [PATCH 5/6] Revert --- server/src/main/resources/application-production.yml | 3 +-- server/src/main/resources/application-stage.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/server/src/main/resources/application-production.yml b/server/src/main/resources/application-production.yml index c38d69f7..3529f916 100644 --- a/server/src/main/resources/application-production.yml +++ b/server/src/main/resources/application-production.yml @@ -1,7 +1,6 @@ extender: - sdk: - cache-size: 5 + sdk.cache-size: 5 cache: type: S3 s3.bucket: defold-extender-cache-prod diff --git a/server/src/main/resources/application-stage.yml b/server/src/main/resources/application-stage.yml index fb9b7884..98920706 100644 --- a/server/src/main/resources/application-stage.yml +++ b/server/src/main/resources/application-stage.yml @@ -1,7 +1,6 @@ extender: - sdk: - cache-size: 5 + sdk.cache-size: 5 cache: type: S3 s3.bucket: defold-extender-cache-stage From 931adf6e84f2b7aafd450cb8f6e3c4f41a106c5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ritzl?= Date: Wed, 29 Nov 2023 16:26:56 +0100 Subject: [PATCH 6/6] Update application-dev.yml --- server/src/main/resources/application-dev.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/main/resources/application-dev.yml b/server/src/main/resources/application-dev.yml index ff8e93da..b210ec75 100644 --- a/server/src/main/resources/application-dev.yml +++ b/server/src/main/resources/application-dev.yml @@ -1,7 +1,6 @@ extender: - sdk: - cache-size: 5 + sdk.cache-size: 5 cache: type: S3 s3.bucket: defold-extender-cache-dev