diff --git a/README.md b/README.md index 7e90cb8f1d1debcd897872406626facc432de9e5..161a03a52b31acda4c3031249485991af8f628ef 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,17 @@ # Alpha Project Manager -An infrastructure as code manager working with gitlab and scaleway. +An Infrastructure as Code manager to deploy lab infrastructure. Working with Atrium, Gitlab CI, Terraform, Cloud-init and Scaleway. + +### How does it work ? + +At first, Gitlab CI will run scripts to generate environment variables. +They will be used in Terraform for configuration and securing credentials. + +After this, Gitlab CI will initiate Terraform, which create infrastructure matching the configuration. +While deploying resources, especially instances, Terraform will provide the cloud-init.yml script so it can be executed after boot and configure the instances. + +Infrastructure is ready, which the script runned at boot 3 services are running : atrium which serve as a reverse-proxy, code-server and webtop. +User just ## Setup Terraform Locally diff --git a/terraform/cloud-init.yml b/terraform/cloud-init.yml index 9498ffaf95adf25bbd6e5724ccf2e024cd2f292d..27eb36dbe527593a89603dae9b31c151652cf6e0 100644 --- a/terraform/cloud-init.yml +++ b/terraform/cloud-init.yml @@ -41,9 +41,9 @@ runcmd: - "sh get-docker.sh" # Setup Atrium - "mkdir -p /root/app/data/letsencrypt_cache" - - "cp /root/atrium.yaml /root/app/data/atrium.yaml && rm /root/atrium.yaml" + - "cp /root/atrium.yaml /root/app/atrium.yaml && rm /root/atrium.yaml" # Run Atrium Container - - "docker run -d --name atrium --net=host -v /root/app/data/atrium.yaml:/app/atrium.yaml -v /root/app/data/GeoLite2-City.mmdb:/app/GeoLite2-City.mmdb -v /root/app/data/letsencrypt_cache:/app/letsencrypt_cache -v /root/app/data:/app/data nicolaspernoud/atrium:latest" + - "docker run -d --name atrium --net=host -v /root/app/atrium.yaml:/app/atrium.yaml -v /root/app/data/GeoLite2-City.mmdb:/app/GeoLite2-City.mmdb -v /root/app/data/letsencrypt_cache:/app/letsencrypt_cache -v /root/app/data:/app/data nicolaspernoud/atrium:latest" # Install Code Server - "curl -fsSL https://code-server.dev/install.sh | sh" - "mkdir -p /root/.config/code-server/"