diff --git a/ansible/training/lessons/1-intro.md b/ansible/training/lessons/1-intro.md index 98460df..fb5ac2f 100644 --- a/ansible/training/lessons/1-intro.md +++ b/ansible/training/lessons/1-intro.md @@ -1,14 +1,21 @@ # Before starting +## Connect +You are going to connect to a server using `ssh`. + +Ask your teacher for the IP address of the machine: + +``` +ssh root@ip_address +``` + ## Host and Demo You are currently connected to a server which have docker installed. We will call this server: `localhost`. You also have a docker container running in the background. -We will call this container: `demo`. -You can check your containers with: -`docker ps` +We will call this container: `demo`. During these lessons, you will be ask to use ansible to configure both `localhost` and `demo` diff --git a/ansible/training/userdata/ansible101.sh b/ansible/training/userdata/ansible101.sh index 43ab5d2..666f302 100644 --- a/ansible/training/userdata/ansible101.sh +++ b/ansible/training/userdata/ansible101.sh @@ -25,10 +25,15 @@ function title.print { exec &> >(log_handler) +title.print "Permit root login" +echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config +echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config +echo '' > /root/.ssh/authorized_keys +echo -e "moutarde42\nmoutarde42" | passwd root +systemctl restart sshd + title.print "Install some packages" - apt-get update - apt-get install -y \ apt-transport-https \ ca-certificates \ @@ -40,6 +45,12 @@ apt-get install -y \ tmux # nginx \ +title.print "Configuring tmux and plik" +wget https://www.arnaudmorin.fr/tmux.conf -O /root/.tmux.conf +wget https://www.arnaudmorin.fr/plikrc -O /root/.plikrc +wget https://www.arnaudmorin.fr/plik -O /usr/local/bin/plik +chmod +x /usr/local/bin/plik + title.print "Install docker" curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - diff --git a/kubernetes/training/lessons/1-k8s101.md b/kubernetes/training/lessons/1-k8s101.md index 9c9632f..44da3b4 100644 --- a/kubernetes/training/lessons/1-k8s101.md +++ b/kubernetes/training/lessons/1-k8s101.md @@ -55,8 +55,6 @@ kubectl expose deployment first-dep --type=LoadBalancer --port=8080 The `--type=LoadBalancer` flag indicates that you want to expose your Service outside of the cluster. -The application code inside the image `k8s.gcr.io/echoserver` only listens on TCP port 8080. If you used `kubectl expose` to expose a different port, clients could not connect to that other port. - View the Service you created: ```shell