{ "info": { "author": "Joseph Coffland", "author_email": "joseph@cauldrondevelopment.com", "bugtrack_url": null, "classifiers": [], "description": "# Dockbot\nA continuous integration system which uses Docker and Buildbot. Dockbot is a\nPython program which starts a **master** Docker instance and a number of\nbuild **slaves**. The **master** coordinates builds, offers a Web interface\nfor monitoring and controlling builds and triggers builds based on changes\nto source repositories. The **slaves** perform the builds under different\nconfigurations.\n\n# Installation\nYou can install dockbot with pip as follows:\n\n pip install dockbot\n\nOr from GitHub:\n\n git clone https://github.com/CauldronDevelopmentLLC/dockbot\n cd dockbot\n sudo python setup.py install\n\n# Configuring a Dockbot Project\nTo use dockbot you need to create a ``dockbot.json`` configuration file in a\ndirectory of it's own and a number of **slaves** in a directory called\n``slaves``. In the slave directories you also have ``dockbot.json`` files\nwhich configure which projects the slave will run. The directory structure\nshould look like this:\n\n dockbot.json\n lib/\n slaves/\n slave1/\n dockbot.json\n projectA.docker\n projectB.docker\n ...\n slave2/\n ...\n slaveN/\n ...\n\nThe optional ``lib`` directory can contain Docker file fragments which may be\nused by multiple slaves.\n\n## Basic configuration\nThe top level ``dockbot.json`` file needs a some basic configuration\ninformation to setup the dockbot install:\n\n```\n\"project\": \"Dockbot\",\n\"url\": \"https://github.com/CauldronDevelopmentLLC/dockbot\",\n\"namespace\": \"dockbot\",\n\"admin\": \"Joseph Coffland \",\n\"ip\": \"127.0.0.1\",\n\"http-port\": 8049,\n\"buildbot-port\": 8050,\n```\n\nThese configuration values have the following meanings:\n\n * project - The dockbot project name.\n * url - The project URL, cosmetic only.\n * namespace - A unique name prefix for docker images in this project.\n * admin - A email address, cosmetic only.\n * ip - The IP address to which ports should be bound.\n * http-port - The HTTP port for the build master's Web interface.\n * buildbot-port - Opening this port allows other build slaves to connect.\n\n\n## Build modes\nOften software can be built in more than one way. Build modes make it possible\nto configure different builds configurations for the same software. Build mode\nconfiguration looks like this:\n\n```\n\"modes\": {\n \"debug\": {\"scons\": {\"debug\": 1}},\n \"release\": {}\n},\n```\n\nAbove we configure two build modes ``debug`` and ``release``. The names are\narbitrary and can be anything you like. The dictionaries under these names\noverride options specific to those moves.\n\n## Projects\n```\n\"projects\": {\n \"_default_\": {\n \"compile\": [\"scons\", \"-k\"],\n },\n\n \"cbang\": {\n \"test\": true,\n \"repo\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/CauldronDevelopmentLLC/cbang\",\n \"branch\": \"master\"\n }\n }\n}\n```\n\nThe ``projects`` section is a dictionary of project configurations. The special\n``_default_`` section sets the default configuration options for all projects.\nProject names are arbitrary and may contain the following configuration options:\n\n * compile - The compile command.\n * test - If true testing should be performed after the build is complete\n * repo - The source repository configuration\n * type - One of ``git``, ``github`` or ``svn``\n * url - The repository url.\n * org - An organization, used only with ``github`` repos with out a ``url``.\n * user - The repo user name.\n * pass - The repo password, if needed.\n * branch - The repository branch.\n * deps - Projects which must be built first.\n * packages - A list of package types, appended to the compile command.\n * build - If false the build step is omitted.\n\n## Slaves\nA slave represents a particular build configuration. Each slave has its own\ndirectory under ``slaves``. The ``dockbot.json`` file in this directory defines\none or more images that will be built and adds any extra configuration options\nparticular to the slave.\n\n## Slave Images\nA slave image is a Docker image which will be run in one or more **modes**.\nImages are defined in the slave's ``dockbot.json`` as follows:\n\n```\n\"images\": {\n \"cbang\": {\"projects\": [\"cbang\"]}\n}\n```\n\nIn the above example one image ``cbang`` is defined with one project ``cbang``.\nThe project must be defined in the top level ``dockbot.json``. To build the\nimage dockbot will look for a file ``cbang.docker`` in the slave's directory.\nIt will then process this file with ``m4`` to produce a final ``Dockerfile``\nused to build the image. The ``m4`` preprocessor will combine Dockerfile\nfragments to create the complete ``Dockerfile``. These fragments may exist\neither in the slave's own directory, in a top level ``lib`` directory or in\nthe dockbot default libs.\n\nAn example project ``.docker`` file make look like this:\n\n```\ninclude(base.m4)\ninclude(slave.m4)\n```\n\n``base.m4`` is defined as:\n\n```\nFROM debian:testing\n\ninclude(debian.m4)\ninclude(boost-1.59.0.m4)\ninclude(buildbot.m4)\ninclude(gcc-4.8.m4)\n```\n\nEach of these ``include()`` lines references a docker file fragment located in\none of the lib directories.\n\n# Building Dockbot Images\nTo build a dockbot image run the following command:\n\n dockbot build \n\nWhere ```` is the name of the image. e.g.\n``dockbot-debian-testing-64bit-cbang``. If the image is successfully build then\nit can be started.\n\nTo rebuild a dockbot image run the following:\n\n dockbot rebuild \n\nThis command first deletes the old build than builds it again applying any\nconfiguration changes. In order to do a rebuild all of the images's containers\nmust first be stopped.\n\n# Starting & Running Master\nThe build master is a special docker container which coordinates the builds.\nLike the slaves it too must be built and run. This is accomplished as follows:\n\n dockbot build master\n dockbot start master\n\nThe build master must be restarted whenever the dockbot configuration is\nchanged. To stop the master run the following:\n\n dockbot stop master\n\n# Dockbot Status\nTo view the status of the dockbot containers run the following:\n\n dockbot status\n\nor simply:\n\n dockbot\n\nThis will list the status of all configured dockbot containers. The full name\nof container in the current dockbot project will be displayed on a line\nwith it's current status. Possible status are:\n\n * **[Not Found]** - The container's image has not been built yet.\n * **[Built]** - The image has been built but the container does not yet exist.\n * **[Running]** - The container is currently running.\n * **[Offline]** - The container exists but is not currently running.\n * **[Building]** - The image is currently being built.\n * **[Starting]** - The container is starting.\n * **[Stopping]** - The container is stopping.\n * **[Deleting]** - The image is currently being deleted.\n\nTo check the status of a particular dockbot container run:\n\n dockbot status \n\nYou can also view the complete configuration of a dockbot container like this:\n\n dockbot config \n\n# Shell Access\nSome times it is desirable to login and inspect the contents of a container.\nThis is a accomplished with the dockbot ``shell`` command:\n\n dockbot shell \n\nIf the image was previously built this will open a shell in the container. If\nthe container was already running it will attach a new shell to the running\ncontainer.\n\n# The Web Interface\nThe build master's Web interface makes it possible to monitor and control\nbuilds. To view the Web interface navigate a brower to the IP and port\nspecified in the top level ``dockbot.json`` file. At least the build master\ncontainer must be running. Some slave containers should also be running to\nmake it useful.\n\n# Triggering Builds\nBuilds may be manually triggered using dockbot's ``trigger`` command. The\nsyntax is:\n\n dockbot trigger [project]\n\nIf ``[project]`` is omitted all projects on the slave will be triggered.\n\n# Triggering Builds from GitHub\nTBD\n\n# Publishing Builds\nThe last 5 completed builds are placed in ``run/buildmaster/builds/``. Once all\nthe builds for a particular project are correct they can be published using\nthe ``dockbot-publish`` tool.\n\nTBD\n\n# Publishing Builds to GitHub\nTBD", "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/CauldronDevelopmentLLC/dockbot", "keywords": null, "license": "GPL 3+", "maintainer": null, "maintainer_email": null, "name": "dockbot", "package_url": "https://pypi.org/project/dockbot/", "platform": "any", "project_url": "https://pypi.org/project/dockbot/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/CauldronDevelopmentLLC/dockbot" }, "release_url": "https://pypi.org/project/dockbot/0.1.5/", "requires_dist": null, "requires_python": null, "summary": "A continuous integration system which uses Docker and Buildbot", "version": "0.1.5" }, "last_serial": 2079612, "releases": { "0.1": [], "0.1.1": [ { "comment_text": "", "digests": { "md5": "8b09868dfb949ca2d2f26296f31b2640", "sha256": "749c8ebb4bb407374937a323673aab5de0472b2bbb4f9a9087370ad2ce476a84" }, "downloads": -1, "filename": "dockbot-0.1.1.tar.gz", "has_sig": false, "md5_digest": "8b09868dfb949ca2d2f26296f31b2640", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42048, "upload_time": "2016-04-13T23:39:01", "url": "https://files.pythonhosted.org/packages/20/91/ecf1b5f5b5b3bca78b4c13e627eeef8e5743e9319c0d824c674976632671/dockbot-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "26a1fd223d8f2f3f4a163f65ae09f1eb", "sha256": "44f00634bdcac8cec8debbaa85e4051dbecf0cc28ed3b3b0677d68ccdcdb2a14" }, "downloads": -1, "filename": "dockbot-0.1.2.tar.gz", "has_sig": false, "md5_digest": "26a1fd223d8f2f3f4a163f65ae09f1eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42108, "upload_time": "2016-04-13T23:52:50", "url": "https://files.pythonhosted.org/packages/f1/b0/9f9d5547adc3cda45fb7ac8478e4c9db4c6f74bdb795edbb8248f23df5b7/dockbot-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "6a0c208176aff057250bfd2f07313d5a", "sha256": "da0cdabbf1382c9735aec4651dc2df0dedf66512f331949a722687dced0c5904" }, "downloads": -1, "filename": "dockbot-0.1.3.tar.gz", "has_sig": false, "md5_digest": "6a0c208176aff057250bfd2f07313d5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42931, "upload_time": "2016-04-14T02:17:15", "url": "https://files.pythonhosted.org/packages/c4/3c/48d7d01bfb76130dc5a420158a2bdbd410a3f9f9ba0c61d183242236ec5d/dockbot-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "224e979065fe96246d2b364ab58da189", "sha256": "da1dab6cd611d48a34e7da2d2cfdd46f38ae614eb7a8885eb1dcd94654469bd8" }, "downloads": -1, "filename": "dockbot-0.1.4.tar.gz", "has_sig": false, "md5_digest": "224e979065fe96246d2b364ab58da189", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44552, "upload_time": "2016-04-23T04:22:24", "url": "https://files.pythonhosted.org/packages/87/bc/706183c42807e24f9542b5262d3c753ccd39c0427980f33e8dd9d9585e5c/dockbot-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "a5584259117f8eb8be1a9fc77624d6dd", "sha256": "fccac7794dc46b080ed7b798dd6299b2d0d1f8faca1f30631ea3ba64ca5916ba" }, "downloads": -1, "filename": "dockbot-0.1.5.tar.gz", "has_sig": false, "md5_digest": "a5584259117f8eb8be1a9fc77624d6dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44540, "upload_time": "2016-04-23T04:25:15", "url": "https://files.pythonhosted.org/packages/33/7e/36876377dd96efdb28db1ccb7ffb5abd2d71713afc322de52d54f5c26992/dockbot-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a5584259117f8eb8be1a9fc77624d6dd", "sha256": "fccac7794dc46b080ed7b798dd6299b2d0d1f8faca1f30631ea3ba64ca5916ba" }, "downloads": -1, "filename": "dockbot-0.1.5.tar.gz", "has_sig": false, "md5_digest": "a5584259117f8eb8be1a9fc77624d6dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44540, "upload_time": "2016-04-23T04:25:15", "url": "https://files.pythonhosted.org/packages/33/7e/36876377dd96efdb28db1ccb7ffb5abd2d71713afc322de52d54f5c26992/dockbot-0.1.5.tar.gz" } ] }