Installation Failed on CoreOS?

(Harsh) #1

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:

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

(Jeff Atwood) #3

What does docker info and docker version show?

(Harsh) #4

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
 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
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Insecure Registries:

Docker Version

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

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

(Jeff Atwood) #5

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.

(Harsh) #6

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…

(Harsh) #7

So after a bit of research I found this: How to run AUFS on CoreOS stable? · Issue #1142 · coreos/bugs · GitHub 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)

(Sam Saffron) #8

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

Someone needs to add coreos support to launcher

(Harsh) #10

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: Hostname Invalid Output · Issue #1764 · coreos/bugs · GitHub

(Harsh) #11

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

I submitted a pull request here for compatibility: CoreOS Bug by Blackglade · Pull Request #327 · discourse/discourse_docker · GitHub

(ljpp) #12

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?

(Sam Saffron) #13

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

(ljpp) #14

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)

(Sam Saffron) #15

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.

(Richard Phillips) #16

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)