From 1f74550e874fee558049b5e2518bf0817ce8ffd7 Mon Sep 17 00:00:00 2001
From: Nathan Rodet <nrodet@grandlyon.com>
Date: Thu, 22 Dec 2022 11:57:09 +0100
Subject: [PATCH] Added configuration

---
 README.md                | 13 ++++++++++++-
 terraform/cloud-init.yml |  4 ++--
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 7e90cb8..161a03a 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 9498ffa..27eb36d 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/"
-- 
GitLab