Bootstrap runner repo
This commit is contained in:
parent
81c2eec28b
commit
def15e192e
10
Dockerfile
10
Dockerfile
@ -1,3 +1,9 @@
|
||||
FROM drone/drone:1
|
||||
FROM drone/drone-runner-docker:1
|
||||
|
||||
EXPOSE 8000
|
||||
EXPOSE 3000
|
||||
|
||||
COPY . ${WORKDIR}
|
||||
|
||||
COPY sbin/* /sbin/
|
||||
|
||||
ENTRYPOINT ["/sbin/entrypoint.sh"]
|
||||
|
@ -1,4 +1,4 @@
|
||||
# drone
|
||||
# drone-docker-runner
|
||||
|
||||
> https://drone.io/
|
||||
|
||||
@ -38,6 +38,6 @@ $ pip install -r requirements.txt
|
||||
## Deploy
|
||||
|
||||
```bash
|
||||
$ git remote add dokku dokku@dokku.autonomic.zone:drone
|
||||
$ git remote add dokku dokku@dokku.autonomic.zone:drone-docker-runner
|
||||
$ git push dokku
|
||||
```
|
||||
|
@ -4,37 +4,37 @@
|
||||
tasks:
|
||||
- name: Load variables
|
||||
include_vars:
|
||||
dir: "{{ dokku_lib_root }}/data/ansible/drone/vars/"
|
||||
dir: "{{ dokku_lib_root }}/data/ansible/drone-docker-runner/vars/"
|
||||
extensions:
|
||||
- yml
|
||||
|
||||
- name: Set HTTP 80 port proxy
|
||||
dokku_ports:
|
||||
app: drone
|
||||
app: drone-docker-runner
|
||||
mappings:
|
||||
- "http:80:8000"
|
||||
- "http:80:3000"
|
||||
state: present
|
||||
|
||||
- name: Setup LE certificates
|
||||
shell: dokku letsencrypt drone
|
||||
shell: dokku letsencrypt drone-docker-runner
|
||||
args:
|
||||
creates: /home/dokku/drone/letsencrypt/certs
|
||||
creates: /home/dokku/drone-docker-runner/letsencrypt/certs
|
||||
|
||||
- name: Setup LE certificates renew cron job
|
||||
shell: dokku letsencrypt:cron-job --add
|
||||
args:
|
||||
creates: /home/dokku/drone/letsencrypt/cron-job
|
||||
creates: /home/dokku/drone-docker-runner/letsencrypt/cron-job
|
||||
|
||||
- name: Remove automatically configured ports
|
||||
dokku_ports:
|
||||
app: drone
|
||||
app: drone-docker-runner
|
||||
mappings:
|
||||
- "http:8000:8000"
|
||||
- "http:3000:3000"
|
||||
state: absent
|
||||
|
||||
- name: Set HTTP 443 port
|
||||
dokku_ports:
|
||||
app: drone
|
||||
app: drone-docker-runner
|
||||
mappings:
|
||||
- "https:443:8000"
|
||||
- "https:443:3000"
|
||||
state: present
|
||||
|
@ -4,41 +4,31 @@
|
||||
tasks:
|
||||
- name: Load variables
|
||||
include_vars:
|
||||
dir: "{{ dokku_lib_root }}/data/ansible/drone/vars/"
|
||||
dir: "{{ dokku_lib_root }}/data/ansible/drone-docker-runner/vars/"
|
||||
extensions:
|
||||
- yml
|
||||
|
||||
- name: "Configure {{ domain }} domain"
|
||||
dokku_domains:
|
||||
app: drone
|
||||
app: drone-docker-runner
|
||||
domains:
|
||||
- "{{ domain }}"
|
||||
state: present
|
||||
|
||||
- name: Create application directory
|
||||
file:
|
||||
path: /var/lib/drone
|
||||
state: directory
|
||||
owner: dokku
|
||||
group: dokku
|
||||
become: true
|
||||
|
||||
- name: Specify docker volume mounts
|
||||
- name: Specify docker volume mount
|
||||
dokku_storage:
|
||||
app: drone
|
||||
app: drone-docker-runner
|
||||
mounts:
|
||||
- /var/lib/drone:/data
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
- name: Configure the app environment
|
||||
dokku_config:
|
||||
app: drone
|
||||
app: drone-docker-runner
|
||||
restart: false
|
||||
config:
|
||||
DOKKU_LETSENCRYPT_EMAIL: "{{ autonomic_admin_mail }}"
|
||||
DRONE_GITEA_CLIENT_ID: "{{ gitea_client_id }}"
|
||||
DRONE_GITEA_CLIENT_SECRET: "{{ gitea_client_secret }}"
|
||||
DRONE_GITEA_SERVER: "{{ gitea_domain }}"
|
||||
DRONE_GIT_ALWAYS_AUTH: "true"
|
||||
DRONE_RPC_HOST: "{{ drone_domain }}"
|
||||
DRONE_RPC_PROTO: "https"
|
||||
DRONE_RPC_SECRET: "{{ rpc_secret }}"
|
||||
DRONE_SERVER_HOST: "{{ domain }}"
|
||||
DRONE_SERVER_PROTO: "https"
|
||||
DRONE_RUNNER_CAPACITY: "2"
|
||||
DRONE_RUNNER_NAME: "drone-docker-runner"
|
||||
|
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
ssh -p {{ ssh_listen_port }} -o StrictHostKeyChecking=no git@{{ dokku_container_ip }} "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@"
|
@ -1,4 +1,4 @@
|
||||
---
|
||||
domain: "drone.autonomic.zone"
|
||||
domain: "drone-docker-runner.autonomic.zone"
|
||||
autonomic_admin_mail: "helo@autonomic.zone"
|
||||
gitea_domain: "git.autonomic.zone"
|
||||
drone_domain: "drone.autonomic.zone"
|
||||
|
@ -1,7 +0,0 @@
|
||||
gitea_client_id: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
64653961323438353332343365626333303863343839383030383231396233376663613665393637
|
||||
3839643333633535623931323738323839313331626230390a386662393636343266326632333362
|
||||
62643765656239613065663366353533383635303930353237623235623332646639333735363630
|
||||
3330333836653664320a623432633961343664613230323665373934656630366138393264353231
|
||||
63383937396336383730656666303437646662356538656565373538316336663234
|
@ -1,8 +0,0 @@
|
||||
gitea_client_secret: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
36373362613266363063383964333434666435383862336136393632653038313039623438343264
|
||||
6537376539363338333632656365353766363536343431620a633736306232323230363263666635
|
||||
33353338386235306665363532623432353363666366393636623163666134633538393161386232
|
||||
6138343930623965340a386338383637633161363238633031396431323665353635303461363438
|
||||
32393835623132656237356538306634666164343034343735376131313032396636353733303761
|
||||
3235333336373138393731303531396164323731623039663835
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
rpc_secret: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
33346331663332396364613536313365316561616465656465653330646139333039326130336632
|
||||
|
Reference in New Issue
Block a user