From 4de7f24d8e17349975ac82810bf3e676d9e51fcc Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Sun, 25 Oct 2020 21:08:08 +0100 Subject: [PATCH] Start moving installer scripts over --- installer/compose.yml | 40 +++++++++++++++++++ .../abra-installer => installer/installer | 2 +- installer/nginx.conf | 10 +++++ script.d/swarm-installer | 16 -------- 4 files changed, 51 insertions(+), 17 deletions(-) create mode 100644 installer/compose.yml rename script.d/abra-installer => installer/installer (75%) create mode 100644 installer/nginx.conf delete mode 100755 script.d/swarm-installer diff --git a/installer/compose.yml b/installer/compose.yml new file mode 100644 index 0000000..9a224f1 --- /dev/null +++ b/installer/compose.yml @@ -0,0 +1,40 @@ +--- +version: "3.8" + +services: + abra_installer: + image: "nginx:stable" + configs: + - source: abra_conf + target: /etc/nginx/conf.d/abra.conf + - source: abra_installer + target: /var/www/abra-installer/installer + volumes: + - "public:/var/www/abra-installer" + networks: + - proxy + deploy: + update_config: + failure_action: rollback + order: start-first + labels: + - "traefik.enable=true" + - "traefik.http.services.abra-installer.loadbalancer.server.port=80" + - "traefik.http.routers.abra-installer.rule=Host(`install.abra.autonomic.zone`)" + - "traefik.http.routers.abra-installer.entrypoints=web-secure" + - "traefik.http.routers.abra-installer.tls.certresolver=production" + +configs: + abra_installer: + name: abra_installer_v1 + file: installer + abra_conf: + name: abra_conf_v1 + file: nginx.conf + +networks: + proxy: + external: true + +volumes: + public: diff --git a/script.d/abra-installer b/installer/installer similarity index 75% rename from script.d/abra-installer rename to installer/installer index 20f7ba0..8802acd 100755 --- a/script.d/abra-installer +++ b/installer/installer @@ -1,7 +1,7 @@ #!/bin/bash ABRA_VERSION="0.3.1" -ABRA_SRC="https://git.autonomic.zone/autonomic-cooperative/abra/raw/tag/$ABRA_VERSION/abra" +ABRA_SRC="https://git.autonomic.zone/coop-cloud/abra/raw/tag/$ABRA_VERSION/abra" function install_abra { mkdir -p "$HOME/.local/bin" diff --git a/installer/nginx.conf b/installer/nginx.conf new file mode 100644 index 0000000..f6d4235 --- /dev/null +++ b/installer/nginx.conf @@ -0,0 +1,10 @@ +server { + listen 80 default_server; + server_name install.abra.autonomic.zone; + + location / { + root /var/www/abra-installer; + add_header Content-Type text/plain; + index installer; + } +} diff --git a/script.d/swarm-installer b/script.d/swarm-installer deleted file mode 100755 index 4d6a3da..0000000 --- a/script.d/swarm-installer +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -install_docker() { - echo "install_docker: TODO" -} -init_swarm() { - echo "init_swarm: TODO" -} - -run_installation() { - install_docker - init_swarm -} - -run_installation -exit 0