Skip to content

Commit

Permalink
DO-2284 / add nginx repo override (#119)
Browse files Browse the repository at this point in the history
* add nginx repo override

* fix actionlint
  • Loading branch information
Kim Fehrs authored Mar 26, 2024
1 parent 961d874 commit 4213783
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 104 deletions.
37 changes: 17 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,7 @@ jobs:
run: |

Check warning on line 336 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:6:5: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/ci.yml:336:9: shellcheck reported issue in this script: SC2086:info:6:5: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 336 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:7:5: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/ci.yml:336:9: shellcheck reported issue in this script: SC2086:info:7:5: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 336 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:6:5: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/ci.yml:336:9: shellcheck reported issue in this script: SC2086:info:6:5: Double quote to prevent globbing and word splitting [shellcheck]

Check warning on line 336 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:7:5: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/ci.yml:336:9: shellcheck reported issue in this script: SC2086:info:7:5: Double quote to prevent globbing and word splitting [shellcheck]
ls -a
chmod +x ./babylonnode
mkdir -p $HOME/node-config
echo "HOME=$HOME"
echo "PATH=$PWD"
mkdir -p "$HOME/node-config"
export PROMPT_FEEDS="node-runner-cli/test-prompts/core-gateway-all-local.yml"
./babylonnode docker config -m DETAILED \
-d $HOME/node-config \
Expand All @@ -352,7 +350,7 @@ jobs:
chmod +x ./babylonnode
export PROMPT_FEEDS="node-runner-cli/test-prompts/corenode-01.yml"
./babylonnode docker config -m DETAILED \
-d $HOME/node-config \
-d "$HOME/node-config" \
-k $KEYSTORE_PASSWORD -nk -a
env:
KEYSTORE_PASSWORD: ${{secrets.KEYSTORE_PASSWORD}}
Expand All @@ -362,8 +360,8 @@ jobs:
ls -a
export PROMPT_FEEDS="node-runner-cli/test-prompts/corenode-02.yml"
./babylonnode docker config -m DETAILED \
-d $HOME/node-config \
-k $KEYSTORE_PASSWORD -nk -a
-d "$HOME/node-config" \
-k "$KEYSTORE_PASSWORD" -nk -a
env:
KEYSTORE_PASSWORD: ${{secrets.KEYSTORE_PASSWORD}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -372,17 +370,17 @@ jobs:
ls -a
export PROMPT_FEEDS="node-runner-cli/test-prompts/gateway-remote-core-local-postgress.yml"
./babylonnode docker config -m DETAILED \
-d $HOME/node-config \
-k $KEYSTORE_PASSWORD -nk -a
-d "$HOME/node-config" \
-k "$KEYSTORE_PASSWORD" -nk -a
env:
KEYSTORE_PASSWORD: ${{secrets.KEYSTORE_PASSWORD}}
- name: gateway-remote-core-remote-postgress
run: |
ls -a
export PROMPT_FEEDS="node-runner-cli/test-prompts/gateway-remote-core-remote-postgress.yml"
./babylonnode docker config -m DETAILED \
-d $HOME/node-config \
-k $KEYSTORE_PASSWORD -nk -a
-d "$HOME/node-config" \
-k "$KEYSTORE_PASSWORD" -nk -a
env:
KEYSTORE_PASSWORD: ${{secrets.KEYSTORE_PASSWORD}}

Expand Down Expand Up @@ -484,29 +482,28 @@ jobs:
- name: Setup config
run: |
chmod +x ./babylonnode
mkdir -p $HOME/babylon-node-config
mkdir -p "$HOME/babylon-node-config"
export DISABLE_VERSION_CHECK=true
export RADIXDLT_APP_VERSION_OVERRIDE="rcnet-v2-phase2-r4"
export DOCKER_COMPOSE_LOCATION="/usr/local/bin/docker-compose"
export PROMPT_FEEDS="node-runner-cli/test-prompts/core-gateway-all-local.yml"
./babylonnode docker config -m DETAILED \
-d $HOME/babylon-node-config \
-k $KEYSTORE_PASSWORD -nk -a
-d "$HOME/babylon-node-config" \
-k "$KEYSTORE_PASSWORD" -nk -a
env:
KEYSTORE_PASSWORD: ${{secrets.KEYSTORE_PASSWORD}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run CLI setup
run: |
export DISABLE_VERSION_CHECK=true
export DOCKER_COMPOSE_LOCATION="/usr/local/bin/docker-compose"
./babylonnode docker install -f $HOME/babylon-node-config/config.yaml -a
# ToDo: Fix Authorization error export DOCKER_COMPOSE_FOLDER_PREFIX=runner ?
./babylonnode docker install -f "$HOME/babylon-node-config/config.yaml" -a
sleep 60
./babylonnode auth set-admin-password -m DOCKER -p $NGINX_ADMIN_PASSWORD
./babylonnode auth set-metrics-password -m DOCKER -p $NGINX_METRICS_PASSWORD
./babylonnode auth set-superadmin-password -m DOCKER -p $NGINX_SUPERADMIN_PASSWORD
NGINX_ADMIN_PASSWORD=$NGINX_ADMIN_PASSWORD ./babylonnode api system health
NGINX_ADMIN_PASSWORD=$NGINX_ADMIN_PASSWORD ./babylonnode api system version
./babylonnode auth set-admin-password -m DOCKER -p "$NGINX_ADMIN_PASSWORD"
./babylonnode auth set-metrics-password -m DOCKER -p "$NGINX_METRICS_PASSWORD"
./babylonnode auth set-superadmin-password -m DOCKER -p "$NGINX_SUPERADMIN_PASSWORD"
NGINX_ADMIN_PASSWORD="$NGINX_ADMIN_PASSWORD" ./babylonnode api system health
NGINX_ADMIN_PASSWORD="$NGINX_ADMIN_PASSWORD" ./babylonnode api system version
env:
NGINX_ADMIN_PASSWORD: ${{secrets.NGINX_ADMIN_PASSWORD}}
NGINX_METRICS_PASSWORD: ${{secrets.NGINX_METRICS_PASSWORD}}
Expand Down
82 changes: 0 additions & 82 deletions .github/workflows/remote-trigger.yml

This file was deleted.

1 change: 1 addition & 0 deletions node-runner-cli/config/EnvVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
SUPPRESS_API_COMMAND_WARN = "SUPPRESS_API_COMMAND_WARN"
PROMPT_FEEDS = "PROMPT_FEEDS"
CORE_DOCKER_REPO_OVERRIDE = "CORE_DOCKER_REPO_OVERRIDE"
NGINX_DOCKER_REPO_OVERRIDE = "NGINX_DOCKER_REPO_OVERRIDE"
GATEWAY_DOCKER_REPO_OVERRIDE = "GATEWAY_DOCKER_REPO_OVERRIDE"
AGGREGATOR_DOCKER_REPO_OVERRIDE = "AGGREGATOR_DOCKER_REPO_OVERRIDE"
MIGRATION_DOCKER_REPO_OVERRIDE = "MIGRATION_DOCKER_REPO_OVERRIDE"
Expand Down
4 changes: 2 additions & 2 deletions node-runner-cli/config/Nginx.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

from config.BaseConfig import BaseConfig
from config.EnvVars import NGINX_BINARY_OVERIDE
from config.EnvVars import NGINX_DOCKER_REPO_OVERRIDE, NGINX_BINARY_OVERIDE


class DockerNginxConfig(BaseConfig):
Expand All @@ -13,7 +13,7 @@ def __init__(self, config_dict: dict):
self.gateway_behind_auth: str = "true"
self.protect_core: str = "true"
self.release = ""
self.repo = "radixdlt/babylon-nginx"
self.repo: str = os.getenv(NGINX_DOCKER_REPO_OVERRIDE, "radixdlt/babylon-nginx")
self.mode = "docker"
super().__init__(config_dict)

Expand Down

0 comments on commit 4213783

Please sign in to comment.