XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Docker Support - CoreOS install woes

    Scheduled Pinned Locked Moved Unsolved Xen Orchestra
    13 Posts 4 Posters 3.0k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • NavManN Offline
      NavMan
      last edited by

      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 post

      Has 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 Oliver 😆

      Thank you!

      J 1 Reply Last reply Reply Quote 0
      • NavManN Offline
        NavMan
        last edited by

        Bump

        Promise ill write a complete setup guide when I'm done ❤

        J 1 Reply Last reply Reply Quote 1
        • J Offline
          JeffBerntsen Top contributor @NavMan
          last edited by

          @navman

          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.

          NavManN 2 Replies Last reply Reply Quote 0
          • NavManN Offline
            NavMan @JeffBerntsen
            last edited by

            @jeffberntsen

            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.

            1 Reply Last reply Reply Quote 0
            • olivierlambertO Offline
              olivierlambert Vates 🪐 Co-Founder CEO
              last edited by olivierlambert

              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.

              1 Reply Last reply Reply Quote 2
              • J Offline
                jmccoy555 @NavMan
                last edited by

                @navman I got it working some time ago in 8.0 but not tried since..... might be some pointers to help you in this post.

                1 Reply Last reply Reply Quote 0
                • NavManN Offline
                  NavMan @JeffBerntsen
                  last edited by NavMan

                  @jeffberntsen

                  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

                  @olivierlambert

                  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.

                  @jmccoy555

                  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.

                  J 1 Reply Last reply Reply Quote 0
                  • olivierlambertO Offline
                    olivierlambert Vates 🪐 Co-Founder CEO
                    last edited by

                    @NavMan Could you explain a bit more in details the thing you'd like to have in the UI? (ideally, and functionally speaking)

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      jmccoy555 @NavMan
                      last edited by

                      @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?

                      1 Reply Last reply Reply Quote 0
                      • NavManN Offline
                        NavMan
                        last edited by

                        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.

                        @olivierlambert

                        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 🙂

                        1 Reply Last reply Reply Quote 0
                        • olivierlambertO Offline
                          olivierlambert Vates 🪐 Co-Founder CEO
                          last edited by

                          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.

                          NavManN 1 Reply Last reply Reply Quote 0
                          • NavManN Offline
                            NavMan @olivierlambert
                            last edited by

                            @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.

                            1 Reply Last reply Reply Quote 0
                            • olivierlambertO Offline
                              olivierlambert Vates 🪐 Co-Founder CEO
                              last edited by

                              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.

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post