-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Return removed staging CA for letsenrypt * Fix missing $ * Add prepare_simcore_stack.bash
- Loading branch information
1 parent
65da26e
commit 687abde
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
# | ||
# | ||
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ | ||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
# For debugging purposes, uncomment this and get every executed bash command printed to the console for tracing. | ||
#set -x | ||
####### | ||
# | ||
IFS=$'\n\t' | ||
|
||
# Paths | ||
this_script_dir=$(dirname "$0") | ||
repo_basedir=$(git rev-parse --show-toplevel) | ||
# shellcheck disable=1090,1091 | ||
source "$repo_basedir"/scripts/portable.sh | ||
# Source bash logging tools | ||
# shellcheck disable=1090,1091 | ||
source "$repo_basedir"/scripts/logger.bash | ||
repo_config=$(cat "$repo_basedir"/.config.location) | ||
##################### | ||
|
||
log_info "Starting preperations..." | ||
##################### | ||
# Loads configurations variables | ||
# See https://askubuntu.com/questions/743493/best-way-to-read-a-config-file-in-bash | ||
set -o allexport | ||
# shellcheck disable=1090,1091 | ||
source "${repo_config}" | ||
set +o allexport | ||
# | ||
cd "$repo_basedir" || exit 1 | ||
|
||
pushd "$repo_basedir"/../osparc-simcore | ||
cp services/docker-compose.yml "$repo_basedir" | ||
cp .env-devel "$repo_basedir" | ||
popd | ||
|
||
cp "$repo_config" "$repo_basedir" | ||
|
||
cd "$repo_basedir" | ||
|
||
log_info "Creating stack.yml file..." | ||
services/deployment-agent/startup_script.bash | ||
|
||
log_info "Adding prefix $PREFIX_STACK_NAME to all services..." | ||
./yq "with(.services; with_entries(.key |= \"${PREFIX_STACK_NAME}_\" + .))" stack.yml > "$this_script_dir"/stack_with_prefix.yml |