docker-swarm-demo
docker-swarm-demo copied to clipboard
vagrant up fails
Unfortunatelly, on ubuntu 14:04 this fails:
$ vagrant up
Bringing machine 'dockerhost01' up with 'virtualbox' provider...
Bringing machine 'dockerhost02' up with 'virtualbox' provider...
Bringing machine 'dockerhost03' up with 'virtualbox' provider...
Bringing machine 'dockerswarm01' up with 'virtualbox' provider...
==> dockerhost01: Importing base box 'vbox-trusty64-20150111.box'...
==> dockerhost01: Matching MAC address for NAT networking...
==> dockerhost01: Setting the name of the VM: docker-swarm-demo_dockerhost01_1424413681998_16330
==> dockerhost01: Clearing any previously set network interfaces...
==> dockerhost01: Preparing network interfaces based on configuration...
dockerhost01: Adapter 1: nat
dockerhost01: Adapter 2: hostonly
==> dockerhost01: Forwarding ports...
dockerhost01: 22 => 2222 (adapter 1)
==> dockerhost01: Running 'pre-boot' VM customizations...
==> dockerhost01: Booting VM...
==> dockerhost01: Waiting for machine to boot. This may take a few minutes...
dockerhost01: SSH address: 127.0.0.1:2222
dockerhost01: SSH username: vagrant
dockerhost01: SSH auth method: private key
dockerhost01: Warning: Remote connection disconnect. Retrying...
==> dockerhost01: Machine booted and ready!
==> dockerhost01: Checking for guest additions in VM...
==> dockerhost01: Setting hostname...
==> dockerhost01: Configuring and enabling network interfaces...
==> dockerhost01: Mounting shared folders...
dockerhost01: /vagrant => /home/kszumny/devel/docker-swarm-demo
==> dockerhost01: Running provisioner: hosts...
==> dockerhost01: Running provisioner: ansible...
PLAY [vagrant_dockerhosts] ****************************************************
GATHERING FACTS ***************************************************************
ok: [dockerhost01]
TASK: [base | update apt] *****************************************************
ok: [dockerhost01]
TASK: [docker | Install apt key] **********************************************
failed: [dockerhost01] => {"failed": true, "item": ""}
msg: unsupported parameter for module: keyserver
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/home/kszumny/vagrant_docker_host.retry
dockerhost01 : ok=2 changed=0 unreachable=0 failed=1
Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
I have a similar issue with vagrant using chef server and trusty64. I think there are problem with this box at this moment. Yesterday morning it was working fine.
try to update before anything else worked for me.
@dave-jeremie Update what exactly? I still have this same problem.
with an apt-update before doing anything else, worked for me. But maybe it won't for you.
Are you guys still having pains with this?
The fix I did was to edit ansible/roles/docker/tasks/packages.yml
#- name: Install apt key
# sudo: true
# apt_key: >
# id=36A1D7869245C8950F966E92D8576A8BA88D21E9
# keyserver=hkp://keyserver.ubuntu.com:80
# state=present
- name: Install Docker package
sudo: true
apt: >
name=lxc-docker
state=present
force=yes
Additionally I had to add the following line to each S3 download in several yaml files.
validate_certs=no
Grand total it was about an hour of fighting with Ansible to get it up and running. Now that it's up, things work great.
If you use a version of ansible < 1.6 remove "keyserver=" and try this instead:
url=http://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x36A1D7869245C8950F966E92D8576A8BA88D21E9 state=present