{ "info": { "author": "Zalando SE", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3" ], "description": ".. image:: https://coveralls.io/repos/zalando/lizzy/badge.svg?branch=master&service=github\n :target: https://coveralls.io/github/zalando/lizzy?branch=master\n\n\n=====\nLizzy\n=====\n\nLizzy is a wrapper around `Senza`_: a command line deployment tool for\ncreating and executing AWS `CloudFormation`_ templates. With Lizzy,\nautonomous teams can use `Senza`_, within their `continuous delivery`_\npipelines, to deploy new versions of their apps to a team-specific AWS\naccount. Lizzy can be deployed to an AWS account, then it's REST API\ncan be used to deploy new apps to that account.\n\n\nWhy Lizzy\n=========\n\nAt `Zalando`_, development teams have their own AWS accounts so they\ncan work autonomously. One team (Continuous Delivery) is responsible\nfor maintaining the `Jenkinses`_ of all other Zalando teams. This allows\nteams to focus on their `OKR's`_ instead of spending their time\nconfiguring `Jenkins`_ or creating their own continuous deployment\ntools. For Zalando, Lizzy helps make `continuous delivery`_ using our\nJenkins-as-a-Service setup possible. Without Lizzy teams would need\nto save AWS credentials to their Jenkins instance.\n\nIf your team is interested in working with `immutable stacks`_ on AWS\nyou can use `Senza`_ to create and manage your stacks using\n`CloudFormation`_. Lizzy is an additional tool that provides a\ndeployment API to be used by your `continuous delivery`_ pipeline to\nrun Senza commands. Lizzy can be used along with any code integration\ntool like `Jenkins`_, `TravisCI`_, `CircleCI`_, etc.\n\n\nHow Lizzy Works\n===============\n\nLizzy consists of the Lizzy Agent \u2014 a REST API service \u2014 and the\n`Lizzy-Client`_ command line tool.\n\nThe Lizzy Agent is a web application deployed in a team's AWS account\nand granted access to create new CloudFormation stacks through a REST\nAPI. All requests are authenticated using `OAuth2`_ bearer tokens.\n\n`Lizzy-Client`_ mimics the usage of `Senza`_'s commands and transforms\nthem into HTTP requests, which are then sent to Lizzy Agent's REST\nAPI.\n\n\nWho Uses Lizzy\n==============\n\nMany Zalando teams use Lizzy in production to deliver high-quality\nservices that power the `fastest-growing`_ online fashion platform in\nEurope. If you want to know more about how Zalando uses Lizzy, please\nread our blog post `Continuous Delivery pipelines of ghe-backups with\nLizzy`_.\n\n\nHow to Run Lizzy Locally\n========================\n\nThis repository includes a `Dockerfile`_ that you can use to build an\nimage locally using the command:\n\n.. code-block:: sh\n\n $ docker build -t lizzy:dev .\n\n\n.. hint:: If you clone this repository, the \"scm-source.json\" file\n will be missing. To know more about what is in this file,\n please read the `STUPS documentation`_. We have `tools`_\n that can generate this file for you.\n\nAfter the image is built, it will be available with the tag\n\"lizzy:dev\". You will also need to specify some environment variables\nfor Lizzy to use. Here is an \"example.cfg\" file:\n\n.. code-block:: cfg\n\n TOKEN_URL=https://token.auth.example.com/oauth2/access_token\n TOKENINFO_URL=https://info.auth.example.com/oauth2/tokeninfo\n ALLOWED_USERS=['robotusername','myusername']\n DEPLOYER_SCOPE=deployer\n LOG_LEVEL=DEBUG\n\nYou also need to configure the `AWS credentials`_ locally in your\nmachine under `~/.aws`. After that, you can run the Lizzy image with\nthe command:\n\n.. code-block:: sh\n\n $ docker run --rm -p 8080:8080 --env-file environment.cfg -v ~/.aws:/.aws --name lizzy -u 999 -it lizzy:dev\n\nThe application will be available by default at the port `8080`, which\nis usually accessible at `http://127.0.0.1:8080`. It depends on how\nyou've configured Docker locally. A `Swagger/OpenAPI console`_ is\navailable at `http://127.0.0.1:8080/api/ui/#/default`.\n\n\nDeploying to AWS\n================\n\nThere are many ways to deploy Lizzy to AWS. At Zalando we use\n`STUPS`_, which provides a convenient and audit-compliant\nPlatform-as-a-Service (PaaS). An example of the `Senza definition`_ to\ndeploy Lizzy:\n\n.. code-block:: yaml\n\n SenzaInfo:\n \u00a0\u00a0StackName: lizzy\n \u00a0\u00a0Parameters:\n \u00a0\u00a0\u00a0\u00a0- ImageVersion:\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Description: \"Docker image version of lizzy.\"\n SenzaComponents:\n \u00a0\u00a0- Configuration:\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Type: 'Senza::StupsAutoConfiguration'\n \u00a0\u00a0- AppServer:\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Type: Senza::TaupageAutoScalingGroup\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0AssociatePublicIpAddress: false\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ElasticLoadBalancer: AppLoadBalancer\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0IamRoles: ['app-lizzy']\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0InstanceType: t2.nano\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0SecurityGroups: ['app-lizzy']\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0TaupageConfig:\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0application_version: '{{Arguments.ImageVersion}}'\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0environment:\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ALLOWED_USER_PATTERN: \"^(jenkins-slave-\\\\w+)$\"\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0DEPLOYER_SCOPE: myscope\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0LANG: C.UTF-8\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0LC_ALL: C.UTF-8\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0LOG_LEVEL: DEBUG\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0REGION: '{{AccountInfo.Region}}'\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0TOKEN_URL: 'https://token.auth.example.com/oauth2/access_token'\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0TOKENINFO_URL: 'https://info.auth.example.com/oauth2/tokeninfo'\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0health_check_path: /api/swagger.json\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0ports: {8080: 8080}\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0runtime: Docker\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0source: 'lizzy:{{Arguments.ImageVersion}}'\n \u00a0\u00a0- AppLoadBalancer:\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0HTTPPort: 8080\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0HealthCheckPath: /api/swagger.json\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Scheme: internet-facing\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0SecurityGroups: ['app-lizzy-lb']\n \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Type: Senza::WeightedDnsElasticLoadBalancer\n\n\nAccess Control for Lizzy\n------------------------\n\nTo create new CloudFormation stacks, Lizzy applications need access to\nCloudFormation plus some other services from Amazon's API. You will\nneed to specify the `IAM role`_ in a manner like:\n\n.. code-block:: json\n\n {\n \"Statement\": [\n {\n \"Action\": [\n \"iam:*\",\n \"cloudformation:*\",\n \"ec2:*\",\n \"route53:*\",\n \"elasticloadbalancing:*\",\n \"cloudwatch:*\",\n \"elasticache:*\",\n \"acm:*\",\n \"autoscaling:*\",\n \"sqs:*\"\n ],\n \"Effect\": \"Allow\",\n \"Resource\": \"*\"\n }\n ],\n \"Version\": \"2012-10-17\"\n }\n\nThat is the minimal configuration Lizzy needs to run Senza commands\nsuccessfully. Other statements might be included in this configuration.\n\n\nConfiguration\n=============\n\nLizzy uses the following environment variables for configuration:\n\n+----------------------+----------------------------------------+-----------+\n| NAME | DESCRIPTION | DEFAULT |\n+======================+========================================+===========+\n| ALLOWED_USERS | List of users that can use Lizzy | |\n+----------------------+----------------------------------------+-----------+\n| ALLOWED_USER_PATTERN | Defines a regular expression to match | |\n| | usernames allowed to use Lizzy | |\n+----------------------+----------------------------------------+-----------+\n| DEPLOYER_SCOPE | OAUTH scope needed to deploy | |\n+----------------------+----------------------------------------+-----------+\n| LOG_LEVEL | Sets the minimum log level | INFO |\n+----------------------+----------------------------------------+-----------+\n| LOG_FORMAT | Sets the log format (human or default) | default |\n+----------------------+----------------------------------------+-----------+\n| REGION | AWS Region to use | eu-west-1 |\n+----------------------+----------------------------------------+-----------+\n| SENTRY_DSN | Sentry URL with client keys | |\n+----------------------+----------------------------------------+-----------+\n| TOKEN_URL | URL to get a new token | |\n+----------------------+----------------------------------------+-----------+\n| TOKENINFO_URL | URL to validate the token | |\n+----------------------+----------------------------------------+-----------+\n\nConfiguring Access to Lizzy\n---------------------------\n\nThere are two environment variables for configuring who is allowed to\nperform successful calls to the Lizzy Agent. You must use one (and\nONLY one) of them: Either `ALLOWED_USERS` or\n`ALLOWED_USER_PATTERN`. To choose which one fits your use case, you\nfirst need to understand what they do.\n\n- **ALLOWED_USERS**: List of specific usernames that can access\n Lizzy. Use it when you know the exact usernames of the clients you\n want to give access to your service.\n- **ALLOWED_USER_PATTERN**: Regular expression that should match the\n username of the clients that are going to call the Lizzy API. Use it\n when you know that the username should start with some pattern, like\n `stups_.+`.\n\nThose variables are mutually exclusive. Again: use only one of them.\n\n\nAuthentication Service\n----------------------\n\nThe **TOKEN_URL** environment variable should point to the service\nthat provides OAuth tokens. At Zalando, we use the open-source `PlanB\nprovider`_ for that. The **TOKENINFO_URL** environment variable should\npoint to the service that stores information about the tokens. To\nstore the OAuth2 token information, we use `PlanB token info`_, also\ndeveloped by Zalando. If you do not have any OAuth2 infrastructure,\nplease take a look at those projects.\n\nContributing to Lizzy\n=====================\n\nWe welcome your ideas, issues, and pull requests. Just follow the\nusual/standard `GitHub practices`_.\n\nLicense\n=======\nCopyright 2015 Zalando SE\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n.. _Senza: https://github.com/zalando-stups/senza\n.. _OKR's: https://en.wikipedia.org/wiki/OKR\n.. _Lizzy-Client: https://github.com/zalando/lizzy-client\n.. _Zalando: https://www.zalando.com\n.. _`fastest-growing`: https://www.fbicgroup.com/sites/default/files/Europes%2025%20Fastest-Growing%20Major%20Apparel%20Retailers.pdf\n.. _`Continuous Delivery pipelines of ghe-backups with Lizzy`: https://tech.zalando.de/blog/ci-pipelines-with-lizzy/\n.. _`AWS credentials`: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html\n.. _`PlanB provider`: https://github.com/zalando/planb-provider\n.. _`PlanB token info`: https://github.com/zalando/planb-tokeninfo\n.. _`GitHub practices`: https://guides.github.com/introduction/flow/\n.. _`OAuth2`: http://planb.readthedocs.io/en/latest/oauth2.html\n.. _`Dockerfile`: https://github.com/zalando/lizzy/blob/master/Dockerfile\n.. _`STUPS`: http://stups.readthedocs.io/en/latest/\n.. _`STUPS documentation`: http://stups.readthedocs.io/en/latest/user-guide/application-development.html#scm-source-json\n.. _`tools`: https://github.com/zalando-stups/python-scm-source\n.. _`Senza definition`: https://github.com/zalando-stups/senza#senza-definition\n.. _`IAM role`: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html\n.. _`continuous delivery`: https://en.wikipedia.org/wiki/Continuous_delivery\n.. _`Swagger/OpenAPI console`: http://swagger.io/\n.. _`CloudFormation`: https://aws.amazon.com/cloudformation/\n.. _`immutable stacks`: http://thenewstack.io/a-brief-look-at-immutable-infrastructure-and-why-it-is-such-a-quest/\n.. _`Jenkinses`: https://jenkins.io/\n.. _`Jenkins`: https://jenkins.io/\n.. _`TravisCI`: https://travis-ci.org/\n.. _`CircleCI`: https://circleci.com/\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/zalando/lizzy", "keywords": "", "license": "Apache License Version 2.0", "maintainer": "", "maintainer_email": "", "name": "lizzy", "package_url": "https://pypi.org/project/lizzy/", "platform": "", "project_url": "https://pypi.org/project/lizzy/", "project_urls": { "Homepage": "https://github.com/zalando/lizzy" }, "release_url": "https://pypi.org/project/lizzy/2.5.4/", "requires_dist": [ "connexion (==1.1.5)", "environmental (>=1.1)", "decorator", "pytz", "pyyaml", "stups-senza (>=1.0.40)", "uwsgi", "flask (==0.11.1)", "metricz (==0.1.4)", "raven" ], "requires_python": "", "summary": "REST Service to deploy AWS CF templates using Senza", "version": "2.5.4" }, "last_serial": 2798750, "releases": { "1.0": [], "1.3.1": [ { "comment_text": "", "digests": { "md5": "3f11080e6c60508592d5a6f3524b2bb3", "sha256": "e7e74880cfd50049265d68eff9c1bfb17f33639007df04f17e624bd4ff127766" }, "downloads": -1, "filename": "lizzy-1.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "3f11080e6c60508592d5a6f3524b2bb3", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 23433, "upload_time": "2016-02-25T07:41:36", "url": "https://files.pythonhosted.org/packages/d0/25/89dc66a06b342c8361cc172bb0f1c014196eaa1697c141c0c0422d24a0fc/lizzy-1.3.1-py3-none-any.whl" } ], "1.8.2": [ { "comment_text": "", "digests": { "md5": "8263afbbac855368c6cb1e67160d5044", "sha256": "a7856bdea90c9437eddf55277b5d6ccf5a263c952f2db51ab7268df629137639" }, "downloads": -1, "filename": "lizzy-1.8.2-py3-none-any.whl", "has_sig": false, "md5_digest": "8263afbbac855368c6cb1e67160d5044", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 24452, "upload_time": "2016-04-13T09:14:13", "url": "https://files.pythonhosted.org/packages/e5/38/780540361e34cc8158b46296636bb94b0d0d422e9a599969d3f1ca779644/lizzy-1.8.2-py3-none-any.whl" } ], "2.5.3": [ { "comment_text": "", "digests": { "md5": "197de08b9aba1600111116f4feb97d6a", "sha256": "67dd66a351c2e45f1fd76684c18417ddad114357086ffaa1ca114e0263545e66" }, "downloads": -1, "filename": "lizzy-2.5.3-py3-none-any.whl", "has_sig": false, "md5_digest": "197de08b9aba1600111116f4feb97d6a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 27134, "upload_time": "2017-03-10T10:27:25", "url": "https://files.pythonhosted.org/packages/f6/03/38fcd5484f68bdafaab5a9d46b09f3f1dcc7a7c7a424a82f6f1fe394bf64/lizzy-2.5.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "782f550cc87950558b362d1a59a5baa4", "sha256": "e3bacfc75d2849d381e43fa141459f254930c670edaa2b8fe1b4290f83d47ce5" }, "downloads": -1, "filename": "lizzy-2.5.3.tar.gz", "has_sig": false, "md5_digest": "782f550cc87950558b362d1a59a5baa4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16569, "upload_time": "2017-03-10T10:27:26", "url": "https://files.pythonhosted.org/packages/13/16/4261436c6390658b0c8278af29496f546fe6aa5a3992a00c874a6a6adeda/lizzy-2.5.3.tar.gz" } ], "2.5.4": [ { "comment_text": "", "digests": { "md5": "9e11f4a8ae99d7348343f5d22e34ec56", "sha256": "c5acafd57d2d5f65996f9104e6d1844a4db01b8472296ad7c31182d6788fdf90" }, "downloads": -1, "filename": "lizzy-2.5.4-py3-none-any.whl", "has_sig": false, "md5_digest": "9e11f4a8ae99d7348343f5d22e34ec56", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 27137, "upload_time": "2017-04-12T12:13:05", "url": "https://files.pythonhosted.org/packages/ad/b1/75fa30c7d4a19d3ee4218a341c85a6a54d782859238a106889704b3e30c3/lizzy-2.5.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "58015eacf005663f9bf1a31d1429e061", "sha256": "7336eb9cf4d7da303370382c1b4d4cc9ba0bd2f81273373a708f2358aaff110a" }, "downloads": -1, "filename": "lizzy-2.5.4.tar.gz", "has_sig": false, "md5_digest": "58015eacf005663f9bf1a31d1429e061", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16574, "upload_time": "2017-04-12T12:13:07", "url": "https://files.pythonhosted.org/packages/53/4e/6ffc320641e52eb4910297318a12fd4ab4333bc5fd4c81830c0fa0b318f2/lizzy-2.5.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9e11f4a8ae99d7348343f5d22e34ec56", "sha256": "c5acafd57d2d5f65996f9104e6d1844a4db01b8472296ad7c31182d6788fdf90" }, "downloads": -1, "filename": "lizzy-2.5.4-py3-none-any.whl", "has_sig": false, "md5_digest": "9e11f4a8ae99d7348343f5d22e34ec56", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 27137, "upload_time": "2017-04-12T12:13:05", "url": "https://files.pythonhosted.org/packages/ad/b1/75fa30c7d4a19d3ee4218a341c85a6a54d782859238a106889704b3e30c3/lizzy-2.5.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "58015eacf005663f9bf1a31d1429e061", "sha256": "7336eb9cf4d7da303370382c1b4d4cc9ba0bd2f81273373a708f2358aaff110a" }, "downloads": -1, "filename": "lizzy-2.5.4.tar.gz", "has_sig": false, "md5_digest": "58015eacf005663f9bf1a31d1429e061", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16574, "upload_time": "2017-04-12T12:13:07", "url": "https://files.pythonhosted.org/packages/53/4e/6ffc320641e52eb4910297318a12fd4ab4333bc5fd4c81830c0fa0b318f2/lizzy-2.5.4.tar.gz" } ] }