Start moving installer scripts over

This commit is contained in:
2020-10-25 21:08:08 +01:00
parent ad1063a0cc
commit 4de7f24d8e
4 changed files with 51 additions and 17 deletions

40
installer/compose.yml Normal file
View File

@ -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:

18
installer/installer Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
ABRA_VERSION="0.3.1"
ABRA_SRC="https://git.autonomic.zone/coop-cloud/abra/raw/tag/$ABRA_VERSION/abra"
function install_abra {
mkdir -p "$HOME/.local/bin"
curl "$ABRA_SRC" > "$HOME/.local/bin/abra"
chmod +x "$HOME/.local/bin/abra"
echo "abra installed to $HOME/.loca/bin/abra"
}
function run_installation {
install_abra
}
run_installation
exit 0

10
installer/nginx.conf Normal file
View File

@ -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;
}
}