Skip to content

Commit

Permalink
Update install/uninstall scripts
Browse files Browse the repository at this point in the history
- add 'set -euo pipefail' to stop script at first failure
- remove message about initial user - functionalitiy removed
- create Python virtual environment at the beginning of the state machine regardless of initial state
  • Loading branch information
jmgrady committed Apr 5, 2024
1 parent 61eac07 commit 9e29a5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
10 changes: 2 additions & 8 deletions deploy/scripts/install-combine.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! /usr/bin/env bash
set -euo pipefail

# Set the environment variables that are required by The Combine.
# In addition, the values are stored in a file so that they do not
Expand All @@ -8,13 +9,6 @@ set-combine-env () {
# Generate JWT Secret Key
COMBINE_JWT_SECRET_KEY=`LC_ALL=C tr -dc 'A-Za-z0-9*\-_@!' </dev/urandom | head -c 64; echo`
# Collect values from user
cat << .EOM
The installation process will setup an initial user as a site
administrator. This you can select a username that you will use
for your normal word collection work. The default username is admin.
.EOM
read -p "Enter AWS_ACCESS_KEY_ID: " AWS_ACCESS_KEY_ID
read -p "Enter AWS_SECRET_ACCESS_KEY: " AWS_SECRET_ACCESS_KEY
# write collected values and static values to config file
Expand Down Expand Up @@ -203,11 +197,11 @@ if [ -z "${COMBINE_VERSION}" ] ; then
exit 1
fi

create-python-venv
# Step through the installation stages
while [ "$STATE" != "Done" ] ; do
case $STATE in
Pre-reqs)
create-python-venv
install-kubernetes
next-state "Restart"
;;
Expand Down
1 change: 1 addition & 0 deletions deploy/scripts/uninstall-combine
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! /usr/bin/env bash
set -euo pipefail

delete-files () {
for file in "$@" ; do
Expand Down

0 comments on commit 9e29a5f

Please sign in to comment.