about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-10-21 16:02:56 +0200
committerEmile <hanemile@protonmail.com>2019-10-21 16:02:56 +0200
commit4e31c0a1364f7cb6dc8bfec8bde82603ccd89d06 (patch)
tree1e37cfa7d0e0b4780721cbf192abfa7ca0a09faf
parentdf87dab380b021801ba657166a464faa2b05cbb5 (diff)
subdividet the setup in sections
-rwxr-xr-xsetup.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/setup.sh b/setup.sh
index bc45c83..221e12b 100755
--- a/setup.sh
+++ b/setup.sh
@@ -14,6 +14,10 @@ echo "- docker (with a running docker-server)"
 echo "- docker-compose"
 echo "- htpasswd (apache2-utils)"
 
+#
+# General confiuration
+#
+
 # get a hostname and a ctfname from the user
 read -e -p "HOSTNAME: " -i "ctf.flexerilla.team" HOSTNAME
 read -e -p "CTFNAME: " -i "FlexCTF" CTFNAME
@@ -22,6 +26,10 @@ read -e -p "CTFNAME: " -i "FlexCTF" CTFNAME
 echo "HOSTNAME=$HOSTNAME" > .env
 echo "CTFNAME=$CTFNAME" >> .env
 
+#
+# Traefik configuration
+#
+
 # Read Traefik creds from the user
 read -e -p "Traefik username: " -i "traefik" TRAEFIK_USER
 read -e -p "Traefik password: " -i "secret" TRAEFIK_PASSWORD
@@ -32,6 +40,10 @@ TRAEFIK_CREDS=$(htpasswd -nb $TRAEFIK_USER $TRAEFIK_PASSWORD)
 # Write the creds to the traefik users file
 echo "$TRAEFIK_CREDS" >> traefik_users
 
+#
+# Grafana configuration
+#
+
 # Grafana settings
 read -e -p "Grafana server: " -i "https://grafana.$HOSTNAME:3000" GF_SERVER_ROOT_URL
 read -e -p "Grafana admin pwd: " -i "secret" GF_SECURITY_ADMIN_PASSWORD
@@ -40,6 +52,10 @@ read -e -p "Grafana admin pwd: " -i "secret" GF_SECURITY_ADMIN_PASSWORD
 echo "GF_SERVER_ROOT_URL=$GF_SERVER_ROOT_URL" > grafana.env
 echo "GF_SECURITY_ADMIN_PASSWORD=$GF_SECURITY_ADMIN_PASSWORD" >> grafana.env
 
+#
+# Pull images from the darknebu.la registry
+#
+
 echo "Login to the darknebu.la registry to pull the images:"
 docker login registry.darknebu.la
 
@@ -49,6 +65,10 @@ echo "Pulling docker images needed..."
 docker pull registry.darknebu.la/circus/companion:latest
 docker pull registry.darknebu.la/circus/vpn:latest
 
+#
+# Start the docker-compose
+#
+
 # Ask if the circus should be started
 read -p "Do you want to start the circus now? (y/n) " -n 1 -r
 echo # (optional) move to a new line