mg64ve
(marco)
February 23, 2022, 3:16pm
1
Hi there, I am new to drone and I just want to setup a test configuration with docker containers.
For this reason I have prepared the following simple script that is taken from drone.io documentation and adjusted a little bit:
docker network create gogs_network
docker run -d --rm \
--name=gogs_gogs \
--net gogs_network \
-p 10022:22 \
-p 10880:3000 \
-v ${PWD}/gogs:/data \
gogs/gogs
docker run -d --rm \
--volume=${PWD}/drone:/data \
--env=DRONE_AGENTS_ENABLED=true \
--env=DRONE_GOGS_SERVER=http://gogs_gogs:3000 \
--env=DRONE_RPC_SECRET=ALQU2M0KdptXUdTPKcEw \
--env=DRONE_SERVER_HOST=gogs_drone \
--env=DRONE_SERVER_PROTO=http \
--net gogs_network \
--publish=80:80 \
--publish=443:443 \
--name=gogs_drone \
drone/drone:2
docker run -d --rm \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--env=DRONE_RPC_PROTO=http \
--env=DRONE_RPC_HOST=gogs_drone \
--env=DRONE_RPC_SECRET=ALQU2M0KdptXUdTPKcEw \
--env=DRONE_RUNNER_CAPACITY=2 \
--env=DRONE_RUNNER_NAME=my-first-runner \
--net gogs_network \
--publish=3000:3000 \
--name=gogs_runner \
drone/drone-runner-docker:1
Everything seems to be ok, logs are ok, I have created a repository in gogs and made sync in drone.
I have also created a simple .drone.yml:
kind: pipeline
type: docker
name: default
steps:
- name: test
image: alpine
commands:
- echo hello
- echo world
But when I am creating a new build I am getting the following error:
Why am I getting this?
mg64ve
(marco)
February 24, 2022, 1:27pm
2
I think I found the proper configuration.
This works:
docker network create gogs_network
docker run -d --rm \
--name=gogs_gogs \
--net gogs_network \
-p 8122:22 \
-p 3100:3000 \
-v ${PWD}/gogs:/data \
gogs/gogs
docker run -d --rm \
--volume=${PWD}/drone:/var/lib/drone \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--env=DRONE_OPEN=true \
--env=DRONE_SERVER_HOST=gogs_drone_server \
--env=DRONE_SERVER_PROTO=http \
--env=DRONE_DEBUG=true \
--env=DRONE_GIT_ALWAYS_AUTH=false \
--env=DRONE_GOGS=true \
--env=DRONE_GOGS_SKIP_VERIFY=false \
--env=DRONE_GOGS_SERVER=http://mgcl1n31:3100 \
--env=DRONE_PROVIDER=gogs \
--env=DRONE_DATABASE_DATASOURCE=/var/lib/drone/drone.sqlite \
--env=DRONE_DATABASE_DRIVER=sqlite3 \
--env=DRONE_RPC_SECRET=yrFzPxX8kNvjaMdxrtPL \
--env=DRONE_SECRET=yrFzPxX8kNvjaMdxrtPL \
--env=DRONE_AGENTS_ENABLED=true \
--net gogs_network \
--publish=8080:80 \
--publish=8443:443 \
--publish=9000 \
--name=gogs_drone_server \
drone/drone
docker run -d --rm \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--env=DRONE_RUNNER_VOLUMES=/var/run/docker.sock:/var/run/docker.sock \
--env=DRONE_RPC_HOST=gogs_drone_server \
--env=DRONE_RPC_PROTO=http \
--env=DRONE_RPC_SECRET=yrFzPxX8kNvjaMdxrtPL \
--env=DRONE_RUNNER_NAME=gogs_drone_agent \
--env=DRONE_RUNNER_CAPACITY=2 \
--env=DRONE_DEBUG=true \
--env=DRONE_TRACE=true \
--env=DRONE_RUNNER_PRIVILEGED_IMAGES=plugins/docker \
--env=DRONE_UI_USERNAME=root \
--env=DRONE_UI_PASSWORD=root \
--net gogs_network \
--publish=3001:3000 \
--name=gogs_drone_agent \
drone/drone-runner-docker
Now I want to use the same in my aarch64 home server.
Are you aware of any special need for aarch64 ?
mg64ve
(marco)
February 24, 2022, 2:23pm
3
a similar configuration on arm64 stays on the following state forever:
without completing the operation.
The following is the script:
docker network create gogs_network
docker run -d --rm \
--name=gogs_gogs \
--net gogs_network \
-p 8122:22 \
-p 3100:3000 \
-v ${PWD}/gogs:/data \
gogs/gogs
docker run -d --rm \
--volume=${PWD}/drone:/var/lib/drone \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--env=DRONE_OPEN=true \
--env=DRONE_SERVER_HOST=gogs_drone_server \
--env=DRONE_SERVER_PROTO=http \
--env=DRONE_DEBUG=true \
--env=DRONE_GIT_ALWAYS_AUTH=false \
--env=DRONE_GOGS=true \
--env=DRONE_GOGS_SKIP_VERIFY=false \
--env=DRONE_GOGS_SERVER=http://mgcl1n1:3100 \
--env=DRONE_PROVIDER=gogs \
--env=DRONE_DATABASE_DATASOURCE=/var/lib/drone/drone.sqlite \
--env=DRONE_DATABASE_DRIVER=sqlite3 \
--env=DRONE_RPC_SECRET=yrFzPxX8kNvjaMdxrtPL \
--env=DRONE_SECRET=yrFzPxX8kNvjaMdxrtPL \
--env=DRONE_AGENTS_ENABLED=true \
--net gogs_network \
--publish=8080:80 \
--publish=8443:443 \
--publish=9000 \
--name=gogs_drone_server \
drone/drone
docker run -d --rm \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--env=DRONE_RUNNER_VOLUMES=/var/run/docker.sock:/var/run/docker.sock \
--env=DRONE_RPC_HOST=gogs_drone_server \
--env=DRONE_RPC_PROTO=http \
--env=DRONE_RPC_SECRET=yrFzPxX8kNvjaMdxrtPL \
--env=DRONE_RUNNER_NAME=gogs_drone_agent \
--env=DRONE_RUNNER_CAPACITY=2 \
--env=DRONE_DEBUG=true \
--env=DRONE_TRACE=true \
--env=DRONE_RUNNER_PRIVILEGED_IMAGES=plugins/docker \
--env=DRONE_UI_USERNAME=root \
--env=DRONE_UI_PASSWORD=root \
--net gogs_network \
--publish=3001:3000 \
--name=gogs_drone_agent \
--platform=arm64 \
drone/drone-runner-docker:linux-arm64
drone
(Brad Rydzewski)
February 24, 2022, 5:31pm
4
a similar configuration on arm64 stays on the following state forever:
we have a thread dedicated to help troubleshoot issues when a build is in a pending state forever:
This section will help triage why builds are stuck in a pending state.
Whenever we encounter this issue it is always related to configuration. To triage this problem we, therefore, need to see configuration details and logs. Please take the following actions and provide the following data:
Provide your server configuration
Provide your agent configuration
Enable DRONE_LOGS_TRACE=true on the server
Enable DRONE_LOGS_TRACE=true on the agent
Provide the agent logs with trace enabled
Provide the …
Please use the above thread to help triage. I would pay special attention to the section that discussion problems when running pipelines on arm and arm64 without specifying os or architecture in your yaml.
mg64ve
(marco)
February 25, 2022, 9:59am
5
and you are right @drone !
The following was missing from .drone.yml :
platform:
os: linux
arch: arm64