Docker Support - CoreOS install woes
-
Hello everyone,
I was initially going to setup a VM for SNMP monitoring, but then decided it would just be better suited to a docker. I saw blog post regarding XO support for docker and began the process, had nothing but issues, hopefully someone can point me in the right direction!
Let me detail the method
SSH into Xen 8.2 Host
Loged into Citrix online to download the CitrixHypervisor-8.0.0-xscontainer.iso supplement pack.
Uploaded to Xen 8.2 host, proceeded with installation, all successful here.
Unable to work Fedora-Coreos-33.2 and cloud config, after a bit of research it looks to be since RedHats involvement they have moved to ignite instead.
Install CoreOS with Ignite
sudo coreos-installer install /dev/xvda --ignition-url https://example.com/coreos.ign
Once Running
rpm-ostree install xe-guest-utilities-latest
Since I didn't use cloud-init only option left is to use xscontainer.
Not to worry!xscontainer-prepare-vm -v <VM_UUID> -u <username>
To the best of my understanding this successfully uses XAPI to paste into authorized keys for the required user 'orthia'
This is the pool RSA 4096 public key.If i remove the key saved in authorized_keys and restart the xscontainer-prepare-vm the key is reentered.
[root@Bruticus ~]# xscontainer-prepare-vm -v 4fbff411-1c42-7417-d4fd-ce8dfe5b4ba 8 -u orthia Would you like to push a pool-specific public SSH key into the ~/.ssh/authorized _keys file of the specified VM and therefore authorize hosts in the pool to inte ract with the containers inside the VM? Answer y/n: y Attempting to push the public xscontainer key to orthia@192.168.0.137. Success. Attempting to refresh the state of the VM Failure diagnosis: Unable to verify key-based authentication. Please prepare the VM to install a key. Do you wish to retry?
Now im not sure how xscontainer.remote_helper tests the connection, but I've even tried implementing a ~/.shh/config on the Xen Host to get it to use the ECDSA key
host 192.168.0.137 HostName 192.168.0.137 IdentityFile ~/.ssh/orthia_id
So from The XenHost I'm able to ssh orthia@192.168.0.137 and connect via the ECDSA key.
Originally setting up the CoreOS VM with Ingite I had problems with key based access with RSA, which ive never encountered, posting on the forums a member suggested to use ECDSA which worked first attempt.
Below is my forum post detailing the installation method.
CoreOS key issue postHas anyone successful got Docker Support via XenOrchestra running on 8.2?
If so how has my installation path differed from yours?Any help is greatly appreciated.
PS; Everything else on XO treats me well, its been a pleasure to use.
I fan boy hard everytime I get an email from OliverThank you!
-
Bump
Promise ill write a complete setup guide when I'm done
-
You might have better luck with Flatcar Container Linux. It was forked from CoreOS before Red Hat took it over and I've upgraded a couple of my Docker CoreOS VMs to use it instead.
I haven't tried a fresh install with it but it's similar enough to what CoreOS used to be that it might work just fine with CoreOS VM installation templates and instructions.
-
Hello Jeff,
Just taken a look now, I'll certainly give it a shot.
Can't believe I didn't cross this in all of my google searches.Will update this thread with the results
Thankyou.
-
To be fair, Docker support was made by Citrix in few weeks, and it's "hacky" (at best) and wasn't maintained since.
Ideally, we should do something better on our side (first in terms of general architecture, then in XO UI). It's in the backlog, but so far never make it to the actual dev process.
-
-
Hello Jeff,
Flatcar has also primarily moved to ignite but still have support for cloud-config.
Unfortunately after installation it's got Hypervisor Linux Guest Agent 6.2 which is unable to communicate with my Xen Hypervisor 8.2 installation.Further more Flatcar is shipped completely without a package manager so I'm unable to update it.
Fedoras fork of CoreOS has rpm-ostree but can't get RSA keys going just ECDSA so xs-container-prepare-vm doesn't work
I would be looking forward to such a feature, the amount of times i have to fire up a docker for a few tasks would be great to do it from XO interface.
I've had a look at that post, unfortunately they have moved away from cloud-config and moved to ignite since that forum post.
I think I'm going to revisit Fedora-CoreOS I must have made a configuration error or something I'm missing. Any other suggestions are most welcome and thanks to everyone who has replied so far.
-
@NavMan Could you explain a bit more in details the thing you'd like to have in the UI? (ideally, and functionally speaking)
-
@navman said in Docker Support - CoreOS install woes:
ignite
yeah, i think that creates a whole load of problems! It was becoming the prefered method when I got it working, but cloud-config was still possible.
So there's no way to fall back to cloud-config anymore?
-
Hello Everyone,
In the end I went with a minimal centos installation, installed Xen tools and used xscontainer-prepare-vm -v <VM_UUID> -u <username>
Really not worth doing!
Start, Stop and restart.Not sure what I was expecting but something with more control like Portainer. Your only real options with the implementation is to start, stop and restart.
Maybe see if Portainer want's to collab, that would be awesome
-
Well, that's the question: "do something like Portainer" is vague and we don't want to re-write something that's already doing the job.
So we need to prioritize, as a system admin, what would be the most used operation to do on containers without having to open portainer.
-
@olivierlambert Well for me the main things I would require start, stop, restart, console and log view.
I'm sure other people will chime in and let you know what they too would like to see in the XO UI.
-
I don't think console is possible at all (I have no idea in fact, I don't think Docker got an API to allow a remote console display). XO could deal with Docker API, it's not a "physical" access in the container.