Compare commits
18 Commits
1.0.0+2.0.
...
1.7.0+2.24
Author | SHA1 | Date | |
---|---|---|---|
d6486491ff | |||
fe53a73a78 | |||
5bbf1e37b4 | |||
63d7346dc5 | |||
4c0647677c | |||
a41129c1e9 | |||
5cb5d6706d | |||
f472e38aae | |||
a646327283 | |||
1283e01b52 | |||
fadf67f847 | |||
0357b469f6 | |||
057ab4df40 | |||
b5d4fc5d58 | |||
494b4d934d
|
|||
a3bc5d6823 | |||
229b41df1f | |||
f5a160f232 |
20
.drone.yml
20
.drone.yml
@ -3,10 +3,12 @@ kind: pipeline
|
|||||||
name: deploy to swarm-test.autonomic.zone
|
name: deploy to swarm-test.autonomic.zone
|
||||||
steps:
|
steps:
|
||||||
- name: deployment
|
- name: deployment
|
||||||
image: decentral1se/stack-ssh-deploy:latest
|
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
|
||||||
settings:
|
settings:
|
||||||
host: swarm-test.autonomic.zone
|
host: swarm-test.autonomic.zone
|
||||||
stack: drone
|
stack: drone
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
deploy_key:
|
deploy_key:
|
||||||
from_secret: drone_ssh_swarm_test
|
from_secret: drone_ssh_swarm_test
|
||||||
generate_secrets: true
|
generate_secrets: true
|
||||||
@ -24,11 +26,17 @@ trigger:
|
|||||||
- master
|
- master
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: recipe release
|
name: generate recipe catalogue
|
||||||
steps:
|
steps:
|
||||||
- name: release a new version
|
- name: release a new version
|
||||||
image: thecoopcloud/drone-abra:latest
|
image: plugins/downstream
|
||||||
settings:
|
settings:
|
||||||
command: recipe drone release
|
server: https://build.coopcloud.tech
|
||||||
deploy_key:
|
token:
|
||||||
from_secret: abra_bot_deploy_key
|
from_secret: drone_abra-bot_token
|
||||||
|
fork: true
|
||||||
|
repositories:
|
||||||
|
- coop-cloud/auto-recipes-catalogue-json
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event: tag
|
||||||
|
77
README.md
77
README.md
@ -3,14 +3,14 @@
|
|||||||
[](https://drone.autonomic.zone/coop-cloud/drone)
|
[](https://drone.autonomic.zone/coop-cloud/drone)
|
||||||
|
|
||||||
<!-- metadata -->
|
<!-- metadata -->
|
||||||
* **Category**: Development
|
* **Category**: Apps
|
||||||
* **Status**: ?
|
* **Status**: 1, alpha
|
||||||
* **Image**: [`drone/drone`](https://hub.docker.com/r/drone/drone), ❶💚, upstream
|
* **Image**: [`drone/drone`](https://hub.docker.com/r/drone/drone), 4, upstream
|
||||||
* **Healthcheck**: Yes
|
* **Healthcheck**: Yes
|
||||||
* **Backups**: ?
|
* **Backups**: ?
|
||||||
* **Email**: ?
|
* **Email**: ?
|
||||||
* **Tests**: ❷💛
|
* **Tests**: 2
|
||||||
* **SSO**: ❶💚 (OAuth)
|
* **SSO**: 3 (OAuth)
|
||||||
<!-- endmetadata -->
|
<!-- endmetadata -->
|
||||||
|
|
||||||
## Basic usage
|
## Basic usage
|
||||||
@ -19,10 +19,73 @@
|
|||||||
2. Deploy [`coop-cloud/traefik`]
|
2. Deploy [`coop-cloud/traefik`]
|
||||||
3. `abra app new drone --secrets` (optionally with `--pass` if you'd like
|
3. `abra app new drone --secrets` (optionally with `--pass` if you'd like
|
||||||
to save secrets in `pass`)
|
to save secrets in `pass`)
|
||||||
4. `abra app YOURAPPDOMAIN config` - be sure to change `DOMAIN` to something that resolves to
|
4. `abra app config YOURAPPDOMAIN` - be sure to change `DOMAIN` to something that resolves to
|
||||||
your Docker swarm box
|
your Docker swarm box
|
||||||
5. `abra app YOURAPPDOMAIN deploy`
|
5. `abra app deploy YOURAPPDOMAIN`
|
||||||
6. Open the configured domain in your browser to finish set-up
|
6. Open the configured domain in your browser to finish set-up
|
||||||
|
|
||||||
|
## Setup with Gitea
|
||||||
|
|
||||||
|
follow this guide: https://docs.drone.io/server/provider/gitea/
|
||||||
|
|
||||||
|
then you'll also need to setup drone-docker-runner (`abra app new drone-docker-runner`). More info at https://docs.drone.io/runner/docker/installation/linux/.
|
||||||
|
|
||||||
|
|
||||||
|
## Setting up a server for auto-deployment
|
||||||
|
|
||||||
|
For Drone to be able to deploy to a server, you need:
|
||||||
|
|
||||||
|
- A drone user on the server, added to the `docker` group
|
||||||
|
- An SSH key, added as a secret in Drone, and added to `/home/drone/.ssh/authorized_keys on the server`
|
||||||
|
|
||||||
|
1. Add a `drone` user on `example.zone`, the server which you’re hosting the site on.
|
||||||
|
|
||||||
|
a. `sudo adduser drone`
|
||||||
|
|
||||||
|
b. create an SSH key for the user using `ssh-keygen` , e.g. `sudo -u drone ssh-keygen`
|
||||||
|
|
||||||
|
c. copy the contents of the public side of the new key to `/home/drone/.ssh/authorized_keys`
|
||||||
|
|
||||||
|
d. run `chmod go-rwx /home/drone/.ssh`
|
||||||
|
|
||||||
|
e. add `drone` to `AllowUsers` in `/etc/ssh/sshd_confand` restart SSH, `sudo service sshd restart`
|
||||||
|
|
||||||
|
2. Give the drone user access to the `docker` group; `sudo usermod -aG docker drone`
|
||||||
|
|
||||||
|
3. Generate a new SSH key and insert it as a Drone “orgsecret”
|
||||||
|
|
||||||
|
a. Log into Drone as `admin`, then either:
|
||||||
|
|
||||||
|
b. Add the “orgsecret” using the [Drone CLI](https://docs.drone.io/cli/install/):
|
||||||
|
|
||||||
|
i. Go to the “account” page https://drone.autonomic.zone/account
|
||||||
|
|
||||||
|
ii. Copy/paste the “Example CLI usage” into a terminal (you might want to add to `~/.bashrc` to make this easier next time)
|
||||||
|
|
||||||
|
iii. Run `drone orgsecret add [org you're adding the org secret to] [domain name] @drone_ssh_[example.zone]`
|
||||||
|
|
||||||
|
c. Add the “orgsecret” using the Drone web interface:
|
||||||
|
|
||||||
|
i. Find the repository page, or the page for another repository in the same organisation, in Drone
|
||||||
|
|
||||||
|
ii. On the “Settings” tab, under “Organization” on the left, click “Secrets”, then create a new secret and paste in the private key value
|
||||||
|
|
||||||
|
|
||||||
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra
|
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra
|
||||||
[`coop-cloud/traefik`]: https://git.autonomic.zone/coop-cloud/traefik
|
[`coop-cloud/traefik`]: https://git.autonomic.zone/coop-cloud/traefik
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ version: "3.8"
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: "drone/drone:2.0.4"
|
image: "drone/drone:2.24.0"
|
||||||
volumes:
|
volumes:
|
||||||
- "data:/data"
|
- "data:/data"
|
||||||
configs:
|
configs:
|
||||||
@ -39,7 +39,7 @@ services:
|
|||||||
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
|
||||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
|
||||||
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
|
||||||
- "coop-cloud.${STACK_NAME}.version=1.0.0+2.0.4"
|
- "coop-cloud.${STACK_NAME}.version=1.7.0+2.24.0"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
data:
|
data:
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
|
||||||
}
|
|
Reference in New Issue
Block a user