Skip to content

Commit 0751163

Browse files
Fedosinflaper87
authored andcommitted
Add auth url to /etc/hosts
This commit adds a new entry to /etc/hosts to specify OpenShift's auth url.
1 parent 9e0682b commit 0751163

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

06_run_ocp.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ if [ -z "$FLOATING_IP" ]; then
1616
fi
1717

1818
# add data to /etc/hosts
19-
grep -qxF "$FLOATING_IP $API_ADRESS" /etc/hosts || echo "$FLOATING_IP $API_ADRESS" | sudo tee -a /etc/hosts
20-
grep -qxF "$FLOATING_IP $CONSOLE_ADRESS" /etc/hosts || echo "$FLOATING_IP $CONSOLE_ADRESS" | sudo tee -a /etc/hosts
19+
grep -qxF "$FLOATING_IP $API_ADDRESS" /etc/hosts || echo "$FLOATING_IP $API_ADDRESS" | sudo tee -a /etc/hosts
20+
grep -qxF "$FLOATING_IP $CONSOLE_ADDRESS" /etc/hosts || echo "$FLOATING_IP $CONSOLE_ADDRESS" | sudo tee -a /etc/hosts
21+
grep -qxF "$FLOATING_IP $AUTH_ADDRESS" /etc/hosts || echo "$FLOATING_IP $AUTH_ADDRESS" | sudo tee -a /etc/hosts
2122

2223
if [ ! -d ocp ]; then
2324
mkdir -p ocp

ocp_cleanup.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ source ocp_install_env.sh
77
$GOPATH/src/github.com/openshift/installer/bin/openshift-install --log-level=debug --dir ocp destroy cluster
88

99
# clean /etc/hosts
10-
grep -qxF "$API_ADRESS" /etc/hosts || sudo sed -i "/$API_ADRESS/d" /etc/hosts
11-
grep -qxF "$CONSOLE_ADRESS" /etc/hosts || sudo sed -i "/$CONSOLE_ADRESS/d" /etc/hosts
10+
grep -qxF "$API_ADDRESS" /etc/hosts || sudo sed -i "/$API_ADDRESS/d" /etc/hosts
11+
grep -qxF "$CONSOLE_ADDRESS" /etc/hosts || sudo sed -i "/$CONSOLE_ADDRESS/d" /etc/hosts
12+
grep -qxF "$AUTH_ADDRESS" /etc/hosts || sudo sed -i "/$AUTH_ADDRESS/d" /etc/hosts
1213

1314
rm -rf ocp/{auth,terraform.tfstate}

ocp_install_env.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ export OPENSTACK_EXTERNAL_NETWORK=public
1111
export PULL_SECRET='{"auths": { "quay.io": { "auth": "Y29yZW9zK3RlYzJfaWZidWdsa2VndmF0aXJyemlqZGMybnJ5ZzpWRVM0SVA0TjdSTjNROUUwMFA1Rk9NMjdSQUZNM1lIRjRYSzQ2UlJBTTFZQVdZWTdLOUFIQlM1OVBQVjhEVlla", "email": "" }}}'
1212
export SSH_PUB_KEY="`cat $HOME/.ssh/id_rsa.pub`"
1313

14-
export API_ADRESS="api.${CLUSTER_NAME}.shiftstack.com"
15-
export CONSOLE_ADRESS="console-openshift-console.apps.shiftstack.com"
14+
export API_ADDRESS="api.${CLUSTER_NAME}.shiftstack.com"
15+
export CONSOLE_ADDRESS="console-openshift-console.apps.shiftstack.com"
16+
export AUTH_ADDRESS="openshift-authentication-openshift-authentication.apps.ostest.shiftstack.com"
1617

1718
# Not used by the installer. Used by s.sh.
1819
export SSH_PRIV_KEY="$HOME/.ssh/id_rsa"

0 commit comments

Comments
 (0)