Hello all! I’ve been trying lots of things, searching various issues to no effect; hoping someone can help me out here.
I have installed Drone 0.5 on my v1.3.7 Kubernetes cluster running on GCE, using a heavily modified rendition of the manifests in this repository. I was able to alter these scripts to get the server, agent, and proxy running and talking to each other. Github login works, builds start on a push, all of that is wonderful.
The problem lies in getting these builds to run. Every time I attempt a push, or restart a failed build manually, I get something like this:
My configuration to date is relatively trivial (just wanted to see a few things working before I go in full-bore):
pipeline:
install:
image: node:latest
commands:
- npm install
test:
image: node:latest
commands:
- npm run-script test
log:
image: plugins/slack
webhook: <redacted>
channel: ci
template: |
{{ #success build.status }}
{{ repo.name }}/{{ repo.branch }} \#{{ build.number }} - succeeded after {{ since build.started }}.
{{ else }}
{{ repo.name }}/{{ repo.branch }} \#{{ build.number }} - FAILED after {{ since build.started }}.
{{ /success }}
when:
status: [ success, failure ]
I’ve tried a build-only script to the same end. After verifying it wasn’t configuration related, I moved to my cluster.
I have deployed every Drone asset in its own pod, federating them with Kubernetes services. I then began messing with the configuration of the agent vis-a-vis its Docker and network access on that pod.
I am currently mapping in the Docker socket from the host node without a hitch. I have tried mapping the host network into the pod to no avail, and changing the security context of the pod to privileged with and without host networking enabled: neither of these things have made a difference. The DOCKER_HOST environment variable has been no use to me, as I am mapping the socket into the pod at the location specified by the agent’s default.
Here is a sample of my configuration (partially modified for brevity - the most relevant bits I have kept. I am not adjusting any aspect of the agent’s configuration with respect to Docker via environment variables):
{
"apiVersion": "extensions/v1beta1",
"kind": "Deployment",
"metadata": { ... },
"spec": {
"replicas": 1,
"template": {
"metadata": { ... },
"spec": {
"hostNetwork": true,
"containers": [
{
"command": [
"/drone",
"agent"
],
"env": [ ... ],
"image": "drone/drone:0.5",
"name": "drone-agent",
"resources": { ... },
"securityContext": {
"privileged": true
},
"volumeMounts": [
{
"mountPath": "/var/run/docker.sock",
"name": "docker-socket"
}
]
}
],
"volumes": [
{
"hostPath": {
"path": "/var/run/docker.sock"
},
"name": "docker-socket"
}
]
}
}
}
}
Removing host networking and/or a privileged security context yields the same result as the picture above.
Any ideas what I’m doing wrong? Coming from many, many months of frustration with Jenkins I am really excited to move my organization to Drone - I just need to get us past this! Thank you in advance for your help!