gustavocoding / oc-cluster-up

OKD 4.0.0 from master with the admin console and operatore-lifecycle-manager
https://medium.com/@gustavonalle/really-launching-okd-4-0-0-with-docker-f4605a58e9d5
37 stars 14 forks source link

Ubuntu support #5

Closed javiramos1 closed 5 years ago

javiramos1 commented 5 years ago

Does this works on Ubuntu?

I'm getting this error:

[openshift/dind] Step 8/17 : RUN dnf -y update && dnf -y install docker glibc-langpack-en iptables openssh-clients openssh-server tcpdump [openshift/dind] ---> Running in a43e799706b8 [openshift/dind] Error: Failed to synchronize cache for repo 'updates' [openshift/dind] The command '/bin/sh -c dnf -y update && dnf -y install docker glibc-langpack-en iptables openssh-clients openssh-server tcpdump' returned a non-zero code: 1 [ERROR] hack/dind-cluster.sh:800: return "${result}" exited with status 1. /root//go/src/github.com/openshift/origin/run.sh: line 6: /root/go/src/github.com/openshift/origin/dind-openshift.rc: No such file or directory

....

Error: No such object: openshift-master 2019/01/15 14:12:27 cmd/main: cookies are not secure because base-address is not https! 2019/01/15 14:12:27 cmd/main: Error initializing OIDC authenticator: file examples/ca.crt contained no CA data

Thank you

gustavocoding commented 5 years ago

Should work on Ubuntu. It seems a network issue happened during the initial build of the images. If you retry, do you get the same error?

javiramos1 commented 5 years ago

I tried the network at work and home and same issue :(

gustavocoding commented 5 years ago

Could you send your docker info output please?

gustavocoding commented 5 years ago

I guess there is something wrong in your env that prevents docker build to download from the internet. You can try with a test, create a simple Dockerfile:

FROM fedora:27

RUN dnf -y update && dnf -y install\
 docker\
 glibc-langpack-en\
 iptables\
 openssh-clients\
 openssh-server\
 tcpdump

and then

docker build -t sample .
javiramos1 commented 5 years ago

This is my docker info.:

Containers: 10 Running: 0 Paused: 0 Stopped: 10 Images: 38 Server Version: 18.09.0 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: systemd Plugins: Volume: local Network: bridge host macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: c4446665cb9c30056f4998ed953e6d4ff22c7c39 runc version: 4fc53a81fb7c994640722ac585fa9ca548971871 init version: fec3683 Security Options: apparmor seccomp Profile: default Kernel Version: 4.19.0-041900-generic Operating System: Ubuntu 18.10 OSType: linux Architecture: x86_64 CPUs: 12 Total Memory: 31.27GiB Name: javier-Recoil-II ID: ON3M:GIDT:XQ6K:3KEA:BDIL:V2T4:2KM2:4NRW:PYRM:VSPF:IM2A:GBHJ 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: 172.30.0.0/16 127.0.0.0/8 Live Restore Enabled: false Product License: Community Engine

WARNING: No swap limit support

Let me try your test... thanks!

javiramos1 commented 5 years ago

Your sample didn't work but I think I've found the issue:

I need to pass --network host to the build command otherwise the containers have no connectivity.

But I do not know why I need to do this, may be an Ubuntu issue. Do you have any ideas?

I will continue investigating tomorrow.

Thank you very much.

gustavocoding commented 5 years ago

It seems Ubuntu has DNS issues with docker. So one workaround would be to add 8.8.8.8 to the /etc/docker/daemon.json in the end of the array:

{
  "dns": ["...", "8.8.8.8"]
}

and restart docker.

gustavocoding commented 5 years ago

Also, could you try with the latest image? There was a change where startup is faster as the dependant images are pre-built

gustavocoding commented 5 years ago

I've just tested with Ubuntu 18.04.1 LTS, docker version 18.06.1-ce, build e68fc7a and both the oc-cluster-up and the test above works without changing any DNS.

Apparently Docker-CE can handle correctly the fact that ubuntu uses dnsmaq, where /etc/resolv.conf has only a local DNS and the real nameserver is located in /run/systemd/resolve/resolv.conf.

Please make sure to use the docker version above and open a new issue if the problem persists.