Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade ansible-docker, Docker, and Docker Compose #800

Merged
merged 2 commits into from
Mar 25, 2020

Conversation

colekettler
Copy link
Contributor

@colekettler colekettler commented Mar 24, 2020

Overview

Upgrades the Ansible Docker module to 5.0.0, which uses the non-deprecated download.docker.com repository URL. Also upgrades Docker to 18.*, the latest version available in the main repo and the version currently running on ECS; and Docker Compose to 1.23.*, the latest version that will work with the current VM configuration.

Notes

I upgraded Docker Compose to 1.23.*, which is not the most recent version. Upgrading to 1.24.* or 1.25.* resulted in a segmentation fault for any subsequent step. I didn't dig very far into the root cause of this problem and instead created #799 to track it.

Testing Instructions

  • Run scripts/setup and verify that VM is created successfully.
  • Run vagrant ssh to SSH into VM.
  • Run scripts/update to build Docker images.
  • Run scripts/test and verify that all tests pass.

Checklist

  • Add entry to CHANGELOG.md

Connects #798

@colekettler colekettler self-assigned this Mar 24, 2020
@colekettler colekettler requested a review from rbreslow March 24, 2020 18:50
Copy link
Contributor

@rbreslow rbreslow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine, however I was able to provision fine without the Docker Engine/Compose version bump. I would consider leaving that out of this PR. For example, we're using an older Compose file format (2.0) and I'm not sure what the implications of using that on a newer Docker Engine would be.

Also, it's worth surfacing that I had issues provisioning because I do not have NFS configured on my workstation. I had to make the following changes:

diff --git a/Vagrantfile b/Vagrantfile
index 8ebb89c..6af7326 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -39,7 +39,7 @@ Vagrant.configure("2") do |config|
   config.vm.network :forwarded_port, guest: 9401, host: ENV.fetch("PFB_TILEGARDEN_DEBUG_PORT", 9401)

   config.vm.synced_folder "~/.aws", "/home/vagrant/.aws"
-  config.vm.synced_folder '.', ROOT_VM_DIR, type: PFB_SHARED_FOLDER_TYPE, mount_options: PFB_MOUNT_OPTIONS
+  config.vm.synced_folder '.', ROOT_VM_DIR

   config.vm.provision "shell" do |s|
     s.path = 'deployment/vagrant/cd_shared_folder.sh'

This isn't something to address in this PR, just something to be aware of.

@colekettler
Copy link
Contributor Author

You were able to provision without the Docker Engine version bump? That failed for me after a vagrant destroy and ./scripts/setup. The oldest version of docker-ce available in the download.docker.com/linux/ubuntu repo is 17.03, since 1.12 went EOL in late 2017.

TASK [azavea.docker : Download Docker APT key] *********************************
changed: [default] => {"changed": true}

TASK [azavea.docker : Configure the Docker APT repository] *********************
changed: [default] => {"changed": true, "repo": "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable", "state": "present"}

TASK [azavea.docker : Install Docker] ******************************************
fatal: [default]: FAILED! => {"cache_update_time": 1585154948, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"      install 'docker-ce=1.12.*'' failed: E: Version '1.12.*' for 'docker-ce' was not found\n", "rc": 100, "stderr": "E: Version '1.12.*' for 'docker-ce' was not found\n", "stderr_lines": ["E: Version '1.12.*' for 'docker-ce' was not found"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information..."]}

I agree that the Compose version bump isn't necessary. I'm marginally more concerned about the implications of running a significantly older Compose version with a new Engine version than the compatibility between a new Compose version and an older Compose file format, since Docker Compose hasn't formally deprecated or dropped support for any Compose file versions thus far (would be declared here). Development only and not something I feel strongly about though, your call!

Copy link
Contributor

@rbreslow rbreslow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@colekettler
Copy link
Contributor Author

I created azavea/ansible-docker#17 to track upgrading the default Docker version to 18.* in the Ansible role we use to install Docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants