This repository was archived by the owner on Mar 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 388
This repository was archived by the owner on Mar 23, 2019. It is now read-only.
Deploy generates playbook with errors #578
Copy link
Copy link
Open
Labels
Description
ISSUE TYPE
- Bug Report
container.yml
version: "2"
settings:
conductor_base: centos:7
services:
web:
ports:
- 80:8000
roles:
- testapp
registries:
my-local-registry:
url: http://docker-host:5000
username: whoever
password: whatever
Where testapp is a very basic django app which only displays a test page.
generated ansible-container.yml
- gather_facts: false
tasks:
- docker_service:
definition:
services: &id001
web:
image: http://docker-host:5000/ansible-container/ansible-container-web
environment:
PYTHONUNBUFFERED: '1'
working_dir: /project
entrypoint:
- python3
- /project/manage.py
command:
- runserver
- 0.0.0.0:8000
ports:
- 80:8000
version: '2'
state: present
project_name: ansible-container
tags:
- start
- docker_service:
definition:
services: *id001
version: '2'
state: present
project_name: ansible-container
restarted: true
tags:
- restart
- docker_service:
definition:
services: *id001
version: '2'
state: present
project_name: ansible-container
stopped: true
tags:
- stop
- docker_service:
definition:
services: *id001
version: '2'
state: absent
project_name: ansible-container
remove_volumes: yes
tags:
- destroy
- docker_image:
state: absent
force: yes
name: ansible-container-web:20170603180431
tags: destroy
- docker_image:
state: absent
force: yes
name: ansible-container-web:latest
tags: destroy
- docker_image:
state: absent
force: yes
name: ansible-container-conductor:latest
tags: destroy
hosts: localhost
SUMMARY
Running deploy with docker engine produces a playbook that contains three simple-to-fix errors.
STEPS TO REPRODUCE
$ ansible-container build
$ ansible-container deploy --push-to my-local-registry --output-path docker-deploy --tag v1
EXPECTED RESULTS
For docker_service the image in the playbook should have this format:
image: docker-host:5000/ansible-container/ansible-container-web:v1
ACTUAL RESULTS
Currently the playbook has:
image: http://docker-host:5000/ansible-container/ansible-container-web
Which causes these errors:
- the protocol:
Error starting project Repository name cannot contain a scheme (http://docker-host:5000/ansible-container/ansible-container-nodes) - the lack of tag:
Error: image ansible-container/ansible-container-nodes:latest not found
Also notice the lack of the "v1" tagged image in the "destroy" process. Executing:
ansible-playbook -i hosts docker-deploy/ansible-container.yml -t destroy
only removed ansible-container-web:latest and ansible-container-web:20170603180431, leaving ansible-container-web:v1 behind.
OS / ENVIRONMENT
Ansible Container, version 0.9.2rc0
Linux, localhost, 4.4.0-79-generic, #100~14.04.1-Ubuntu SMP Fri May 19 18:36:51 UTC 2017, x86_64
3.5.3 (default, May 6 2017, 00:22:52)
[GCC 4.8.4] /home/.../bin/python3.5
{
"InitBinary": "docker-init",
"DriverStatus": [
[
"Root Dir",
"/var/lib/docker/aufs"
],
[
"Backing Filesystem",
"extfs"
],
[
"Dirs",
"29"
],
[
"Dirperm1 Supported",
"true"
]
],
"ClusterAdvertise": "",
"InitCommit": {
"Expected": "949e6fa",
"ID": "949e6fa"
},
"RuncCommit": {
"Expected": "54296cf40ad8143b62dbcaa1d90e520a2136ddfe",
"ID": "54296cf40ad8143b62dbcaa1d90e520a2136ddfe"
},
"Containers": 1,
"Labels": null,
"MemTotal": 6102839296,
"Runtimes": {
"runc": {
"path": "docker-runc"
}
},
"Plugins": {
"Network": [
"bridge",
"host",
"macvlan",
"null",
"overlay"
],
"Volume": [
"local"
],
"Authorization": null
},
"ContainersPaused": 0,
"DefaultRuntime": "runc",
"SystemTime": "2017-06-03T20:26:24.275069044+02:00",
"BridgeNfIptables": true,
"NCPU": 4,
"CpuCfsPeriod": true,
"CPUSet": true,
"IPv4Forwarding": true,
"OomKillDisable": true,
"Architecture": "x86_64",
"SwapLimit": false,
"Images": 14,
"CPUShares": true,
"LoggingDriver": "json-file",
"OperatingSystem": "Ubuntu 14.04.5 LTS",
"NoProxy": "",
"KernelVersion": "4.4.0-79-generic",
"HttpsProxy": "",
"Isolation": "",
"ExperimentalBuild": false,
"BridgeNfIp6tables": true,
"Name": "localhost",
"MemoryLimit": true,
"CgroupDriver": "cgroupfs",
"SystemStatus": null,
"IndexServerAddress": "https://index.docker.io/v1/",
"DockerRootDir": "/var/lib/docker",
"CpuCfsQuota": true,
"SecurityOptions": [
"name=apparmor"
],
"Debug": false,
"HttpProxy": "",
"ID": "WATP:X33H:FWGQ:BAEX:CHVS:L3NA:KXEC:RFCU:B3VN:AANJ:PDDJ:OGLE",
"RegistryConfig": {
"IndexConfigs": {
"docker-host:5000": {
"Secure": false,
"Name": "docker-host:5000",
"Official": false,
"Mirrors": []
},
"docker.io": {
"Secure": true,
"Name": "docker.io",
"Official": true,
"Mirrors": null
}
},
"InsecureRegistryCIDRs": [
"127.0.0.0/8"
],
"Mirrors": []
},
"ContainersStopped": 0,
"ContainersRunning": 1,
"Swarm": {
"Nodes": 0,
"Managers": 0,
"ControlAvailable": false,
"LocalNodeState": "inactive",
"RemoteManagers": null,
"Cluster": {
"Spec": {
"CAConfig": {},
"TaskDefaults": {},
"EncryptionConfig": {
"AutoLockManagers": false
},
"Dispatcher": {},
"Raft": {
"ElectionTick": 0,
"HeartbeatTick": 0
},
"Orchestration": {}
},
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "0001-01-01T00:00:00Z",
"Version": {},
"ID": ""
},
"NodeID": "",
"NodeAddr": "",
"Error": ""
},
"OSType": "linux",
"NGoroutines": 26,
"NFd": 20,
"ServerVersion": "17.03.1-ce",
"ContainerdCommit": {
"Expected": "4ab9917febca54791c5f071a9d1f404867857fcc",
"ID": "4ab9917febca54791c5f071a9d1f404867857fcc"
},
"NEventsListener": 0,
"KernelMemory": true,
"ClusterStore": "",
"Driver": "aufs",
"LiveRestoreEnabled": false
}
{
"GoVersion": "go1.7.5",
"BuildTime": "2017-03-27T17:10:36.401799458+00:00",
"Version": "17.03.1-ce",
"Arch": "amd64",
"Os": "linux",
"GitCommit": "c6d412e",
"ApiVersion": "1.27",
"MinAPIVersion": "1.12",
"KernelVersion": "4.4.0-79-generic"
}