Any benefit to switching to docker machine for swarm initialisation? #16

Closed
opened 2020-09-20 18:39:39 +00:00 by 3wordchant · 4 comments
Owner

It looks like docker-machine has a generic driver which connects over SSH, and handles installing certificates for remote connections for you:

https://www.linux.com/topic/cloud/how-use-docker-machine-create-swarm-cluster/

I'm wondering if that's easier than my other ideas for #12, which were:

  1. Install Ansible, then use a combination of third-party and Autonomic roles to install Docker, initialise the swarm, and set up remote connection. Benefit:
  2. Add abra command to initialse swarm, have a --server mode to the abra installer script
It looks like `docker-machine` has a `generic` driver which connects over SSH, and handles installing certificates for remote connections for you: https://www.linux.com/topic/cloud/how-use-docker-machine-create-swarm-cluster/ I'm wondering if that's easier than my other ideas for #12, which were: 1. Install Ansible, then use a combination of third-party and Autonomic roles to install Docker, initialise the swarm, and set up remote connection. Benefit: 2. Add `abra` command to initialse swarm, have a `--server` mode to the abra installer script
Owner

Holy cow, that machine project looks sick. Just saw this now too https://github.com/JonasProgrammer/docker-machine-driver-hetzner. Pretty handy. Definitely up for trying to see how it handles the certificates!

Holy cow, that machine project looks sick. Just saw this now too https://github.com/JonasProgrammer/docker-machine-driver-hetzner. Pretty handy. Definitely up for trying to see how it handles the certificates!
Author
Owner

It looks like Docker machine was "superseded" in favour of infrakit / deploykit, which is now itself deprecated (a likely-sounding corporate bullshit conspiracy explanation is ventured in first link..)

There's a somewhat-active machine fork here: https://github.com/machine-drivers/machine

One suggestion from the "superseded" thread was to use export DOCKER_HOST=ssh://root@example.com, I'm giving that a go now.

It looks like [Docker machine was "superseded"](https://github.com/docker/machine/issues/4537) in favour of [infrakit / deploykit](https://github.com/docker/deploykit), which is now itself deprecated (a likely-sounding corporate bullshit conspiracy explanation is ventured in first link..) There's a somewhat-active `machine` fork here: https://github.com/machine-drivers/machine One suggestion from the "superseded" thread was to use `export DOCKER_HOST=ssh://root@example.com`, I'm giving that a go now.
Author
Owner
$ docker context create swarmssh.autonomic.zone 
  --description "SSH to autonomic swarm" 
  --docker "host=ssh://$USER@swarm.autonomic.zone:222"
Successfully created context "swarmssh.autonomic.zone"
$ docker context use swarmssh.autonomic.zone
$ docker stack ls
...
(remote stacks)

Requires user to be in the docker group.

Certificate set-up was my main draw to docker-machine; I'll close this for now and we can reopen it if it still seems like a good option for the server set-up side.

``` $ docker context create swarmssh.autonomic.zone --description "SSH to autonomic swarm" --docker "host=ssh://$USER@swarm.autonomic.zone:222" Successfully created context "swarmssh.autonomic.zone" $ docker context use swarmssh.autonomic.zone $ docker stack ls ... (remote stacks) ``` Requires user to be in the `docker` group. Certificate set-up was my main draw to `docker-machine`; I'll close this for now and we can reopen it if it still seems like a good option for the server set-up side.
Author
Owner

As of abra/f4798bf:

$ abra context init swarm.autonomic.zone $USER 222
Successfully created context "swarm.autonomic.zone"
$ abra context use swarm.autonomic.zone
Current context is now "swarm.autonomic.zone"
As of [`abra/f4798bf`](https://git.autonomic.zone/autonomic-cooperative/abra/commit/f4798bf3bd2cec1017e931d2a727388320406a0b): ``` $ abra context init swarm.autonomic.zone $USER 222 Successfully created context "swarm.autonomic.zone" $ abra context use swarm.autonomic.zone Current context is now "swarm.autonomic.zone" ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/organising#16
No description provided.