Installation Failed on CoreOS?

Not sure what is happening here, but I can’t seem to get my installation for Discourse working on a CoreOS container by Digital Ocean. Everything went fine until the ouput the very end


Here is a pastebin of my cloud config file I used to start the container if that’s relevant: http://pastebin.com/raw/5SyXP4Vh

I ran the commands EXACTLY as listed on the guide. I cloned the repo in the relevant directory and ran the bash script!

What does docker info and docker version show?

1 Like

Docker Info:

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 3
Server Version: 1.12.3
Storage Driver: overlay
 Backing Filesystem: extfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: host bridge overlay null
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp selinux
Kernel Version: 4.7.3-coreos-r2
Operating System: Container Linux by CoreOS 1235.6.0 (Ladybug)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 997 MiB
Name: CustomServ
ID: 36GZ:WYQG:GBUY:JJPF:LJLA:5G4K:KCVS:VMBP:5OPY:CJC3:YXMP:LWCN
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
 127.0.0.0/8

Docker Version

Client:
 Version:      1.12.3
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   34a2ead
 Built:        
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.3
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   34a2ead
 Built:        
 OS/Arch:      linux/amd64

Oh wait I was thinking of devicemapper. In theory overlay should work.

In practice, well… you’ve seen what happens. Notably on the commercial side, Docker doesn’t list CoreOS as supported at all.

1 Like

Yeah I just read the select a storage driver option. Gonna see if I can change it. Will rebuilding the app potentially work, or will I need to rerun the entire script?

Also that’s really strange since CoreOs ships out of box with Docker as it’s baseline program. They even mention it on their about page…

So after a bit of research I found this: https://github.com/coreos/bugs/issues/1142 stating that CoreOS used to support btrfs, but now they’ve switched to overlay. They gave me this link here to switch to btrfs, but it doesn’t seem to be working. Is there anyway I can fix this without actually having to change the filesystem? (To be fair, I’m still really confused about what exactly is going on here that is preventing the app from running and creating a docker instance)

1 Like

We never tested support on coreos, looks like the hostname command is not supported

Someone needs to add coreos support to launcher

2 Likes

Just read the launcher source code and figured out the error. Gonna see if it works. hostname -s gives me Unknown Host error even though -s is a valid flag. hostname works just fine.

God… what a stupid error: https://github.com/coreos/bugs/issues/1764

2 Likes

Finally got a forum up and running! Thanks for your help!

I submitted a pull request here for compatibility: https://github.com/discourse/discourse_docker/pull/327

2 Likes

How has CoreOS worked for you? I just moving one small Discourse instance from a server to another, and decided to try CoreOS.

Also, what is your update strategy? I am using Digital Ocean’s CoreOS droplet. I don’t know much about CoreOS, but I understood that the updates are automatic by default?

I would recommend sticking to Ubuntu, much higher chances people will know how to help you if stuff goes wrong.

Experimental project. I understand the risk.

Although I just realized CoreOS has vim and no nano which is a huge turn-off. But love the update mechanism of CoreOS (dual-partition)

The main use case for CoreOS is if you have a fleet of servers hosting containers, it is much less centered around hosting a single site with a single machine. So you are getting a bunch of complexity here that you do not need together with the nifty features it has.

5 Likes

The problem with CoreOS is that you cannot run the Discourse tools to build and run the Discourse docker container. ./discourse-setup will not run on CoreOS.

My solution was to run an Ubuntu Docker container which itself runs docker - Docker in Docker - and within this container build and run the Discourse container. This is scripted so when I run the container, it updates Discourse and builds the new Discourse docker image.

The only problem with this is that restarting the container took ages - so I split the process: one container builds the Discourse image and saves it to a shared volume (I only run this when I want to update Discourse). A second Docker image just uses DinD to load the Discourse docker image from the shared volume (a folder on the host) and run it using the Discourse scripts.

All the benefit of CoreOs and still able to run Discourse. Bit of a hassle but it works well. Only issue that I am still looking at is that in order to run Docker in Docker, the Ubuntu container needs higher privileges than I would like.

Oh and I also run postgres in a separate container as this is shared with other containers on the box… finally, another container runs nginx as a reverse proxy which provides the SSL endpoing and some additional security.

(and @ljpp - you can add nano to Coreos, you just need a static build)

3 Likes