{ "info": { "author": "HMS DBMI Tech-core", "author_email": "bryan_larson@hms.harvard.edu", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: Public Domain", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Utilities" ], "description": "# Stack\n\n#### A program for running a stack of Docker services\n\n## Purpose\n\nThis is a program to provide some convenience wrappers around common tasks\nwhen developing with a Dockerized stack of micro-services. The program aims\nto simplify some of the management of a local stack and make it easier to\ndevelop on an entire stack whilst running and testing it.\n\nThe application depends on configurations defined in the base `stack.yml`\nfile for the applications that will be built.\n\n## App Properties\n\n- `repository`: This should specify the URL to the app's git repository.\n- `branch`: The particular branch to checkout when cloning the repo.\n- `packages`: Any packages listed for the Stack that this app depends on\n\n## Package Properties\n\n- `name`: The name of the package to be used when installing from PyPi/mirror\n- `path`: The path to the directory containing the package source\n- `build`: The build command Stack should execute when updating the package\n\n## Setup\n\n0. Create your Python virtualenv and install requirements:\n`pip install -r requirements.txt`\n\n1. First step is to place any needed overrides in the `overrides/{APP}`\ndirectory. These files are what will be used to build the image that\nwill be run in the stack. Typically they closely mirror the files\nthe app uses in its production environment, but with small tweaks to\nrun locally and to interface with other local apps. This directory\nmust contain a `Dockerfile` if the app is to run off a built image.\n\n2. The next step is to clone all needed repositories into the `apps` directory.\n`stack` includes some convenience commands for managing the subtree\nrepositories. Do this with one command by running `stack init`.\nSee below for further details on repository management.\n\n3. The third step is to make sure the `docker-compose.yml` file is fully\nand accurately filled out to include the apps and their configurations.\nThis includes any volumes needed to mount the app's source within the\ncontainer. This allows for file changes to update the services\nautomatically so changes can be tested immediately. Verify current setup\nby running `stack check`.\n\n4. Lastly, update the hook scripts with any extra bits of code\nneeded to run the stack. Whether you need to collect npm\ndependencies after cloning a repo or you need a database to\nbe cleared when cleaning an app, this is where custom functionality\nshould live.\n\n## Stack Commands\n\nTo check stack configurations and to ensure volume paths are correct,\nrequired images exist, etc:\n\n> `stack check []`\n\nNot passing an app will iterate through all services specified in the\n`docker-compose.yml` file and check all configurations.\n\nRun the initialize command to clone all needed repositories to their\nrespective branches:\n\n> `stack init`\n\nTo get the stack going, run the following command (pass `-d` to daemonize\nthe process):\n\n> `stack up [-d]`\n\nIf a container needs to be rebuilt for some reason (updated requirements, etc),\nrun the following command (app is the key of the service in your `docker-compose.yml`):\n\n> `stack reup [--clean]`\n\nYou could instead shell into the needed container and run the requirements\nupdate command there:\n\n> `stack shell [-sh]`\n\nStack defaults to trying to open a bash shell, but you can default to\nsh if bash is not available.\n\nYou can also check logs on a container with a couple constraints to more\neasily find the relevant logs:\n\n> `stack logs [--minutes=n] [--lines=n] [-f]`\n\nYou can specify how many minutes in the past to start the log retrieval\nor the number of lines to get. You can also pass the `-f` flag to follow\nthe logs as the container runs.\n\nThis will stop and remove the container, and then start it up again. The clean\nflag will purge the existing container image and rebuild before running again.\n\nTo bring the stack down, run the following:\n\n> `stack down`\n\nThis merely wraps `docker-compose down --volumes` and brings the stack down\nand removes any left-over data volumes.\n\n> `stack packages [package]`\n\nThis command will attempt to build and upload the package to the PyPi\nmirror for use by the apps in the Stack. Any apps that were marked\nas dependent on this package will trigger a reinstall of that\npackage automatically when a new build is successfully registered with\nthe local PyPi mirror.\n\n\n## Git Subtree Helper Commands\n\nStack apps are included as git subtrees. Commands were added to Stack to\nwrap and simplify the commands needed to work with these repositories.\n\nBefore cloning, make sure the app exists in the `docker-compose.yml` file\nand has the required configurations, namely the repository URL. The current\n`docker-compose.yml` file illustrates how to do this with the current set\nof apps.\n\n**Git subtree commands will not run with pending changes in the working\ndirectory. Commit all changes before running subtree commands.**\n\nTo clone an existing repo into the `apps` directory:\n\n> `stack clone `\n\nThis will clone the repo as a subtree in the `apps` directory\n(default: {PROJECT_ROOT}/apps). If the app is already present in the\n`apps` directory, that copy will be removed and the specified branch\nwill be cloned in its place.\n\nTo pull remote changes into the local branch, use the `pull` command:\n\n> `stack pull [--squash]`\n\nAll commits pulled are added to the stack repository so squashing\nthe incoming commits keeps history tidy.\n\nTo create a new branch for a specified app:\n\n> `stack checkout -b `\n\nThis splits the subtree into the new specified branch. Commit changes\nas usual for the entire stack repository. Once an update is ready to push,\nrun the push command as usual:\n\n> `stack push [--squash]`\n\nThis will collect commits relevant to the particular subtree and push those\nto origin for the new branch. The `--squash` command will collapse those\ncommits into a single commit.\n\nTo get back to the base branch, checkout the branch as usual:\n\n> `stack checkout `\n\nThis removes the subtree entirely, and clones the specified branch in\nits place.\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hms-dbmi/stack.git", "keywords": "cli", "license": "UNLICENSE", "maintainer": "", "maintainer_email": "", "name": "hmsdbmitc-stack", "package_url": "https://pypi.org/project/hmsdbmitc-stack/", "platform": "", "project_url": "https://pypi.org/project/hmsdbmitc-stack/", "project_urls": { "Homepage": "https://github.com/hms-dbmi/stack.git" }, "release_url": "https://pypi.org/project/hmsdbmitc-stack/0.4.5/", "requires_dist": [ "colorlog (>=4.0.2)", "docker (>=3.7.2)", "docopt (>=0.6.2)", "fhirclient (==3.2.0)", "furl (>=2.0.0)", "mysql-connector-python (>=8.0.16)", "python-dateutil (>=2.6.1)", "PyYAML (>=5.1)", "requests (>=2.21.0)" ], "requires_python": "", "summary": "A command line program to manage a Docker stack.", "version": "0.4.5" }, "last_serial": 5764458, "releases": { "0.4.1": [ { "comment_text": "", "digests": { "md5": "cab7914d0e3011e8f482148d3ee1fcdc", "sha256": "882c99aac4a08ea119d5fb03ce3f221c74b5dba71487e030b795d12aa10fe64b" }, "downloads": -1, "filename": "hmsdbmitc_stack-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cab7914d0e3011e8f482148d3ee1fcdc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 27988, "upload_time": "2019-02-12T17:52:43", "url": "https://files.pythonhosted.org/packages/f4/4b/93964b02ed5e2e182be0ced946ed1244e4454c0b6b08b442b8023c8cc19f/hmsdbmitc_stack-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d4cd30c6b49838645a0cb0552c90dbb6", "sha256": "bdc22e44e46c311f72a47fb90127c610f2b9881b739d8740aac33e5a23a0a1eb" }, "downloads": -1, "filename": "hmsdbmitc-stack-0.4.1.tar.gz", "has_sig": false, "md5_digest": "d4cd30c6b49838645a0cb0552c90dbb6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18176, "upload_time": "2019-02-12T17:52:45", "url": "https://files.pythonhosted.org/packages/03/c8/16e017a41cceb1a794b94161514d62ecfa5af301b085c90f16590ea82843/hmsdbmitc-stack-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "b6d589ceeef880ba6020293245094e03", "sha256": "e535c6af5dd9fa9f1588fa642cfc17a37f679b44d49aaabe98a13844cb9f6490" }, "downloads": -1, "filename": "hmsdbmitc_stack-0.4.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b6d589ceeef880ba6020293245094e03", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 27988, "upload_time": "2019-02-12T18:28:24", "url": "https://files.pythonhosted.org/packages/c7/52/f6f24a65a68066401fae5cde0826c1364166f463948f111b71cdfc20e3c2/hmsdbmitc_stack-0.4.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b58d799e96c17ff3a61e14010758ceea", "sha256": "33954d0760a7a1f636ffc3ed29f68af57486e5dd98e21084c4fb2a0ec332f455" }, "downloads": -1, "filename": "hmsdbmitc-stack-0.4.2.tar.gz", "has_sig": false, "md5_digest": "b58d799e96c17ff3a61e14010758ceea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18181, "upload_time": "2019-02-12T18:28:25", "url": "https://files.pythonhosted.org/packages/79/a5/00be2283111ee0703cd6efa87a187073c5f0f18d1e21e27e6b5c62a9cc02/hmsdbmitc-stack-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "9ac7482b4a98c2341d6f524aa724f450", "sha256": "cc5f17a64da90898f9cabbe2d05c1187892bacdbdc05cf244825f701225ebb6a" }, "downloads": -1, "filename": "hmsdbmitc_stack-0.4.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9ac7482b4a98c2341d6f524aa724f450", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 28657, "upload_time": "2019-05-01T17:14:29", "url": "https://files.pythonhosted.org/packages/71/9b/2e69eabe7f87b5dd1b339a1f5c888817c24b529e0c569e5d93e4b10ac154/hmsdbmitc_stack-0.4.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3109eeba887e05a520cded65882beac6", "sha256": "18a00fa95392a7bf746e99e8eef27fce73a3fe4920f883c1218f846855a35f1b" }, "downloads": -1, "filename": "hmsdbmitc-stack-0.4.3.tar.gz", "has_sig": false, "md5_digest": "3109eeba887e05a520cded65882beac6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18171, "upload_time": "2019-05-01T17:14:31", "url": "https://files.pythonhosted.org/packages/db/90/75226fd3233feaf6f12f66806939a5ce079f3fdad11bb5ab227050e1fe92/hmsdbmitc-stack-0.4.3.tar.gz" } ], "0.4.4": [ { "comment_text": "", "digests": { "md5": "3cf85f70e75d8c5153b8cdcd70328d1a", "sha256": "1c34c8d0d3deb33e465f17e03fc09d0804b62a3ec96a3737cfb1dbf4bfb80628" }, "downloads": -1, "filename": "hmsdbmitc_stack-0.4.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3cf85f70e75d8c5153b8cdcd70328d1a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 28144, "upload_time": "2019-05-08T14:53:02", "url": "https://files.pythonhosted.org/packages/cd/e4/23f96e8b554b40c6b29860020ed2ac5e577ecb27b199da3065d3bf432fae/hmsdbmitc_stack-0.4.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c8fdc59d0bc21ecb1699d9cce18d899b", "sha256": "590bf7ae988ec9f64be178d816efc230b9df4c6dc05c7d4c5c00b13938c66442" }, "downloads": -1, "filename": "hmsdbmitc-stack-0.4.4.tar.gz", "has_sig": false, "md5_digest": "c8fdc59d0bc21ecb1699d9cce18d899b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18180, "upload_time": "2019-05-08T14:53:04", "url": "https://files.pythonhosted.org/packages/f0/28/5646be2671a444a2d2ae9549b1ee95d3ca872cd1b4fa1ab87b4fad941949/hmsdbmitc-stack-0.4.4.tar.gz" } ], "0.4.5": [ { "comment_text": "", "digests": { "md5": "b1acd0ae73269fe90f276d47a6bf3260", "sha256": "ed05ac687007ef1d17bf805abac952c593cf0e6bd88b427475311c4e7399ef51" }, "downloads": -1, "filename": "hmsdbmitc_stack-0.4.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b1acd0ae73269fe90f276d47a6bf3260", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24772, "upload_time": "2019-08-31T14:29:52", "url": "https://files.pythonhosted.org/packages/9c/f2/9ea759ee699cc356ca941ce3d029da9528dbcf4cab9acb7b4334af6f08d4/hmsdbmitc_stack-0.4.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3211775378bbbf70f26296b348d9735f", "sha256": "1bdaa1ec1f4df063aca03acb6365d5d538e903685f65ab66707e2d6c11d3179c" }, "downloads": -1, "filename": "hmsdbmitc-stack-0.4.5.tar.gz", "has_sig": false, "md5_digest": "3211775378bbbf70f26296b348d9735f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16408, "upload_time": "2019-08-31T14:29:54", "url": "https://files.pythonhosted.org/packages/1f/1b/7ea1177e8b765effd2ac7d2bc9d007f2bbb0d11a280cf8d4f9f5108ae20d/hmsdbmitc-stack-0.4.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b1acd0ae73269fe90f276d47a6bf3260", "sha256": "ed05ac687007ef1d17bf805abac952c593cf0e6bd88b427475311c4e7399ef51" }, "downloads": -1, "filename": "hmsdbmitc_stack-0.4.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b1acd0ae73269fe90f276d47a6bf3260", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24772, "upload_time": "2019-08-31T14:29:52", "url": "https://files.pythonhosted.org/packages/9c/f2/9ea759ee699cc356ca941ce3d029da9528dbcf4cab9acb7b4334af6f08d4/hmsdbmitc_stack-0.4.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3211775378bbbf70f26296b348d9735f", "sha256": "1bdaa1ec1f4df063aca03acb6365d5d538e903685f65ab66707e2d6c11d3179c" }, "downloads": -1, "filename": "hmsdbmitc-stack-0.4.5.tar.gz", "has_sig": false, "md5_digest": "3211775378bbbf70f26296b348d9735f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16408, "upload_time": "2019-08-31T14:29:54", "url": "https://files.pythonhosted.org/packages/1f/1b/7ea1177e8b765effd2ac7d2bc9d007f2bbb0d11a280cf8d4f9f5108ae20d/hmsdbmitc-stack-0.4.5.tar.gz" } ] }