Jaap Marcus 3 лет назад
Родитель
Сommit
54af151d9a
2 измененных файлов с 49 добавлено и 9 удалено
  1. 3 3
      .drone.yml
  2. 46 6
      README.md

+ 3 - 3
.drone.yml

@@ -8,7 +8,7 @@ platform:
   arch: amd64
 
 steps:
- - name: Ubuntu 22.04
+  - name: Ubuntu 22.04
     image: ubuntu:jammy
     commands:
     - ln -snf /usr/share/zoneinfo/CET /etc/localtime && echo CET > /etc/timezone
@@ -17,7 +17,7 @@ steps:
     - mkdir -p ./packages/ubuntu/jammy
     - mv /tmp/hestiacp-src/deb/*.deb ./packages/ubuntu/jammy
     - rm -rf /tmp/hestia-src/
- - name: Ubuntu 20.04
+  - name: Ubuntu 20.04
     image: ubuntu:focal
     commands:
     - ln -snf /usr/share/zoneinfo/CET /etc/localtime && echo CET > /etc/timezone
@@ -89,7 +89,7 @@ platform:
   arch: arm64
 
 steps:
- - name: Ubuntu 22.04
+  - name: Ubuntu 22.04
     image: ubuntu:jammy
     commands:
     - ln -snf /usr/share/zoneinfo/CET /etc/localtime && echo CET > /etc/timezone

+ 46 - 6
README.md

@@ -4,13 +4,53 @@ Build Hestia packages with drone / docker
 
 # Setup
 
-## Install "Drone server" 
+## Install "Drone master server" 
 
-- Install Docker on a server
-- Follow the instruction from drone.io website https://docs.drone.io/server/provider/github/ no special requirements are need!
-- Setup 2 Docker drone docker runners:
-    -   One AMD64 server capable to build packages for amd64 packages (Can be the same as the drone server)
-    -   One ARM64 server capable to build packages for arm64 packages 
+- Install Docker on a server (https://docs.docker.com/engine/install/ubuntu/)
+- Install Drone.io (Drone "server" currently does not support ARM64) (https://docs.drone.io/server/provider/github/) 
+
+```
+    docker run \
+    --volume=/var/lib/drone:/data \
+    --env=DRONE_GITHUB_CLIENT_ID=github-app-key \
+    --env=DRONE_GITHUB_CLIENT_SECRET=github-secret \
+    --env=DRONE_RPC_SECRET=drone-secret \
+    --env=DRONE_SERVER_HOST=drone.xxxx.xyz \
+    --env=DRONE_SERVER_PROTO=https \
+    --env=DRONE_TLS_AUTOCERT=true \
+    --env=DRONE_USER_CREATE=username:username,admin:true \
+    --env=DRONE_USER_FILTER=org \
+    --publish=80:80  --publish=443:443  --restart=always  --detach=true  --name=drone   drone/drone:2
+```
+
+- Install docker runners One AMD64 server capable to build packages for amd64 packages (Can be the same as the drone server)
+```
+    docker run --detach \
+      --volume=/var/run/docker.sock:/var/run/docker.sock \
+      --env=DRONE_RPC_PROTO=https \
+      --env=DRONE_RPC_HOST=drone.xxxx.xyz
+      --env=DRONE_RPC_SECRET=super-duper-secret \
+      --env=DRONE_RUNNER_CAPACITY=2 \
+      --env=DRONE_RUNNER_NAME=my-first-runner \
+      --publish=3000:3000 \
+      --restart=always \
+      --name=runner \
+      drone/drone-runner-docker:1
+```
+-   One ARM64 server capable to build packages for arm64 packages 
+```
+    docker run --detach \
+      --volume=/var/run/docker.sock:/var/run/docker.sock \
+      --env=DRONE_RPC_PROTO=https \
+      --env=DRONE_RPC_HOST=drone.xxxx.xyz \
+      --env=DRONE_RPC_SECRET=super-duper-secret \
+      --env=DRONE_RUNNER_CAPACITY=1 --env=DRONE_RUNNER_NAME=amd64 \
+      --publish=3000:3000  \
+      --restart=always \
+      --name=runner  \
+      --platform=arm64 \
+      drone/drone-runner-docker:linux-arm64
+ ```
 
 ## Prepare settings