First stab at abra installer script
This commit is contained in:
commit
c045e019fa
21
.drone.yml
Normal file
21
.drone.yml
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
kind: pipeline
|
||||
name: deploy to swarm.autonomic.zone
|
||||
steps:
|
||||
- name: deployment
|
||||
image: decentral1se/drone-stack:19.03.8
|
||||
settings:
|
||||
compose: compose.yml
|
||||
host: tcp://swarm.autonomic.zone:2376
|
||||
stack_name: installer-scripts
|
||||
tlsverify: true
|
||||
environment:
|
||||
PLUGIN_CACERT:
|
||||
from_secret: docker_cacert
|
||||
PLUGIN_CERT:
|
||||
from_secret: docker_cert
|
||||
PLUGIN_KEY:
|
||||
from_secret: docker_key
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
9
Makefile
Normal file
9
Makefile
Normal file
@ -0,0 +1,9 @@
|
||||
ABRA_VERSION := 0.1.1
|
||||
ABRA_SRC := "https://git.autonomic.zone/autonomic-cooperative/abra/raw/tag/$(ABRA_VERSION)/installer"
|
||||
|
||||
default: update-abra-installer
|
||||
|
||||
update-abra-installer:
|
||||
@curl $(ABRA_SRC) > abra/installer
|
||||
|
||||
.PHONY: update-abra-installer
|
7
README.md
Normal file
7
README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# installer-scripts
|
||||
|
||||
Plain text script hosting so we can do `curl -fsSL foo.autonomic.zone | bash` installations.
|
||||
|
||||
Currently hosting the following:
|
||||
|
||||
- [install.abra.autonomic.zone](https://install.abra.autonomic.zone)
|
10
abra/abra.conf
Normal file
10
abra/abra.conf
Normal file
@ -0,0 +1,10 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name install.abra.autonomic.zone;
|
||||
|
||||
location / {
|
||||
root /var/www/abra-installer;
|
||||
wadd_header Content-Type text/plain;
|
||||
index installer
|
||||
}
|
||||
}
|
18
abra/installer
Normal file
18
abra/installer
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
ABRA_VERSION="0.1.0"
|
||||
ABRA_SRC="https://git.autonomic.zone/autonomic-cooperative/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
|
40
compose.yml
Normal file
40
compose.yml
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
nginx:
|
||||
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.well-known-uris.loadbalancer.server.port=80"
|
||||
- "traefik.http.routers.gitea.rule=Host(`install.abra.autonomic.zone`)"
|
||||
- "traefik.http.routers.well-known-uris.entrypoints=web-secure"
|
||||
- "traefik.http.routers.well-known-uris.tls.certresolver=production"
|
||||
|
||||
configs:
|
||||
abra_installer:
|
||||
name: abra_installer_v1
|
||||
file: abra/installer
|
||||
abra_conf:
|
||||
name: abra_conf_v1
|
||||
file: abra/abra.conf
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
public:
|
Reference in New Issue
Block a user