ansible / ansible-container

DEPRECATED -- Ansible Container was a tool to build Docker images and orchestrate containers using only Ansible playbooks.
GNU Lesser General Public License v3.0
2.19k stars 392 forks source link

Ansible Container is terminated once the run is completed #830

Open Manigunner opened 6 years ago

Manigunner commented 6 years ago
container.yml
settings:
  conductor_base: centos:7
services:
  ansible.play_container:
    from: "fabric8/java-centos-openjdk8-jdk:1.3.1"
  build:
    context: .
    args:
        - http_proxy
        - https_proxy
        - no_proxy
    roles:
    - play_container
    ports:
    -  "9000:9000"
    user: root
    name: Runnung the .sh script
    command: chdir=/app/test/play sh docker-entrypoint.sh
    args:
      chdir:/app/test/play/
    entrypoint: ["/app/test/play/docker-entrypoint.sh","-Dfile.config=/app/test/play/servers/server01/play/conf/override.conf","-DLOG_HOME=/app/log/nflott/play","-DSKIP_LOGFILE=true", "-DLOG_ENV=dev"]
OS / ENVIRONMENT
Ansible Container, version 0.9.2
Linux, test.test.com, 3.10.0-327.13.1.el7.x86_64, #1 SMP Mon Feb 29 13:22:02 EST 2016, x86_64
2.7.5 (default, May 3 2017, 07:55:04)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-14)] /usr/bin/python

