1
0

Few changes for creating the jumps correctly

Signed-off-by: Arnaud M <arnaud.choupinette@mailops.fr>
This commit is contained in:
Arnaud M
2024-01-07 20:02:20 +01:00
parent 5c71a320eb
commit 7bfacd5880
2 changed files with 24 additions and 11 deletions

View File

@@ -82,6 +82,18 @@ alias os=/opt/oscli/bin/openstack
alias k=kubectl
EOF
title.print "Create openrc file"
isen=$(cat /etc/hostname | tr -d '-')
cat <<EOF>>/root/openrc
export OS_USERNAME=${isen}_user1
export OS_PASSWORD=changeme
export OS_PROJECT_NAME=${isen}
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_AUTH_URL=http://keystone.54.36.119.253.xip.opensteak.fr/v3
export OS_IDENTITY_API_VERSION=3
export debian_chroot=${isen}_user1
EOF
title.print "Install docker"
@@ -95,7 +107,7 @@ add-apt-repository \
apt-get update
apt-get install -y docker-ce docker-ce-cli containerd.io
title.print "Clone ansible-training"
title.print "Clone trainings"
cd /root/
git clone https://git.arnaudmorin.fr/arnaud/trainings.git
@@ -105,11 +117,6 @@ title.print "Building docker image 'demo'"
cd /root/trainings/ansible/training/docker
docker build -t demo .
#NOTE(arnaud) commented because this is something I want the student to do
#title.print "Configuring nginx as reverse proxy"
#cp /root/ansible-training/conf/proxy.conf /etc/nginx/site-enabled/
#systemctl restart nginx
title.print "Starting demo container"
docker run -d --rm -p 127.0.0.2:8080:8080 -p 127.0.0.2:2222:22 --name demo demo