I sincerely apologize for letting frustration come through and thank you for any help you have time to provide. I would like to be 100% self-sufficient but can’t seem to figure it out myself. I didn’t want to waste anyone’s time getting a trivial set-up working.
However, I will throw myself on the mercy of the community.
Specifically trying to get docker builds working.
I am running drone in a kubernetes cluster hosted on Digital Ocean’s beta kubernetes, drone is deployed using the helm/stable chart with a minimal configuration. SSL is not enabled.
I get a lot of warnings in my drone-drone-agent-dind container log but no errors. – I’m happy to publish the logs to a gist if that makes sense.
I have a theoretically very simple .drone.yml
file.
pipeline:
build:
image: node:carbon
commands:
- npm run ci
docker:
image: plugins/docker
repo: fdiinc/fusion-frontend
registry: docker.fdiinc.io
context: fusion-frontend
dockerfile: fusion-frontend/Dockerfile
#username: "name-for-docker.fdiinc.io"
#password: "pw-for-docker.fdiinc.io"
# See: https://www.flowdock.com/help/drone
notify:
flowdock:
token: "...redacted..."
on_started: true
on_success: true
on_failure: true
I created registry creds using the UI.
Registry Address: docker.fdiinc.io
Registry User: name-for-docker.fdiinc.io
Registry PW: pw
If I put in valid credentials to the .drone.yml, the docker step instantly fails:
+ /usr/local/bin/dockerd -g /var/lib/docker
time="2018-11-15T22:57:05Z" level=fatal msg="Error authenticating: exit status 1"
So then I used the drone-cli 0.8.6 version to debug if it was configured correctly. I don’t understand why I need to list a repo, but I guess that is so that it can do the matching and figure out what custom registry applies to the specific project in question?
drone registry ls fdiinc/fusion
?[33mdocker.fdiinc.io ?[0m
Username: name-for-docker.fdiinc.io
Email:
I found elsewhere that email is mandatory to be not specified in later versions. So I think it is OK??
So I decided to not put a username / pw into the docker step since I have creds specified (per above with commented out u/p):
Registry Address: docker.fdiinc.io
Registry Username: my-registry-username
Registry Password: my-registry-password
Now the docker build runs but it can’t upload
+ /usr/local/bin/dockerd -g /var/lib/docker
Registry credentials not provided. Guest mode enabled.
+ /usr/local/bin/docker version
Client:
Version: 17.12.0-ce
API version: 1.35
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:05:38 2017
OS/Arch: linux/amd64
Server:
Engine:
Version: 17.12.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:12:29 2017
OS/Arch: linux/amd64
Experimental: false
+ /usr/local/bin/docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 17.12.0-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 89623f28b87a6004d4b785663257362d1658a729
runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.0-7-amd64
Operating System: Alpine Linux v3.7 (containerized)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 996.5MiB
Name: 79513850ab01
ID: F4YM:UMJV:MDHF:DWS3:MNWT:7IAJ:6DRC:EWYY:K77G:FLE7:RRK2:CTTN
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
+ /usr/local/bin/docker build --rm=true -f fusion-frontend/Dockerfile -t c3bedede735707b28bd695fac50d2dace27e9ae7 fusion-frontend --pull=true --label org.label-schema.schema-version=1.0 --label org.label-schema.build-date=2018-11-15T23:30:01Z --label org.label-schema.vcs-ref=c3bedede735707b28bd695fac50d2dace27e9ae7 --label org.label-schema.vcs-url=https://github.com/fdiinc/fusion.git
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Sending build context to Docker daemon 756.2kB
Step 1/8 : FROM node:carbon
carbon: Pulling from library/node
61be48634cb9: Pulling fs layer
fa696905a590: Pulling fs layer
b6dd2322bbef: Pulling fs layer
32477089adb4: Pulling fs layer
febe7209ec28: Pulling fs layer
4364cbe57162: Pulling fs layer
ace5c680ff94: Pulling fs layer
4acd6a9b7a48: Pulling fs layer
32477089adb4: Waiting
febe7209ec28: Waiting
4364cbe57162: Waiting
ace5c680ff94: Waiting
4acd6a9b7a48: Waiting
fa696905a590: Verifying Checksum
fa696905a590: Download complete
b6dd2322bbef: Verifying Checksum
b6dd2322bbef: Download complete
61be48634cb9: Verifying Checksum
61be48634cb9: Download complete
febe7209ec28: Verifying Checksum
febe7209ec28: Download complete
4364cbe57162: Verifying Checksum
4364cbe57162: Download complete
61be48634cb9: Pull complete
4acd6a9b7a48: Verifying Checksum
4acd6a9b7a48: Download complete
32477089adb4: Verifying Checksum
32477089adb4: Download complete
ace5c680ff94: Verifying Checksum
ace5c680ff94: Download complete
fa696905a590: Pull complete
b6dd2322bbef: Pull complete
32477089adb4: Pull complete
febe7209ec28: Pull complete
4364cbe57162: Pull complete
ace5c680ff94: Pull complete
4acd6a9b7a48: Pull complete
Digest: sha256:7b65413af120ec5328077775022c78101f103258a1876ec2f83890bce416e896
Status: Downloaded newer image for node:carbon
---> 82c0936c46c1
Step 2/8 : WORKDIR /usr/src/app
Removing intermediate container 121a03ff6c17
---> 385f84c182ca
Step 3/8 : COPY package*.json ./
---> 7e6b5f4a4bce
Step 4/8 : RUN npm install --no-audit
---> Running in 2ad994875ed5
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 1715 packages from 699 contributors in 56.958s
Removing intermediate container 2ad994875ed5
---> 09d0f098cdd2
Step 5/8 : COPY . .
---> 5059f6ecf192
Step 6/8 : EXPOSE 3001
---> Running in 34062371561b
Removing intermediate container 34062371561b
---> 92ac071cd390
Step 7/8 : CMD [ "npm", "start" ]
---> Running in f2c382bbbd6c
Removing intermediate container f2c382bbbd6c
---> cc8f10012028
Step 8/8 : LABEL "org.label-schema.build-date"='2018-11-15T23:30:01Z' "org.label-schema.schema-version"='1.0' "org.label-schema.vcs-ref"='c3bedede735707b28bd695fac50d2dace27e9ae7' "org.label-schema.vcs-url"='https://github.com/fdiinc/fusion.git'
---> Running in 4af974d9fbfe
Removing intermediate container 4af974d9fbfe
---> 1768b35acec0
Successfully built 1768b35acec0
Successfully tagged c3bedede735707b28bd695fac50d2dace27e9ae7:latest
+ /usr/local/bin/docker tag c3bedede735707b28bd695fac50d2dace27e9ae7 fdiinc/fusion-frontend:latest
+ /usr/local/bin/docker push fdiinc/fusion-frontend:latest
The push refers to repository [docker.io/fdiinc/fusion-frontend]
ffd56d126117: Preparing
13f38f77db39: Preparing
d6960b75f647: Preparing
514faa867816: Preparing
44473255e807: Preparing
cf8a9d04d13b: Preparing
fae583f1d4e5: Preparing
9d22e51f0c6d: Preparing
58b8d417193d: Preparing
704a8634956f: Preparing
05f0b6bcfa5c: Preparing
0972cc82b682: Preparing
cf8a9d04d13b: Waiting
fae583f1d4e5: Waiting
9d22e51f0c6d: Waiting
58b8d417193d: Waiting
704a8634956f: Waiting
05f0b6bcfa5c: Waiting
0972cc82b682: Waiting
denied: requested access to the resource is denied
time="2018-11-15T23:32:07Z" level=fatal msg="exit status 1"
Also, the notifications aren’t right. I suspect my pipeline step is borked but that is the exact example given by the flowdock notification instructions here: https://www.flowdock.com/help/drone
It is hard to tell with YAML if this should be under the pipeline like I specifed or if it belongs at the base (zero indent) I tried both and dont’ get anything that I can find either way.
Where should logs indicating notification failure go? I looked at logs for all 3 of the images that are running in my helm chart and none seem to mention notification failures (drone-drone-server, drone-drone-agent, drone-drone-dind)