"ContainersPaused": 0,
"Labels": null,
"CgroupDriver": "cgroupfs",
"ContainersRunning": 0,
"ContainerdCommit": {
"Expected": "03e5862ec0d8d3b3f750e19fca3ee367e13c090e",
"ID": "03e5862ec0d8d3b3f750e19fca3ee367e13c090e"
},
"InitBinary": "docker-init",
"NGoroutines": 24,
"Swarm": {
"Managers": 0,
"ControlAvailable": false,
"NodeID": "",
"Cluster": {
"Spec": {
"TaskDefaults": {},
"Orchestration": {},
"EncryptionConfig": {
"AutoLockManagers": false
},
"Raft": {
"HeartbeatTick": 0,
"ElectionTick": 0
},
"CAConfig": {},
"Dispatcher": {}
},
"Version": {},
"ID": "",
"CreatedAt": "0001-01-01T00:00:00Z",
"UpdatedAt": "0001-01-01T00:00:00Z"
},
"Nodes": 0,
"Error": "",
"RemoteManagers": null,
"LocalNodeState": "inactive",
"NodeAddr": ""
},
"LoggingDriver": "journald",
"OSType": "linux",
"HttpProxy": "",
"Runtimes": {
"runc": {
"path": "docker-runc"
}
},
"DriverStatus": [
[
"Backing Filesystem",
"extfs"
],
[
"Supports d_type",
"true"
]
],
"OperatingSystem": "Red Hat Enterprise Linux Server 7.2 (Maipo)",
"Containers": 185,
"HttpsProxy": "",
"BridgeNfIp6tables": false,
"MemTotal": 8203485184,
"SecurityOptions": [
"name=seccomp,profile=default"
],
"Driver": "overlay",
"IndexServerAddress": "https://index.docker.io/v1/",
"ClusterStore": "",
"InitCommit": {
"Expected": "949e6fa",
"ID": "949e6fa"
},
"Isolation": "",
"SystemStatus": null,
"OomKillDisable": true,
"ClusterAdvertise": "",
"SystemTime": "2017-12-12T14:52:38.635530941Z",
"Name": "dtest.com",
"CPUSet": true,
"RegistryConfig": {
"InsecureRegistryCIDRs": [
"127.0.0.0/8"
],
"IndexConfigs": {
"docker.io": {
"Official": true,
"Name": "docker.io",
"Secure": true,
"Mirrors": null
},
"nexus.ops.test.com:5443": {
"Official": false,
"Name": "nexus.ops.test.com:5443",
"Secure": false,
"Mirrors": []
},
"nexus.ops.test.com:5000": {
"Official": false,
"Name": "nexus.ops.test.com:5000",
"Secure": false,
"Mirrors": []
}
},
"Mirrors": []
},
"DefaultRuntime": "runc",
"ContainersStopped": 185,
"NCPU": 4,
"NFd": 17,
"Architecture": "x86_64",
"KernelMemory": true,
"CpuCfsQuota": true,
"Debug": false,
"ID": "KBBZ:ODFS:K55U:7EUJ:DSRA:XPRS:AMJK:NNCI:V3QK:DWCD:WTYQ:B4ZI",
"IPv4Forwarding": true,
"KernelVersion": "3.10.0-327.13.1.el7.x86_64",
"BridgeNfIptables": false,
"NoProxy": "",
"LiveRestoreEnabled": false,
"ServerVersion": "1.13.0",
"CpuCfsPeriod": true,
"ExperimentalBuild": false,
"MemoryLimit": true,
"SwapLimit": true,
"Plugins": {
"Volume": [
"local"
],
"Network": [
"bridge",
"host",
"macvlan",
"null",
"overlay"
],
"Authorization": null
},
"Images": 151,
"DockerRootDir": "/app/docker-data",
"NEventsListener": 0,
"CPUShares": true,
"RuncCommit": {
"Expected": "2f7393a47307a16f8cee44a37b262e8b81021e3e",
"ID": "2f7393a47307a16f8cee44a37b262e8b81021e3e"
}
}
{
"KernelVersion": "3.10.0-327.13.1.el7.x86_64",
"Arch": "amd64",
"BuildTime": "2017-01-17T09:55:28.732707040+00:00",
"ApiVersion": "1.25",
"Version": "1.13.0",
"MinAPIVersion": "1.12",
"GitCommit": "49bf474",
"Os": "linux",
"GoVersion": "go1.7.3"
SUMMARY

I have build my play container image successfully using ansible-container build. While trying to launch the container using ansible-container run its terminated at the last

STEPS TO REPRODUCE

Sudo ansible-container --debug run

EXPECTED RESULTS

Conductor should be up and running

ACTUAL RESULTS
[mt801t@d1xvoaxa0027 ansible_container_dotcom]$ sudo ansible-container --debug run
2017-12-13T13:27:20.594429 Got extra args to `run` command [container.core] arguments={'with_volumes': [], 'vault_password_file': None, 'service': [], 'with_variables': [], 'selinux': True, 'subcommand': 'run', 'devel': False, 'roles_path': [], 'volume_driver': None, 'production': False, 'debug': True, 'detached': False, 'vault_files': []} caller_file=/usr/lib/python2.7/site-packages/container/core.py caller_func=hostcmd_run caller_line=238
/usr/lib64/python2.7/site-packages/ruamel/yaml/constructor.py:262: DuplicateKeyFutureWarning: while constructing a mapping
  in "/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom/container.yml", line 8, column 5
found duplicate key "args" with value "chdir:/app/nflott/play/" (original value: "[]")
  in "/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom/container.yml", line 20, column 5

To suppress this check see:
    http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys

Duplicate keys will become and error in future releases, and are errors
by default when using the new API.

  warnings.warn(DuplicateKeyFutureWarning(*args))
2017-12-13T13:27:20.622532 The default type is            [container.config] caller_file=/usr/lib/python2.7/site-packages/container/config.py caller_func=_resolve_defaults caller_line=189 config=<class 'ruamel.yaml.comments.CommentedMap'> defaults=<type '_ordereddict.ordereddict'>
2017-12-13T13:27:20.624094 Getting environment variables... [container.config] caller_file=/usr/lib/python2.7/site-packages/container/config.py caller_func=_get_environment_variables caller_line=205
2017-12-13T13:27:20.625589 Read environment variables     [container.config] caller_file=/usr/lib/python2.7/site-packages/container/config.py caller_func=_get_environment_variables caller_line=210 env_vars={}
2017-12-13T13:27:20.626971 Resolved template variables    [container.config] caller_file=/usr/lib/python2.7/site-packages/container/config.py caller_func=_resolve_defaults caller_line=194 template_vars={}
2017-12-13T13:27:20.628331 Parsed config                  [container.config] caller_file=/usr/lib/python2.7/site-packages/container/config.py caller_func=set_env caller_line=148 config={"version": "2", "settings": {"conductor_base": "centos:7", "pwd": "/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom"}, "services": {"ansible.play_container": {"from": "fabric8/java-centos-openjdk8-jdk:1.3.1"}, "build": {"context": ".", "args": "chdir:/app/nflott/play/", "roles": ["play_container"], "ports": ["9000:9000"], "user": "root", "name": "Runnung the .sh script", "command": "chdir=/app/nflott/play sh docker-entrypoint.sh", "entrypoint": ["/app/nflott/play/docker-entrypoint.sh", "-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf", "-DLOG_HOME=/app/log/nflott/play", "-DSKIP_LOGFILE=true", "-DLOG_ENV=dev"]}}, "registries": {}, "defaults": {}}
2017-12-13T13:27:20.652468 The default type is            [container.config] caller_file=/usr/lib/python2.7/site-packages/container/config.py caller_func=_resolve_defaults caller_line=189 config=<class 'ruamel.yaml.comments.CommentedMap'> defaults=<type '_ordereddict.ordereddict'>
2017-12-13T13:27:20.653869 Getting environment variables... [container.config] caller_file=/usr/lib/python2.7/site-packages/container/config.py caller_func=_get_environment_variables caller_line=205
2017-12-13T13:27:20.655149 Read environment variables     [container.config] caller_file=/usr/lib/python2.7/site-packages/container/config.py caller_func=_get_environment_variables caller_line=210 env_vars={}
2017-12-13T13:27:20.656334 Resolved template variables    [container.config] caller_file=/usr/lib/python2.7/site-packages/container/config.py caller_func=_resolve_defaults caller_line=194 template_vars={}
2017-12-13T13:27:20.657498 Parsed config                  [container.config] caller_file=/usr/lib/python2.7/site-packages/container/config.py caller_func=set_env caller_line=148 config={"version": "2", "settings": {"conductor_base": "centos:7", "pwd": "/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom"}, "services": {"ansible.play_container": {"from": "fabric8/java-centos-openjdk8-jdk:1.3.1"}, "build": {"context": ".", "args": "chdir:/app/nflott/play/", "roles": ["play_container"], "ports": ["9000:9000"], "user": "root", "name": "Runnung the .sh script", "command": "chdir=/app/nflott/play sh docker-entrypoint.sh", "entrypoint": ["/app/nflott/play/docker-entrypoint.sh", "-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf", "-DLOG_HOME=/app/log/nflott/play", "-DSKIP_LOGFILE=true", "-DLOG_ENV=dev"]}}, "registries": {}, "defaults": {}}
2017-12-13T13:27:20.658546 hostcmd_run configuration      [container.core] caller_file=/usr/lib/python2.7/site-packages/container/core.py caller_func=hostcmd_run caller_line=243 config={'_config': ordereddict([('version', '2'), ('settings', ordereddict([('conductor_base', 'centos:7'), ('pwd', '/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom')])), ('services', ordereddict([('ansible.play_container', ordereddict([('from', 'fabric8/java-centos-openjdk8-jdk:1.3.1')])), ('build', ordereddict([('context', '.'), ('args', 'chdir:/app/nflott/play/'), ('roles', ['play_container']), ('ports', ['9000:9000']), ('user', 'root'), ('name', 'Runnung the .sh script'), ('command', 'chdir=/app/nflott/play sh docker-entrypoint.sh'), ('entrypoint', ['/app/nflott/play/docker-entrypoint.sh', '-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf', '-DLOG_HOME=/app/log/nflott/play', '-DSKIP_LOGFILE=true', '-DLOG_ENV=dev'])]))])), ('registries', ordereddict([])), ('defaults', ordereddict([]))]), 'config_path': '/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom/container.yml', 'engine_name': 'docker', 'base_path': '/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom', 'cli_vault_files': None, 'remove_engines': set(['k8s', 'openshift']), 'cli_vars_files': [], 'cli_project_name': None}
2017-12-13T13:27:20.659850 Loading engine capabilities    [container.utils.loader] caller_file=/usr/lib/python2.7/site-packages/container/utils/loader.py caller_func=load_engine caller_line=14 capabilities=['RUN'] engine=docker
2017-12-13T13:27:20.693457 Setting Docker client timeout to 60 [container.docker.engine] caller_file=/usr/lib/python2.7/site-packages/container/docker/engine.py caller_func=get_timeout caller_line=122
2017-12-13T13:27:20.723289 Could not find container for conductor [container.docker.engine] all_containers=[] caller_file=/usr/lib/python2.7/site-packages/container/docker/engine.py caller_func=get_container_id_for_service caller_line=531 container=u'ansible_container_dotcom_conductor'
2017-12-13T13:27:20.727011 Params passed to conductor for run [container.core] caller_file=/usr/lib/python2.7/site-packages/container/core.py caller_func=hostcmd_run caller_line=260 params={'selinux': True, 'subcommand': 'run', 'devel': False, 'debug': True, 'volume_driver': None, 'roles_path': [], 'with_volumes': [], 'service': [], 'vault_password_file': None, 'settings': ordereddict([('conductor_base', 'centos:7'), ('pwd', '/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom')]), 'with_variables': [], 'deployment_output_path': '/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom/ansible-deployment', 'production': False, 'host_user_uid': 0, 'host_user_gid': 0, 'detached': False, 'vault_files': []}
2017-12-13T13:27:20.728713 Call: Engine.run_conductor     [container.docker.engine] args=('run', {'services': ordereddict([('ansible.play_container', ordereddict([('from', 'fabric8/java-centos-openjdk8-jdk:1.3.1')])), ('build', ordereddict([('context', '.'), ('args', 'chdir:/app/nflott/play/'), ('roles', ['play_container']), ('ports', ['9000:9000']), ('user', 'root'), ('name', 'Runnung the .sh script'), ('command', 'chdir=/app/nflott/play sh docker-entrypoint.sh'), ('entrypoint', ['/app/nflott/play/docker-entrypoint.sh', '-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf', '-DLOG_HOME=/app/log/nflott/play', '-DSKIP_LOGFILE=true', '-DLOG_ENV=dev'])]))]), 'version': '2', 'registries': ordereddict([]), 'defaults': ordereddict([]), 'settings': ordereddict([('conductor_base', 'centos:7'), ('pwd', '/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom')])}, '/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom', {'selinux': True, 'subcommand': 'run', 'devel': False, 'debug': True, 'volume_driver': None, 'roles_path': [], 'with_volumes': [], 'service': [], 'vault_password_file': None, 'settings': ordereddict([('conductor_base', 'centos:7'), ('pwd', '/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom')]), 'with_variables': [], 'deployment_output_path': '/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom/ansible-deployment', 'production': False, 'host_user_uid': 0, 'host_user_gid': 0, 'detached': False, 'vault_files': []}) caller_file=/usr/lib/python2.7/site-packages/container/docker/engine.py caller_func=Engine.run_conductor caller_line=23 kwargs={}
2017-12-13T13:27:20.802299 Docker run:                    [container.docker.engine] caller_file=/usr/lib/python2.7/site-packages/container/docker/engine.py caller_func=run_conductor caller_line=435 image=u'sha256:41df66ff4fc93869d454434e197cd2b25e01d362ec3e771b024f8869f61869c8' params={'name': u'ansible_container_dotcom_conductor', 'cap_add': ['SYS_ADMIN'], 'environment': {'DOCKER_HOST': 'unix:///var/run/docker.sock', 'ANSIBLE_ROLES_PATH': '/src/roles:/etc/ansible/roles'}, 'working_dir': '/src', 'command': ['conductor', 'run', '--project-name', 'ansible_container_dotcom', '--engine', 'docker', '--params', u'eyJzZWxpbnV4IjogdHJ1ZSwgInN1YmNvbW1hbmQiOiAicnVuIiwgImRldmVsIjogZmFsc2UsICJkZWJ1ZyI6IHRydWUsICJ2b2x1bWVfZHJpdmVyIjogbnVsbCwgInJvbGVzX3BhdGgiOiBbXSwgIndpdGhfdm9sdW1lcyI6IFtdLCAic2VydmljZSI6IFtdLCAidmF1bHRfcGFzc3dvcmRfZmlsZSI6IG51bGwsICJzZXR0aW5ncyI6IHsiY29uZHVjdG9yX2Jhc2UiOiAiY2VudG9zOjciLCAicHdkIjogIi9ob21lL210ODAxdC9hbnNpY29ucGxheS9hbnNpYmxlLWNvbnRhaW5lcnMvYW5zaWJsZV9jb250YWluZXJfZG90Y29tIn0sICJ3aXRoX3ZhcmlhYmxlcyI6IFtdLCAiZGVwbG95bWVudF9vdXRwdXRfcGF0aCI6ICIvaG9tZS9tdDgwMXQvYW5zaWNvbnBsYXkvYW5zaWJsZS1jb250YWluZXJzL2Fuc2libGVfY29udGFpbmVyX2RvdGNvbS9hbnNpYmxlLWRlcGxveW1lbnQiLCAicHJvZHVjdGlvbiI6IGZhbHNlLCAiaG9zdF91c2VyX3VpZCI6IDAsICJob3N0X3VzZXJfZ2lkIjogMCwgImRldGFjaGVkIjogZmFsc2UsICJ2YXVsdF9maWxlcyI6IFtdfQ==', '--config', u'eyJzZXJ2aWNlcyI6IFtbImFuc2libGUucGxheV9jb250YWluZXIiLCB7ImZyb20iOiAiZmFicmljOC9qYXZhLWNlbnRvcy1vcGVuamRrOC1qZGs6MS4zLjEifV0sIFsiYnVpbGQiLCB7ImNvbnRleHQiOiAiLiIsICJhcmdzIjogImNoZGlyOi9hcHAvbmZsb3R0L3BsYXkvIiwgInJvbGVzIjogWyJwbGF5X2NvbnRhaW5lciJdLCAicG9ydHMiOiBbIjkwMDA6OTAwMCJdLCAidXNlciI6ICJyb290IiwgIm5hbWUiOiAiUnVubnVuZyB0aGUgLnNoIHNjcmlwdCIsICJjb21tYW5kIjogImNoZGlyPS9hcHAvbmZsb3R0L3BsYXkgc2ggZG9ja2VyLWVudHJ5cG9pbnQuc2giLCAiZW50cnlwb2ludCI6IFsiL2FwcC9uZmxvdHQvcGxheS9kb2NrZXItZW50cnlwb2ludC5zaCIsICItRGZpbGUuY29uZmlnPS9hcHAvbmZsb3R0L3BsYXkvc2VydmVycy9zZXJ2ZXIwMS9wbGF5L2NvbmYvb3ZlcnJpZGUuY29uZiIsICItRExPR19IT01FPS9hcHAvbG9nL25mbG90dC9wbGF5IiwgIi1EU0tJUF9MT0dGSUxFPXRydWUiLCAiLURMT0dfRU5WPWRldiJdfV1dLCAic2V0dGluZ3MiOiBbWyJjb25kdWN0b3JfYmFzZSIsICJjZW50b3M6NyJdLCBbInB3ZCIsICIvaG9tZS9tdDgwMXQvYW5zaWNvbnBsYXkvYW5zaWJsZS1jb250YWluZXJzL2Fuc2libGVfY29udGFpbmVyX2RvdGNvbSJdXSwgInZlcnNpb24iOiAiMiIsICJkZWZhdWx0cyI6IFtdLCAicmVnaXN0cmllcyI6IFtdfQ==', '--encoding', 'b64json'], 'user': 'root', 'volumes': {'/var/run/docker.sock': {'bind': '/var/run/docker.sock', 'mode': 'rw'}, 'ansible_container_dotcom_secrets': {'bind': '/run/secrets', 'mode': 'rw'}, '/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom': {'bind': '/src', 'mode': 'ro'}, '/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom/ansible-deployment': {'bind': '/home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom/ansible-deployment', 'mode': 'rw'}}, 'detach': True, 'privileged': True}
Parsing conductor CLI args.
2017-12-13T13:27:26.742219 Processing defaults section... [container.config] caller_file=/_ansible/container/config.py caller_func=_process_defaults caller_line=384
2017-12-13T13:27:26.745817 Processing section...          [container.config] caller_file=/_ansible/container/config.py caller_func=_process_top_level_sections caller_line=393 section=volumes
2017-12-13T13:27:26.749704 Processing section...          [container.config] caller_file=/_ansible/container/config.py caller_func=_process_top_level_sections caller_line=393 section=registries
2017-12-13T13:27:26.753289 Processing section...          [container.config] caller_file=/_ansible/container/config.py caller_func=_process_top_level_sections caller_line=393 section=secrets
2017-12-13T13:27:26.757096 Processing service...          [container.config] caller_file=/_ansible/container/config.py caller_func=_process_services caller_line=399 service=u'ansible.play_container' service_data={u'from': u'fabric8/java-centos-openjdk8-jdk:1.3.1'}
2017-12-13T13:27:26.761335 Rendering service keys from defaults [container.config] caller_file=/_ansible/container/config.py caller_func=_process_services caller_line=422 defaults={} service=u'ansible.play_container'
2017-12-13T13:27:26.765754 Processing service...          [container.config] caller_file=/_ansible/container/config.py caller_func=_process_services caller_line=399 service=u'build' service_data={u'name': u'Runnung the .sh script', u'roles': [u'play_container'], u'args': u'chdir:/app/nflott/play/', u'command': u'chdir=/app/nflott/play sh docker-entrypoint.sh', u'user': u'root', u'context': u'.', u'entrypoint': [u'/app/nflott/play/docker-entrypoint.sh', u'-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf', u'-DLOG_HOME=/app/log/nflott/play', u'-DSKIP_LOGFILE=true', u'-DLOG_ENV=dev'], u'ports': [u'9000:9000']}
2017-12-13T13:27:26.780267 Rendering service keys from defaults [container.config] caller_file=/_ansible/container/config.py caller_func=_process_services caller_line=422 defaults={} service=u'build'
2017-12-13T13:27:26.792578 Starting Ansible Container Conductor: run [container.cli] caller_file=/_ansible/container/cli.py caller_func=conductor_commandline caller_line=398 services={"ansible.play_container": {"from": "fabric8/java-centos-openjdk8-jdk:1.3.1", "defaults": {}}, "build": {"from": "centos:7", "ports": ["9000:9000"], "user": "root", "command": "chdir=/app/nflott/play sh docker-entrypoint.sh", "name": "Runnung the .sh script", "roles": ["play_container"], "args": "chdir:/app/nflott/play/", "context": ".", "entrypoint": ["/app/nflott/play/docker-entrypoint.sh", "-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf", "-DLOG_HOME=/app/log/nflott/play", "-DSKIP_LOGFILE=true", "-DLOG_ENV=dev"], "defaults": {}}}
2017-12-13T13:27:26.797675 Loading engine capabilities    [container.utils.loader] caller_file=/_ansible/container/utils/loader.py caller_func=load_engine caller_line=14 capabilities=['RUN'] engine=docker
2017-12-13T13:27:26.829260 Engine integration loaded. Preparing run. [container.core] caller_file=/_ansible/container/core.py caller_func=conductorcmd_run caller_line=864 engine=u'Docker\u2122 daemon'
2017-12-13T13:27:26.841762 Verifying service image        [container.docker.engine] caller_file=/_ansible/container/docker/engine.py caller_func=containers_built_for_services caller_line=592 service=u'build'
2017-12-13T13:27:26.845860 Setting Docker client timeout to 60 [container.docker.engine] caller_file=/_ansible/container/docker/engine.py caller_func=get_timeout caller_line=123
2017-12-13T13:27:26.869648 Adding new service to definition [container.docker.engine] caller_file=/_ansible/container/docker/engine.py caller_func=generate_orchestration_playbook caller_line=764 definition={u'image': u'fabric8/java-centos-openjdk8-jdk:1.3.1'} service=u'ansible.play_container'
2017-12-13T13:27:26.881744 Adding new service to definition [container.docker.engine] caller_file=/_ansible/container/docker/engine.py caller_func=generate_orchestration_playbook caller_line=764 definition={'entrypoint': ['/app/nflott/play/docker-entrypoint.sh', '-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf', '-DLOG_HOME=/app/log/nflott/play', '-DSKIP_LOGFILE=true', '-DLOG_ENV=dev'], u'image': u'ansible_container_dotcom-build:20171213121637', 'command': u'chdir=/app/nflott/play sh docker-entrypoint.sh', 'ports': ['9000:9000'], 'user': u'root'} service=u'build'
2017-12-13T13:27:26.980791 Found image for service        [container.docker.engine] caller_file=/_ansible/container/docker/engine.py caller_func=generate_orchestration_playbook caller_line=819 id=u'sha256:78878ff494' tags=[u'fabric8/java-centos-openjdk8-jdk:1.3.1', u'p0xvoaxa0001.test.com:5000/fabric8/java-centos-openjdk8-jdk:latest']
2017-12-13T13:27:26.985202 Adding task to destroy image   [container.docker.engine] caller_file=/_ansible/container/docker/engine.py caller_func=generate_orchestration_playbook caller_line=821 tag=u'fabric8/java-centos-openjdk8-jdk:1.3.1'
2017-12-13T13:27:26.989035 Adding task to destroy image   [container.docker.engine] caller_file=/_ansible/container/docker/engine.py caller_func=generate_orchestration_playbook caller_line=821 tag=u'p0xvoaxa0001.test.com:5000/fabric8/java-centos-openjdk8-jdk:latest'
2017-12-13T13:27:27.147052 Found image for service        [container.docker.engine] caller_file=/_ansible/container/docker/engine.py caller_func=generate_orchestration_playbook caller_line=819 id=u'sha256:0825420da5' tags=[u'ansible_container_dotcom-build:20171213121637', u'ansible_container_dotcom-build:latest']
2017-12-13T13:27:27.152980 Adding task to destroy image   [container.docker.engine] caller_file=/_ansible/container/docker/engine.py caller_func=generate_orchestration_playbook caller_line=821 tag=u'ansible_container_dotcom-build:20171213121637'
2017-12-13T13:27:27.161055 Adding task to destroy image   [container.docker.engine] caller_file=/_ansible/container/docker/engine.py caller_func=generate_orchestration_playbook caller_line=821 tag=u'ansible_container_dotcom-build:latest'
2017-12-13T13:27:27.267039 Found image for service        [container.docker.engine] caller_file=/_ansible/container/docker/engine.py caller_func=generate_orchestration_playbook caller_line=819 id=u'sha256:41df66ff4f' tags=[u'ansible_container_dotcom-conductor:latest']
2017-12-13T13:27:27.271365 Adding task to destroy image   [container.docker.engine] caller_file=/_ansible/container/docker/engine.py caller_func=generate_orchestration_playbook caller_line=821 tag=u'ansible_container_dotcom-conductor:latest'
2017-12-13T13:27:27.275026 Created playbook to run project [container.docker.engine] caller_file=/_ansible/container/docker/engine.py caller_func=generate_orchestration_playbook caller_line=834 playbook=[ordereddict([(u'name', 'Deploy ansible_container_dotcom'), (u'hosts', u'localhost'), (u'gather_facts', False), (u'tasks', [{u'docker_service': {u'definition': {u'services': {u'build': {'entrypoint': ['/app/nflott/play/docker-entrypoint.sh', '-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf', '-DLOG_HOME=/app/log/nflott/play', '-DSKIP_LOGFILE=true', '-DLOG_ENV=dev'], u'image': u'ansible_container_dotcom-build:20171213121637', 'command': u'chdir=/app/nflott/play sh docker-entrypoint.sh', 'ports': ['9000:9000'], 'user': u'root'}, u'ansible.play_container': {u'image': u'fabric8/java-centos-openjdk8-jdk:1.3.1'}}, u'version': u'2'}, u'state': u'present', u'project_name': 'ansible_container_dotcom'}, u'tags': ['start']}, {u'docker_service': {u'definition': {u'services': {u'build': {'entrypoint': ['/app/nflott/play/docker-entrypoint.sh', '-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf', '-DLOG_HOME=/app/log/nflott/play', '-DSKIP_LOGFILE=true', '-DLOG_ENV=dev'], u'image': u'ansible_container_dotcom-build:20171213121637', 'command': u'chdir=/app/nflott/play sh docker-entrypoint.sh', 'ports': ['9000:9000'], 'user': u'root'}, u'ansible.play_container': {u'image': u'fabric8/java-centos-openjdk8-jdk:1.3.1'}}, u'version': u'2'}, u'state': u'present', u'project_name': 'ansible_container_dotcom', u'restarted': True}, u'tags': ['restart']}, {u'docker_service': {u'definition': {u'services': {u'build': {'entrypoint': ['/app/nflott/play/docker-entrypoint.sh', '-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf', '-DLOG_HOME=/app/log/nflott/play', '-DSKIP_LOGFILE=true', '-DLOG_ENV=dev'], u'image': u'ansible_container_dotcom-build:20171213121637', 'command': u'chdir=/app/nflott/play sh docker-entrypoint.sh', 'ports': ['9000:9000'], 'user': u'root'}, u'ansible.play_container': {u'image': u'fabric8/java-centos-openjdk8-jdk:1.3.1'}}, u'version': u'2'}, u'state': u'present', u'project_name': 'ansible_container_dotcom', u'stopped': True}, u'tags': ['stop']}, {u'docker_service': {u'definition': {u'services': {u'build': {'entrypoint': ['/app/nflott/play/docker-entrypoint.sh', '-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf', '-DLOG_HOME=/app/log/nflott/play', '-DSKIP_LOGFILE=true', '-DLOG_ENV=dev'], u'image': u'ansible_container_dotcom-build:20171213121637', 'command': u'chdir=/app/nflott/play sh docker-entrypoint.sh', 'ports': ['9000:9000'], 'user': u'root'}, u'ansible.play_container': {u'image': u'fabric8/java-centos-openjdk8-jdk:1.3.1'}}, u'version': u'2'}, u'state': u'absent', u'project_name': 'ansible_container_dotcom', u'remove_volumes': u'yes'}, u'tags': ['destroy']}, {u'docker_image': {u'state': u'absent', u'force': u'yes', u'name': u'fabric8/java-centos-openjdk8-jdk:1.3.1'}, u'tags': u'destroy'}, {u'docker_image': {u'state': u'absent', u'force': u'yes', u'name': u'p0xvoaxa0001.test.com:5000/fabric8/java-centos-openjdk8-jdk:latest'}, u'tags': u'destroy'}, {u'docker_image': {u'state': u'absent', u'force': u'yes', u'name': u'ansible_container_dotcom-build:20171213121637'}, u'tags': u'destroy'}, {u'docker_image': {u'state': u'absent', u'force': u'yes', u'name': u'ansible_container_dotcom-build:latest'}, u'tags': u'destroy'}, {u'docker_image': {u'state': u'absent', u'force': u'yes', u'name': u'ansible_container_dotcom-conductor:latest'}, u'tags': u'destroy'}])])]
2017-12-13T13:27:27.285275 writing playbook to /home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom/ansible-deployment/playbook.yml [container.core] caller_file=/_ansible/container/core.py caller_func=run_playbook caller_line=570
2017-12-13T13:27:27.288537 playbook                       [container.core] caller_file=/_ansible/container/core.py caller_func=run_playbook caller_line=571 playbook=[ordereddict([(u'name', 'Deploy ansible_container_dotcom'), (u'hosts', u'localhost'), (u'gather_facts', False), (u'tasks', [{u'docker_service': {u'definition': {u'services': {u'build': {'entrypoint': ['/app/nflott/play/docker-entrypoint.sh', '-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf', '-DLOG_HOME=/app/log/nflott/play', '-DSKIP_LOGFILE=true', '-DLOG_ENV=dev'], u'image': u'ansible_container_dotcom-build:20171213121637', 'command': u'chdir=/app/nflott/play sh docker-entrypoint.sh', 'ports': ['9000:9000'], 'user': u'root'}, u'ansible.play_container': {u'image': u'fabric8/java-centos-openjdk8-jdk:1.3.1'}}, u'version': u'2'}, u'state': u'present', u'project_name': 'ansible_container_dotcom'}, u'tags': ['start']}, {u'docker_service': {u'definition': {u'services': {u'build': {'entrypoint': ['/app/nflott/play/docker-entrypoint.sh', '-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf', '-DLOG_HOME=/app/log/nflott/play', '-DSKIP_LOGFILE=true', '-DLOG_ENV=dev'], u'image': u'ansible_container_dotcom-build:20171213121637', 'command': u'chdir=/app/nflott/play sh docker-entrypoint.sh', 'ports': ['9000:9000'], 'user': u'root'}, u'ansible.play_container': {u'image': u'fabric8/java-centos-openjdk8-jdk:1.3.1'}}, u'version': u'2'}, u'state': u'present', u'project_name': 'ansible_container_dotcom', u'restarted': True}, u'tags': ['restart']}, {u'docker_service': {u'definition': {u'services': {u'build': {'entrypoint': ['/app/nflott/play/docker-entrypoint.sh', '-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf', '-DLOG_HOME=/app/log/nflott/play', '-DSKIP_LOGFILE=true', '-DLOG_ENV=dev'], u'image': u'ansible_container_dotcom-build:20171213121637', 'command': u'chdir=/app/nflott/play sh docker-entrypoint.sh', 'ports': ['9000:9000'], 'user': u'root'}, u'ansible.play_container': {u'image': u'fabric8/java-centos-openjdk8-jdk:1.3.1'}}, u'version': u'2'}, u'state': u'present', u'project_name': 'ansible_container_dotcom', u'stopped': True}, u'tags': ['stop']}, {u'docker_service': {u'definition': {u'services': {u'build': {'entrypoint': ['/app/nflott/play/docker-entrypoint.sh', '-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf', '-DLOG_HOME=/app/log/nflott/play', '-DSKIP_LOGFILE=true', '-DLOG_ENV=dev'], u'image': u'ansible_container_dotcom-build:20171213121637', 'command': u'chdir=/app/nflott/play sh docker-entrypoint.sh', 'ports': ['9000:9000'], 'user': u'root'}, u'ansible.play_container': {u'image': u'fabric8/java-centos-openjdk8-jdk:1.3.1'}}, u'version': u'2'}, u'state': u'absent', u'project_name': 'ansible_container_dotcom', u'remove_volumes': u'yes'}, u'tags': ['destroy']}, {u'docker_image': {u'state': u'absent', u'force': u'yes', u'name': u'fabric8/java-centos-openjdk8-jdk:1.3.1'}, u'tags': u'destroy'}, {u'docker_image': {u'state': u'absent', u'force': u'yes', u'name': u'p0xvoaxa0001.test.com:5000/fabric8/java-centos-openjdk8-jdk:latest'}, u'tags': u'destroy'}, {u'docker_image': {u'state': u'absent', u'force': u'yes', u'name': u'ansible_container_dotcom-build:20171213121637'}, u'tags': u'destroy'}, {u'docker_image': {u'state': u'absent', u'force': u'yes', u'name': u'ansible_container_dotcom-build:latest'}, u'tags': u'destroy'}, {u'docker_image': {u'state': u'absent', u'force': u'yes', u'name': u'ansible_container_dotcom-conductor:latest'}, u'tags': u'destroy'}])])]
2017-12-13T13:27:27.348336 Running Ansible Playbook       [container.core] caller_file=/_ansible/container/core.py caller_func=run_playbook caller_line=640 command=ansible-playbook -vvvv  --tags=start  -i /home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom/ansible-deployment/hosts  -c local /home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom/ansible-deployment/playbook.yml  cwd=/src
ansible-playbook 2.5.0
  config file = /src/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.5 (default, Aug  4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]
Using /src/ansible.cfg as config file
setting up inventory plugins
Parsed /home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom/ansible-deployment/hosts inventory source with ini plugin
Loading callback plugin default of type stdout, v2.0 from /usr/lib/python2.7/site-packages/ansible/plugins/callback/__init__.pyc
PLAYBOOK: playbook.yml *********************************************************
1 plays in /home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom/ansible-deployment/playbook.yml
PLAY [Deploy ansible_container_dotcom] *****************************************
META: ran handlers
TASK [docker_service] **********************************************************
task path: /home/mt801t/ansiconplay/ansible-containers/ansible_container_dotcom/ansible-deployment/playbook.yml:5
Using module file /usr/lib/python2.7/site-packages/ansible/modules/cloud/docker/docker_service.py
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~ && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1513171649.56-23999228454693 `" && echo ansible-tmp-1513171649.56-23999228454693="` echo /root/.ansible/tmp/ansible-tmp-1513171649.56-23999228454693 `" ) && sleep 0'
<127.0.0.1> PUT /tmp/tmpdbnmU5 TO /root/.ansible/tmp/ansible-tmp-1513171649.56-23999228454693/docker_service.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1513171649.56-23999228454693/ /root/.ansible/tmp/ansible-tmp-1513171649.56-23999228454693/docker_service.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1513171649.56-23999228454693/docker_service.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1513171649.56-23999228454693/" > /dev/null 2>&1 && sleep 0'
changed: [localhost] => {
    "ansible_facts": {
        "ansible.play_container": {
            "ansiblecontainerdotcom_ansible.play_container_1": {
                "cmd": [
                    "/deployments/run-java.sh"
                ],
                "image": "fabric8/java-centos-openjdk8-jdk:1.3.1",
                "labels": {
                    "build-date": "20171128",
                    "com.docker.compose.config-hash": "7d96d3aded6e7cabe0823948ce086e7b451f97cbd549a31c9383c62a5878da8f",
                    "com.docker.compose.container-number": "1",
                    "com.docker.compose.oneoff": "False",
                    "com.docker.compose.project": "ansiblecontainerdotcom",
                    "com.docker.compose.service": "ansible.play_container",
                    "com.docker.compose.version": "1.16.1",
                    "license": "GPLv2",
                    "name": "CentOS Base Image",
                    "vendor": "CentOS"
                },
                "networks": {
                    "ansiblecontainerdotcom_default": {
                        "IPAddress": "",
                        "IPPrefixLen": 0,
                        "aliases": [
                            "04201697442d",
                            "ansible.play_container"
                        ],
                        "globalIPv6": "",
                        "globalIPv6PrefixLen": 0,
                        "links": null,
                        "macAddress": ""
                    }
                },
                "state": {
                    "running": false,
                    "status": "exited"
                }
            }
        },
        "build": {
            "1902ecd9ea62_1902ecd9ea62_ansiblecontainerdotcom_build_1": {
                "cmd": [
                    "chdir=/app/nflott/play",
                    "sh",
                    "docker-entrypoint.sh"
                ],
                "image": "ansible_container_dotcom-build:20171213121637",
                "labels": {
                    "build-date": "20170705",
                    "com.ansible.container.fingerprint": "79badcc77f303d8556116b071e6a5de8d6a4c153a63f47dc6c4180888dfe6f50",
                    "com.docker.compose.config-hash": "f7e6b217d992f83efe1d1e79ceba9d8de353e52db4545d9cf5b614121d41e2d6",
                    "com.docker.compose.container-number": "1",
                    "com.docker.compose.oneoff": "False",
                    "com.docker.compose.project": "ansiblecontainerdotcom",
                    "com.docker.compose.service": "build",
                    "com.docker.compose.version": "1.16.1",
                    "license": "GPLv2",
                    "name": "CentOS Base Image",
                    "vendor": "CentOS"
                },
                "networks": {
                    "ansiblecontainerdotcom_default": {
                        "IPAddress": "",
                        "IPPrefixLen": 0,
                        "aliases": [
                            "1902ecd9ea62",
                            "build"
                        ],
                        "globalIPv6": "",
                        "globalIPv6PrefixLen": 0,
                        "links": null,
                        "macAddress": ""
                    }
                },
                "state": {
                    "running": false,
                    "status": "exited"
                }
            }
        }
    },
    "changed": true,
    "invocation": {
        "module_args": {
            "api_version": null,
            "build": false,
            "cacert_path": null,
            "cert_path": null,
            "debug": false,
            "definition": {
                "services": {
                    "ansible.play_container": {
                        "image": "fabric8/java-centos-openjdk8-jdk:1.3.1"
                    },
                    "build": {
                        "command": "chdir=/app/nflott/play sh docker-entrypoint.sh",
                        "entrypoint": [
                            "/app/nflott/play/docker-entrypoint.sh",
                            "-Dfile.config=/app/nflott/play/servers/server01/play/conf/override.conf",
                            "-DLOG_HOME=/app/log/nflott/play",
                            "-DSKIP_LOGFILE=true",
                            "-DLOG_ENV=dev"
                        ],
                        "image": "ansible_container_dotcom-build:20171213121637",
                        "ports": [
                            "9000:9000"
                        ],
                        "user": "root"
                    }
                },
                "version": "2"
            },
            "dependencies": true,
            "docker_host": null,
            "files": null,
            "filter_logger": false,
            "hostname_check": false,
            "key_path": null,
            "nocache": false,
            "project_name": "ansible_container_dotcom",
            "project_src": null,
            "pull": false,
            "recreate": "smart",
            "remove_images": null,
            "remove_orphans": false,
            "remove_volumes": false,
            "restarted": false,
            "scale": null,
            "services": null,
            "ssl_version": null,
            "state": "present",
            "stopped": false,
            "timeout": 10,
            "tls": null,
            "tls_hostname": null,
            "tls_verify": null
        }
    }
}
META: ran handlers
META: ran handlers
PLAY RECAP *********************************************************************
localhost                  : ok=1    changed=1    unreachable=0    failed=0
2017-12-13T13:27:32.156148 All services running.          [container.core] caller_file=/_ansible/container/core.py caller_func=conductorcmd_run caller_line=876 playbook_rc=0
2017-12-13T13:27:32.356271 Conductor terminated. Cleaning up. [container.docker.engine] caller_file=/usr/lib/python2.7/site-packages/container/docker/engine.py caller_func=await_conductor_command caller_line=462 command_rc=0 conductor_id=u'4b72f49604c35f52030b9575921b1c4d22f4eaa68e68583e08377dd790dc4c55' save_container=False

I see the last lines, conductor terminated. While running my application in browser am not seeing it running. Please kindly help to maintain the container running so that i can run and check my application getting launched. TIA

j00bar commented 6 years ago

Did you run docker logs or docker ps to ensure that your container is running, why it might have exited, or what status code it exited with?