Skip to content

Commit 64c02f3

Browse files
authored
feat: encode licenseSsa (#1443)
1 parent a4fa0ef commit 64c02f3

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

automation/startflexdemo.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if [[ $GLUU_PERSISTENCE != "LDAP" ]] && [[ $GLUU_PERSISTENCE != "MYSQL" ]]; then
2222
exit 1
2323
fi
2424
if [[ ! "$GLUU_LICENSE_SSA" ]]; then
25-
read -rp "Enter base64 encoded licenseSsa: " GLUU_LICENSE_SSA
25+
read -rp "Enter the License SSA provided by Gluu: " GLUU_LICENSE_SSA
2626
fi
2727
LOG_TARGET="FILE"
2828
LOG_LEVEL="TRACE"
@@ -128,9 +128,10 @@ EOF
128128
fi
129129

130130
echo "$EXT_IP $GLUU_FQDN" | sudo tee -a /etc/hosts > /dev/null
131+
ENCODED_GLUU_LICENSE_SSA=$(echo -n "$GLUU_LICENSE_SSA" | base64 -w0)
131132
cat << EOF >> override.yaml
132133
global:
133-
licenseSsa: $GLUU_LICENSE_SSA
134+
licenseSsa: $ENCODED_GLUU_LICENSE_SSA
134135
cloud:
135136
testEnviroment: true
136137
istio:

automation/startflexmonolithdemo.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if [[ -z $EXT_IP ]]; then
1919
fi
2020

2121
if [[ ! "$GLUU_LICENSE_SSA" ]]; then
22-
read -rp "Enter the License SSA in base64 format provided from Gluu: " GLUU_LICENSE_SSA
22+
read -rp "Enter the License SSA provided by Gluu: " GLUU_LICENSE_SSA
2323
fi
2424
sudo apt-get update
2525
# Install Docker and Docker compose plugin
@@ -69,8 +69,8 @@ if [[ "$FLEX_BUILD_COMMIT" ]]; then
6969

7070
python3 -c "from pathlib import Path ; import ruamel.yaml ; compose = Path('/tmp/flex/docker-flex-monolith/flex-ldap-compose.yml') ; yaml = ruamel.yaml.YAML() ; data = yaml.load(compose) ; data['services']['flex']['build'] = '.' ; del data['services']['flex']['image'] ; yaml.dump(data, compose)"
7171
fi
72-
73-
python3 -c "from dockerfile_parse import DockerfileParser ; dfparser = DockerfileParser('/tmp/flex/docker-flex-monolith') ; dfparser.envs['CN_GLUU_LICENSE_SSA'] = '$GLUU_LICENSE_SSA'"
72+
ENCODED_GLUU_LICENSE_SSA=$(echo -n "$GLUU_LICENSE_SSA" | base64 -w0)
73+
python3 -c "from dockerfile_parse import DockerfileParser ; dfparser = DockerfileParser('/tmp/flex/docker-flex-monolith') ; dfparser.envs['CN_GLUU_LICENSE_SSA'] = '$ENCODED_GLUU_LICENSE_SSA'"
7474
# --
7575
if [[ $GLUU_PERSISTENCE == "MYSQL" ]]; then
7676
docker compose -f /tmp/flex/docker-flex-monolith/flex-mysql-compose.yml up -d

0 commit comments

Comments
 (0)