Skip to content

Commit 181d95e

Browse files
authored
Merge pull request #718 from PureStorage-OpenConnect/trainingbackup
Trainingbackup
2 parents edb38cd + a9518cb commit 181d95e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

scripts/training-backup-bastion

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
# Configure user directories
22
mv /assets/training-backup /etc/skel/training
33
mkdir /etc/skel/.kube
4+
ip=$(curl -s https://ipinfo.io/ip)
5+
port=$(kubectl get svc -n central px-backup-ui -o jsonpath='{.spec.ports[0].nodePort}')
46
cat <<EOF >>/etc/skel/.bashrc
57
alias k=kubectl
68
complete -F __start_kubectl k
9+
tty &>/dev/null && echo ========================================== && echo "PX-Backup UI: http://$ip:$port" && printf "MinIO endpoint: 192.168.1%.2d.90:30221\n" \$(id -nu | sed s/training//) && echo ==========================================
710
PS1='\e[0;33m[\u@px-training \W]\$ \e[m'
811
EOF
912

10-
Create motd
11-
ip=$(curl -s https://ipinfo.io/ip)
12-
port=$(kubectl get svc -n central px-backup-ui -o jsonpath='{.spec.ports[0].nodePort}')
13-
echo "PX-Backup UI: http://$ip:$port" >/etc/motd.d/training-backup
14-
1513
# Create training users
1614
kubectl exec -it -n central pxcentral-keycloak-0 -- /opt/keycloak/bin/kcadm.sh config credentials --user admin --password admin --server http://localhost:8080/auth --realm master
1715
for i in $(seq 1 $clusters); do

0 commit comments

Comments
 (0)