scaleway / docker-machine-driver-scaleway

:whale: Scaleway driver for Docker Machine
MIT License
249 stars 34 forks source link

fix: go mod + instance volume size #106

Closed QuentinBrosse closed 4 years ago

QuentinBrosse commented 4 years ago

DO NOT MERGE: This is a work in progress, this branch needs to be manually tested before a potential merge.

Work:

Example:

# Create an ubuntu-bionic DEV1-S
# It will throw an error because ubuntu bionic doesn’t have sudo installed by default
$ docker-machine create -d scaleway --scaleway-name="scw-machine-test-1" --scaleway-commercial-type="DEV1-S" --scaleway-image="f974feac-abae-4365-b988-8ec7d1cec10d" test1
[...]
Provisioning with ubuntu(systemd)...
Error creating machine: Error running provisioning: ssh command error:
command : sudo hostname test1 && echo "test1" | sudo tee /etc/hostname
err     : exit status 127
output  : bash: sudo: command not found

# We need to install it:
$ docker-machine ssh test1 apt install sudo
[...]

# Re-provisionning
$ docker-machine provision test1
[...]

# Done 🎉 

Todo:

Fix the sudo issue (firstly discovered here).

In the docker libmachine, the generic provisioner call sudo without checking if the command is installed before while Ubuntu Bionic doesn't have sudo by default anymore.

The UbuntuSystemdProvisioner seems to not be compatible with Ubuntu Bionic (the last tested version is 15.04).

I can see two solutions:

QuentinBrosse commented 4 years ago

Continue the work in #107