From 6af826809d07d67b1f6a43abdb14b1e192ec8841 Mon Sep 17 00:00:00 2001 From: Nathan Rodet <nrodet@grandlyon.com> Date: Fri, 13 Jan 2023 09:56:40 +0100 Subject: [PATCH] Added scripts configuration --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 508de55..3299350 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ such as credentials to Terraform only during the running state to improve securi On run state, Terraform will create, modify and destroy infrastructure resources in Scaleway to match the configuration described in the configuration files. -Resources deployed : +**Resources deployed :** | resource-type | plan | inbound port | |----------------------------------|--------|--------------| @@ -20,6 +20,9 @@ Resources deployed : | scaleway_instance_server | DEV1-L | | After the resources provisionned with Terraform, Cloud-init will configure the instances by running bash scripts, creating files... And 3 services will be running for each instance : + +**Running services :** + - Atrium (Reverse proxy, TLS encryption and HTTPS to the others hosted services) - Code-server - Webtop @@ -31,16 +34,14 @@ After deployment, each resource can be accessed though HTTPS depending their cou - https://desktop-1.rust-1.daag.alpha.grandlyon.com/ - https://code-1.rust-1.daag.alpha.grandlyon.com/ -User : +**User :** - Username: abc - Password: <Gitlab Stored> -## Cloud-init - -### Create file +## Cloud-init - file creation In this example, you will find how to create a file to a defined path with cloud-init. -Content inside `%` are meant to be replaced with sed command to be able to use environment variable or user-data. +Content inside `%` are meant to be replaced with sed command to be able to use environment variables or user-data. **cloud-init :** ```yaml @@ -68,7 +69,7 @@ write_files: path: /root/atrium.yaml ``` -**bash command to replaced `%` content :** +**Bash commands example to replace `%` content :** ```bash sed -i "s/%atrium_hostname%/$(scw-userdata atrium_hostname)/g" /root/atrium.yaml sed -i "s/%atrium_letsencrypt_email%/$(scw-userdata atrium_letsencrypt_email)/g" /root/atrium.yaml -- GitLab