{ "info": { "author": "Mesosphere", "author_email": "support@mesosphere.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Topic :: Software Development", "Topic :: System", "Topic :: System :: Systems Administration" ], "description": "======\ndeimos\n======\n\nDeimos is a Docker plugin for Mesos, providing external containerization as\ndescribed in `MESOS-816`_.\n\n------------\nInstallation\n------------\n\nFor a complete installation walkthrough, see `this Gist`_.\n\nDeimos can be installed `from the Cheeseshop`_.\n\n.. code-block:: bash\n\n pip install deimos\n\n----------------------------\nPassing Parameters to Docker\n----------------------------\n\nIn Mesos, every successful resource offer is ultimately followed up with a\n``TaskInfo`` that describes the work to be done. Within the ``TaskInfo`` is a\n``CommandInfo`` and within the ``CommandInfo`` there is a ``ContainerInfo``\n(following `MESOS-816`_). The ``ContainerInfo`` structure allows specification\nof an *image URL* and *container options*. For example:\n\n.. code-block:: c\n\n {\n container = ContainerInfo {\n image = \"docker:///ubuntu\"\n options = [\"-c\", \"10240\"]\n }\n }\n\nDeimos handles image URLs beginning with ``docker:///`` by stripping the\nprefix and using the remainder as the image name. The container options are\npassed to ``docker run`` when the task is launched. If a ``//`` is found in the \noptions list, all the following arguments will be append to the the end of \nthe run command. This is useful when using an image with an entrypoint defined.\nFor example:\n\n.. code-block:: c\n\n {\n container = ContainerInfo {\n image = \"docker:///flynn/slugrunner\"\n options = [\"//\", \"start\", \"web\"]\n }\n }\n\nIf no ``ContainerInfo`` is present in a task, Deimos will still containerize\nit, by using the ``--default_container_image`` passed to the slave, or taking\na reasonable guess based on the host's distribution and release.\n\nSome options for Docker, like ``-H``, do not apply only to ``docker run``.\nThese options should be set in the Deimos configuration file.\n\nDeimos recognizes Mesos resources that specify ports, CPUs and memory and\ntranslates them to appropriate Docker options.\n\n\n-----------------------------------\nPassing Parameters through Marathon\n-----------------------------------\n\nMarathon has a REST api to submit JSON-formatted requests to run long-running commands.\n\nFrom this JSON object, the following keys are used by Deimos:\n\n* ``container`` A nested object with details about what Docker image to run\n\n * ``image`` What Docker image to run, it may have a custom registry but\n must have a version tag\n\n * ``options`` A list of extra options to add to the Docker invocation\n\n* ``cmd`` What command to run with Docker inside the image. Deimos\n automatically adds ``/bin/sh -c`` to the front\n\n* ``env`` Extra environment variables to pass to the Docker image\n\n* ``cpus`` How many CPU shares to give to the container, can be fractional,\n gets multiplied by 1024 and added with ``docker run -c``\n\n* ``mem`` How much memory to give to the container, in megabytes\n\n.. code-block:: bash\n\n curl -v -X POST http://mesos1.it.corp:8080/v2/apps \\\n -H Content-Type:application/json -d '{\n \"id\": \"marketing\",\n \"container\": {\n \"image\": \"docker:///registry.int/marketing:latest\",\n \"options\": [\"-v\", \"/srv:/srv\"]\n },\n \"cmd\": \"/webapp/script/start.sh\",\n \"env\": {\"VAR\":\"VALUE\"},\n \"cpus\": 2,\n \"mem\": 768.0,\n \"instances\": 2\n }'\n\nThis turns into a Docker execution line similar to this:\n\n.. code-block:: bash\n\n docker run --sig-proxy --rm \\\n --cidfile /tmp/deimos/mesos/10330424-95c2-4119-b2a5-df8e1d1eead9/cid \\\n -w /tmp/mesos-sandbox \\\n -v /tmp/deimos/mesos/10330424-95c2-4119-b2a5-df8e1d1eead9/fs:/tmp/mesos-sandbox \\\n -v /srv:/srv -p 31014:3000 \\\n -c 2048 -m 768m \\\n -e PORT=31014 -e PORT0=31014 -e PORTS=31014 -e VAR=VALUE \\\n registry.int/marketing:latest sh -c \"/webapp/script/start.sh\"\n\n\n-------\nLogging\n-------\n\nDeimos logs to the console when run interactively and to syslog when run in the\nbackground. You can configure logging explicitly in the Deimos configuration\nfile.\n\n\n-------------\nConfiguration\n-------------\n\nThere is an example configuration file in ``example.cfg`` which documents all\nthe configuration options. The two config sections that are likely to be most\nimportant in production are:\n\n* ``[docker]``: global Docker options (``--host``)\n\n* ``[log]``: logging settings\n\nConfiguration files are searched in this order:\n\n.. code-block:: bash\n\n ./deimos.cfg\n ~/.deimos\n /etc/deimos.cfg\n /usr/etc/deimos.cfg\n /usr/local/etc/deimos.cfg\n\nOnly one configuration file -- the first one found -- is loaded. To see what\nDeimos thinks its configuration is, run ``deimos config``.\n\n\n-------------------\nThe State Directory\n-------------------\n\nDeimos creates a state directory for each container, by default under\n``/tmp/deimos``, where it tracks the container's status, start time and PID.\nFile locks are maintained for each container to coordinate invocations of\nDeimos that start, stop and probe the container.\n\nTo clean up state directories belonging to exited containers, invoke Deimos\nas follows:\n\n.. code-block:: bash\n\n deimos state --rm\n\nThis task can be run safely from Cron at a regular interval. In the future,\nDeimos will not require separate invocation of the ``state`` subcommand for\nregular operation.\n\n\n-------------------------------\nConfiguring Mesos To Use Deimos\n-------------------------------\n\nOnly the slave needs to be configured. Set these options:\n\n.. code-block:: bash\n\n --containerizer_path=/usr/local/bin/deimos --isolation=external\n\nThe packaged version of Mesos can also load these options from files:\n\n.. code-block:: bash\n\n echo /usr/local/bin/deimos > /etc/mesos-slave/containerizer_path\n echo external > /etc/mesos-slave/isolation\n\n\n.. _`from the Cheeseshop`: https://pypi.python.org/pypi/deimos\n\n.. _MESOS-816: https://issues.apache.org/jira/browse/MESOS-816\n\n.. _`this Gist`: https://gist.github.com/solidsnack/10944095\n\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mesosphere/deimos", "keywords": null, "license": "Apache", "maintainer": null, "maintainer_email": null, "name": "deimos", "package_url": "https://pypi.org/project/deimos/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/deimos/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/mesosphere/deimos" }, "release_url": "https://pypi.org/project/deimos/0.4.0/", "requires_dist": null, "requires_python": null, "summary": "Mesos containerization hooks for Docker", "version": "0.4.0" }, "last_serial": 1157792, "releases": { "0.2.3": [ { "comment_text": "", "digests": { "md5": "97da34c6f7839031a3d9f4c881b76f23", "sha256": "1049e3f53638cb5d0e4837715b28d5c81cf029143b44d1a97451b800e6f884ab" }, "downloads": -1, "filename": "deimos-0.2.3.tar.gz", "has_sig": true, "md5_digest": "97da34c6f7839031a3d9f4c881b76f23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26752, "upload_time": "2014-04-17T22:37:30", "url": "https://files.pythonhosted.org/packages/f8/32/028d67f103885c209ce73ce864a9d6b020f9a489544a069d0ce84e09a9c4/deimos-0.2.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "4e92212f573498d5a45aa6ba7e3eef0d", "sha256": "a37adda9ee642675e3c015219c9217f69ef135f6f493bf9ee1f6b72cbd1cae91" }, "downloads": -1, "filename": "deimos-0.3.1.tar.gz", "has_sig": true, "md5_digest": "4e92212f573498d5a45aa6ba7e3eef0d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31892, "upload_time": "2014-06-10T21:50:20", "url": "https://files.pythonhosted.org/packages/b1/ec/7c2fa763f0a8147816aa323e66d36298ece2a63f2b6f24fa2f4695a50eec/deimos-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "94789fb6f9f6d6ba81c777fb6b17734e", "sha256": "373ef2c542ca9499ff889bc2d6adc17bb2d1a454db0850b13402847b2128ad7b" }, "downloads": -1, "filename": "deimos-0.3.2.tar.gz", "has_sig": true, "md5_digest": "94789fb6f9f6d6ba81c777fb6b17734e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32411, "upload_time": "2014-06-27T05:54:57", "url": "https://files.pythonhosted.org/packages/0c/55/21f26ec1e401e7109aa941d6e0e2441153b72fb939c207df5faaf2a36281/deimos-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "247c1f10644f3ab80ff3045fdcb3f21b", "sha256": "ec12877fb277a4596e6e3199cee55f30f778f4c46eea43a67f7b76ea467d669d" }, "downloads": -1, "filename": "deimos-0.3.3.tar.gz", "has_sig": true, "md5_digest": "247c1f10644f3ab80ff3045fdcb3f21b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32519, "upload_time": "2014-07-01T21:47:28", "url": "https://files.pythonhosted.org/packages/97/be/01273bff691ba538b2014df95720f4392fbbc9f7fc48e14fc53fd4f72ef2/deimos-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "02a4900c687c8d6972bc1f6a11be9bf7", "sha256": "b8421aa16abbdac5449e3e885d9fc5f9a2b35978c63ea4f40e12768cbf37ab32" }, "downloads": -1, "filename": "deimos-0.3.4.tar.gz", "has_sig": true, "md5_digest": "02a4900c687c8d6972bc1f6a11be9bf7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32524, "upload_time": "2014-07-02T19:38:33", "url": "https://files.pythonhosted.org/packages/b5/9f/c9c20b481c533228b6feea1cb6dd88748173a2abba6df6d322ba8d8a0da1/deimos-0.3.4.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "ec4211860b33a363d3b5323db884bcc0", "sha256": "dec2fce66a9767183fe5fe79b4903948bc4b0382c5a20e98ce985a88094e4a42" }, "downloads": -1, "filename": "deimos-0.4.0.tar.gz", "has_sig": true, "md5_digest": "ec4211860b33a363d3b5323db884bcc0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33085, "upload_time": "2014-07-10T05:42:14", "url": "https://files.pythonhosted.org/packages/ae/f9/a43b616c375e32c6658d6ff67d8918c991869ceec03aff50921abed5f7f0/deimos-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ec4211860b33a363d3b5323db884bcc0", "sha256": "dec2fce66a9767183fe5fe79b4903948bc4b0382c5a20e98ce985a88094e4a42" }, "downloads": -1, "filename": "deimos-0.4.0.tar.gz", "has_sig": true, "md5_digest": "ec4211860b33a363d3b5323db884bcc0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33085, "upload_time": "2014-07-10T05:42:14", "url": "https://files.pythonhosted.org/packages/ae/f9/a43b616c375e32c6658d6ff67d8918c991869ceec03aff50921abed5f7f0/deimos-0.4.0.tar.gz" } ] }