From 85fb1cc131eefaeadda68f6dded7bc6cdd1be5a2 Mon Sep 17 00:00:00 2001 From: Brendan Bergen Date: Tue, 15 Mar 2022 13:24:59 -0600 Subject: [PATCH] Better documentation support for multiple envs (#1932) - Now there are two env files: standard, and int-like files - Instructions modified for int envs to create the new file and source it - Fixed a small typo in the instructions that was being masked by indentation --- .gitignore | 1 + docs/deploy-full-rp-service-in-dev.md | 22 +++++----------------- env-int.example | 9 +++++++++ 3 files changed, 15 insertions(+), 17 deletions(-) create mode 100644 env-int.example diff --git a/.gitignore b/.gitignore index f8e72571b..9117184c9 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ gomock_reflect_* /e2e.test /env* !/env.example +!/env-int.example /id_rsa /proxy /pyenv* diff --git a/docs/deploy-full-rp-service-in-dev.md b/docs/deploy-full-rp-service-in-dev.md index a2746d0f2..c9f01a799 100644 --- a/docs/deploy-full-rp-service-in-dev.md +++ b/docs/deploy-full-rp-service-in-dev.md @@ -21,24 +21,11 @@ make dev-config.yaml ``` -1. Update and resource your environment file - > It should look something like below once completed +1. Create a full environment file, which overrides some default `./env` options when sourced ```bash - export LOCATION=eastus - export ARO_IMAGE=arointsvc.azurecr.io/aro:latest - - . secrets/env - - export RESOURCEGROUP=$USER-aro-$LOCATION - export DATABASE_ACCOUNT_NAME=$USER-aro-$LOCATION - export DATABASE_NAME=ARO - export KEYVAULT_PREFIX=$USER-aro-$LOCATION - export ARO_IMAGE=${USER}aro.azurecr.io/aro:$(git rev-parse --short=7 HEAD)$([[ $(git status --porcelain) = "" ]] || echo -dirty) - export FLUENTBIT_IMAGE=${USER}aro.azurecr.io/fluentbit:latest - ``` - - ```bash - . ./env + cp env-int.example env-int + vi env-int + . ./env-int ``` 1. Run `make deploy` @@ -104,6 +91,7 @@ export SRC_AUTH_QUAY=$(echo $USER_PULL_SECRET | jq -r '.auths."quay.io".auth') export SRC_AUTH_REDHAT=$(echo $USER_PULL_SECRET | jq -r '.auths."registry.redhat.io".auth') export DST_AUTH=$(echo -n '00000000-0000-0000-0000-000000000000:'$(az acr login -n ${DST_ACR_NAME} --expose-token | jq -r .accessToken) | base64 -w0) + ``` 1. Login to the Azure Container Registry ```bash diff --git a/env-int.example b/env-int.example new file mode 100644 index 000000000..08e0d574c --- /dev/null +++ b/env-int.example @@ -0,0 +1,9 @@ +. ./env + +# Overrides for a full int-like local environment +export RESOURCEGROUP=$USER-aro-$LOCATION +export DATABASE_ACCOUNT_NAME=$USER-aro-$LOCATION +export DATABASE_NAME=ARO +export KEYVAULT_PREFIX=$USER-aro-$LOCATION +export ARO_IMAGE=${USER}aro.azurecr.io/aro:$(git rev-parse --short=7 HEAD)$([[ $(git status --porcelain) = "" ]] || echo -dirty) +export FLUENTBIT_IMAGE=${USER}aro.azurecr.io/fluentbit:latest \ No newline at end of file