{"action":"created","issue":{"url":"https://api.github.com/repos/openmicroscopy/infrastructure/issues/32","labels_url":"https://api.github.com/repos/openmicroscopy/infrastructure/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/openmicroscopy/infrastructure/issues/32/comments","events_url":"https://api.github.com/repos/openmicroscopy/infrastructure/issues/32/events","html_url":"https://github.com/openmicroscopy/infrastructure/pull/32","id":116602646,"number":32,"title":"Replacement docker role","user":{"login":"manics","id":1644105,"avatar_url":"https://avatars.githubusercontent.com/u/1644105?v=3","gravatar_id":"","url":"https://api.github.com/users/manics","html_url":"https://github.com/manics","followers_url":"https://api.github.com/users/manics/followers","following_url":"https://api.github.com/users/manics/following{/other_user}","gists_url":"https://api.github.com/users/manics/gists{/gist_id}","starred_url":"https://api.github.com/users/manics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manics/subscriptions","organizations_url":"https://api.github.com/users/manics/orgs","repos_url":"https://api.github.com/users/manics/repos","events_url":"https://api.github.com/users/manics/events{/privacy}","received_events_url":"https://api.github.com/users/manics/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-11-12T17:44:41Z","updated_at":"2015-11-24T14:16:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openmicroscopy/infrastructure/pulls/32","html_url":"https://github.com/openmicroscopy/infrastructure/pull/32","diff_url":"https://github.com/openmicroscopy/infrastructure/pull/32.diff","patch_url":"https://github.com/openmicroscopy/infrastructure/pull/32.patch"},"body":"This is a new all-in-one docker role, which replaces `docker-storage` and `docker-advanced`.\r\n\r\nI've also renamed the `omero-basedeps` role to `basedeps`.\r\n\r\nExample basic playbook:\r\n```\r\n- hosts: docker\r\n  roles:\r\n  - role: docker\r\n    # Optional:\r\n    docker_use_upstream_repo: True\r\n```\r\nThis will install the upstream docker with the default configuration (uses loopback devices and the default network)\r\n\r\nExample advanced playbook:\r\n```\r\n- hosts: docker-advanced\r\n  roles:\r\n  - role: basedeps\r\n  - role: upgrade-distpackages\r\n  - role: docker\r\n    docker_use_upstream_repo: True\r\n    # Custom LVM storage partitions\r\n    docker_use_custom_storage: True\r\n    docker_vgname: VolGroup00\r\n    docker_poolsize: 20G\r\n    docker_metadatasize: 200M\r\n    docker_basefs: xfs\r\n    docker_volumesize: 10G\r\n    docker_lvfilesystem: xfs\r\n    docker_groupmembers: userx\r\n    # Use the standard docker bridge but use a subset of the IPs for testing\r\n    docker_use_custom_network: True\r\n    docker_bridge_name: docker0\r\n    docker_bridge_ips: 172.17.123.0/24\r\n    # Try a local docker DNS setup\r\n  - role: docker-dns-server\r\n    docker_dns:\r\n      forwarders: 8.8.8.8:53,8.8.4.4:53\r\n      domain: internal\r\n      etcd: etcd1\r\n  - role: docker-dns-client\r\n    docker_dns:\r\n      domain: internal\r\n      etcd: etcd1\r\n```\r\nThis installs upstream docker, configures the docker partitions (for the docker containers, and also `/var/lib/docker`), modifies the network config slightly so only part of the default IP range is used. It also installs a local docker DNS server.\r\n\r\nTesting:\r\n- Check `docker info` matches the configured values\r\n- Check the IP assigned to a container `docker run ...` is within the configured IP range\r\n- This should return the (internal) IPs for running containers `dig \\*.docker.internal @test.hostname  SRV`\r\n\r\n\r\n## Original description PR (for the record):\r\n\r\nI've renamed the old `docker` roles to `docker-advanced` (which requires `docker-storage`), and added a default `docker` role (requires storage sizes to be set, use default docker networking). Also prefixed all(?) docker vars.\r\n\r\nIn theory this should run against the existing servers without making changes, in practice when run in check mode it suggests it may... I'm still investigating.\r\n\r\nIt should be possible to test the `docker` role now on a VM or the new docker server, see roles/docker/README.md"},"comment":{"url":"https://api.github.com/repos/openmicroscopy/infrastructure/issues/comments/159279300","html_url":"https://github.com/openmicroscopy/infrastructure/pull/32#issuecomment-159279300","issue_url":"https://api.github.com/repos/openmicroscopy/infrastructure/issues/32","id":159279300,"user":{"login":"joshmoore","id":88113,"avatar_url":"https://avatars.githubusercontent.com/u/88113?v=3","gravatar_id":"","url":"https://api.github.com/users/joshmoore","html_url":"https://github.com/joshmoore","followers_url":"https://api.github.com/users/joshmoore/followers","following_url":"https://api.github.com/users/joshmoore/following{/other_user}","gists_url":"https://api.github.com/users/joshmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/joshmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshmoore/subscriptions","organizations_url":"https://api.github.com/users/joshmoore/orgs","repos_url":"https://api.github.com/users/joshmoore/repos","events_url":"https://api.github.com/users/joshmoore/events{/privacy}","received_events_url":"https://api.github.com/users/joshmoore/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T14:16:10Z","updated_at":"2015-11-24T14:16:10Z","body":"First run against minke with `--ask-become-pass`:\r\n\r\n```\r\nTASK [docker : include] ********************************************************\r\nincluded: /home/omero/infra/ansible/roles/docker/tasks/advanced-common.yml for minke.openmicroscopy.org\r\n\r\nTASK [docker : storage | setup lvm docker-pool] ********************************\r\nskipping: [minke.openmicroscopy.org]\r\n\r\nTASK [docker : include] ********************************************************\r\nskipping: [minke.openmicroscopy.org]\r\n\r\nTASK [docker : include] ********************************************************\r\nincluded: /home/omero/infra/ansible/roles/docker/tasks/advanced-upstream.yml for minke.openmicroscopy.org\r\n\r\nTASK [docker : upstream docker | configure advanced] ***************************\r\nskipping: [minke.openmicroscopy.org]\r\n\r\nTASK [docker : Check change-time of original docker.service] *******************\r\nok: [minke.openmicroscopy.org]\r\n\r\nTASK [docker : Check change-time of modified docker.service] *******************\r\nok: [minke.openmicroscopy.org]\r\n\r\nTASK [docker : upstream docker | copy systemd file] ****************************\r\nskipping: [minke.openmicroscopy.org]\r\n\r\nTASK [docker : upstream docker | customise systemd file] ***********************\r\nskipping: [minke.openmicroscopy.org]\r\n\r\nTASK [docker : upstream docker | remove custom systemd file] *******************\r\nok: [minke.openmicroscopy.org]\r\n\r\nTASK [docker : include] ********************************************************\r\nincluded: /home/omero/infra/ansible/roles/docker/tasks/docker-common.yml for minke.openmicroscopy.org\r\n\r\nTASK [docker : docker | enable] ************************************************\r\nfatal: [minke.openmicroscopy.org]: FAILED! => {\"changed\": false, \"failed\": true, \"msg\": \"Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.\\n\"}\r\n\r\nPLAY RECAP *********************************************************************\r\nminke.openmicroscopy.org   : ok=10   changed=2    unreachable=0    failed=1\r\n```"}}