@@ -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`
|
||||
|
||||
|
||||
@@ -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 -
|
||||
|
||||
Reference in New Issue
Block a user