eBayClassifiedsGroup / PanteraS

PanteraS - PaaS - Platform as a Service in a box
GNU General Public License v2.0
199 stars 61 forks source link

Use docker on host #219

Closed kopax closed 5 years ago

kopax commented 8 years ago

I am trying to understand why do we install docker inside PanteraS again. Isn't it possible to use the docker daemon from the host ?

I did it with jenkins by mounting theses volume :

- /var/run/docker.sock:/var/run/docker.sock
- /usr/bin/docker:/usr/bin/docker
- /usr/lib/x86_64-linux-gnu/libapparmor.so.1:/lib/x86_64-linux-gnu/libapparmor.so.1

This way it will be easier to upgrade/downgrade the docker version.

By the way, current installed marathon version can't rollback configuration because of a JS error by.

sielaq commented 8 years ago

Yea we have discussed that here https://github.com/eBayClassifiedsGroup/PanteraS/issues/171, as you remember problem is that different distribution require different additional files to bind. That would require some additional checks, to probe where is docker / what additional libraries are needed . hmm

kopax commented 8 years ago

This could be added as an extra feature.

cookandy commented 8 years ago

I actually tried to map the docker libraries/bin and remove it from PanteraS image, but I still got an error:

mesos-slave stderr | E0629 19:52:10.022145    39 slave.cpp:3252] Failed to update resources for container 537227fd-b020-4b6b-9388-2b889a559dda of executor 'activemq.f3dde0ed-3e32-11e6-b02e-0242d1b97839' running task activemq.f3dde0ed-3e32-11e6-b02e-0242d1b97839 on status update for terminal task, destroying container: Failed to 'docker -H unix:///tmp/docker.sock inspect mesos-91b3a462-272d-4c1a-8190-82c88d58544f-S5.537227fd-b020-4b6b-9388-2b889a559dda': exit status = exited with status 1 stderr = Error: No such image or container: mesos-91b3a462-272d-4c1a-8190-82c88d58544f-S5.537227fd-b020-4b6b-9388-2b889a559dda

Mesos stderr shows:

ABORT: (../../../../../..//tmp/mesos-build/mesos-repo/3rdparty/libprocess/src/subprocess.cpp:322): Failed to os::execvpe on path 'docker': No such file or directory
*** Aborted at 1467230874 (unix time) try "date -d @1467230874" if you are using GNU date ***
PC: @     0x7fda8ab5dc37 (unknown)
*** SIGABRT (@0x26b6) received by PID 9910 (TID 0x7fda815a7700) from PID 9910; stack trace: ***
    @     0x7fda8aeff330 (unknown)
    @     0x7fda8ab5dc37 (unknown)
    @     0x7fda8ab61028 (unknown)
    @           0x41c0bc _Abort()
    @           0x41c0fc _Abort()
    @     0x7fda8cc137fb process::childMain()
    @     0x7fda8cc1564c std::_Function_handler<>::_M_invoke()
    @     0x7fda8cc1358c process::defaultClone()
    @     0x7fda8cc1440b process::subprocess()
    @     0x7fda8c336a4f Docker::run()
    @           0x443091 mesos::internal::docker::DockerExecutorProcess::launchTask()
    @     0x7fda8cbe2451 process::ProcessManager::resume()
    @     0x7fda8cbe2757 _ZNSt6thread5_ImplISt12_Bind_simpleIFSt5_BindIFZN7process14ProcessManager12init_threadsEvEUlRKSt11atomic_boolE_St17reference_wrapperIS6_EEEvEEE6_M_runEv
    @     0x7fda8b6e0a60 (unknown)
    @     0x7fda8aef7184 start_thread
    @     0x7fda8ac2137d (unknown)
W0629 20:07:54.461889  9900 logging.cpp:88] RAW: Received signal SIGTERM from process 13 of user 0; exiting

It's like it can't find docker. When I get into the container I can run docker commands as expected.

Here's what I mapped:

    - "/etc/resolv.conf:/etc/resolv.conf.orig"
    - "/var/spool/marathon/artifacts/store:/var/spool/store"
    - "/var/run/docker.sock:/tmp/docker.sock"
    - "/var/lib/docker:/var/lib/docker"
    - "/sys:/sys"
    - "/tmp/mesos:/tmp/mesos"
    - "/proc:/host/proc:ro"
    - "/sys:/host/sys:ro"
    - "/bin/docker:/usr/local/bin/docker"
    - "/usr/lib/libdevmapper.so.1.02:/usr/lib/libdevmapper.so.1.02"
sielaq commented 7 years ago

I have open that, so make it with a proper way https://github.com/docker/compose/issues/3979

sielaq commented 5 years ago

we now use only docker client