From 2246c41c4db48f0149f3a8836bf4a3fef1866519 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Sun, 29 Mar 2020 11:25:19 +0200 Subject: [PATCH] Set keycloak into auto deploy mode --- .drone.yml | 22 ++++++++++++++++++++++ README.md | 47 +++++------------------------------------------ 2 files changed, 27 insertions(+), 42 deletions(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..d7ff9b2 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,22 @@ +--- +kind: pipeline + +name: default + +steps: + - name: Build Keycloak docker image + image: docker:stable + volumes: + - name: docker_sock + path: /var/run/docker.sock + commands: + - docker build --no-cache -t autonomic/keycloak:drone . + + - name: Deploy Keycloak with Dokku + image: appleboy/drone-git-push:0.2.0-linux-amd64 + settings: + remote: ssh://dokku@dokku.autonomic.zone:222/keycloak + ssh_key: + from_secret: drone_deploy_key + when: + branch: master diff --git a/README.md b/README.md index eae25b2..2438355 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,10 @@ # keycloak +[![Build Status](https://drone.autonomic.zone/api/badges/autonomic-cooperative/keycloak/status.svg)](https://drone.autonomic.zone/autonomic-cooperative/keycloak) + > https://keycloak.org -## Setup +# Deploy -### Pre-requisites - -1. You have SSH access to dokku.autonomic.zone -1. You have sudo privilege escalation working - -``` -Host dokku.autonomic.zone - Hostname dokku.autonomic.zone - User - Port 222 - IdentityFile ~/.ssh/ -``` - -See the password-store under `autonomic-dokku` for your sudo password. - -### Environment - -1. Clone the [infrastructure repository](https://gitlab.com/autonomic-cooperative/infrastructure) -1. Copy the sample file: `cp .envrc.sample .envrc` -1. Ensure that the .envrc `PASSWORD_STORE_DIR` env var points to the `infrastructure/credentials/password-store` - -### Python - -You only need to do this if you're working with Ansible vault (encrypting/decrypting new secrets). - -```bash -$ python3 -m venv .venv -$ source .venv/bin/activate -$ pip install -r requirements.txt -``` - -## Deploy - -```bash -$ git remote add dokku dokku@dokku.autonomic.zone:keycloak -$ git push dokku -``` - -## Managing Users - -> https://www.keycloak.org/docs/latest/getting_started/index.html#creating-a-realm-and-user +1. Push your changes to master and Dokku will try to automatically release +1. See the [Drone dashboard to see the build](https://drone.autonomic.zone/autonomic-cooperative/keycloak/)