nameless-deploy-tools


Namenameless-deploy-tools JSON
Version 1.317 PyPI version JSON
download
home_pagehttp://github.com/NitorCreations/nameless-deploy-tools
SummaryTools for deploying to AWS via CloudFormation and Serverless framework that support a pull request based workflow
upload_time2024-03-04 14:48:46
maintainer
docs_urlNone
authorPasi Niemi
requires_python>=3.8
licenseApache 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage
            # Nameless Deploy Tools

[![Build Status](https://api.travis-ci.com/NitorCreations/nameless-deploy-tools.svg?branch=master)](https://app.travis-ci.com/github/NitorCreations/nameless-deploy-tools/)
[![Coverage Status](https://coveralls.io/repos/github/NitorCreations/nameless-deploy-tools/badge.svg?branch=master)](https://coveralls.io/github/NitorCreations/nameless-deploy-tools?branch=master)
[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

## Released version 1.317

Nameless deploy tools are a set of tools to implement a true Infrastructure As Code workflow
with various cloud infrastructure management tools. Currently supported tools are
CloudFormation, AWS CDK, Serverless Framework, Terraform, Azure Resource Manager (with
a YAML syntax) and Bicep.

## Why Nameless?

A common analogy for cloud infrastructure has been to move from having pets with
names that need lots of looking after, to cattle that has at most id's. It's time
to move to the industrial age from the agrarian era. The infrastructure our
applications runs now comes and goes, and we know at most some statistical information
about the actual executions. Run times, memory usage, used bandwidth and the like.
We no longer know even the id's of the things that actually run the code. Hence -
nameless.

## Rationale

We at Nitor are software engineers with mostly a developer or architect background, but
a lot of us have had to work closely with various Operations teams around the world.
DevOps has a natural appeal to us and immediately "infrastructure as code" meant for us
that we should apply the best development practices to infrastructure development. It starts
with version control and continues with testing new features in isolation and a workflow
that supports this. Our teams usually take into use a feature branch workflow if it is
feasible, and we expect all the tools and practices to support this. For infrastructure
this type of branching means that you should be able to spin up enough of the infrastructure
to be able to verify the changes you want to implement in production. Also, the testing
environment should be close enough to the target environment for the results to be valid.
So the differences between testing and production environments should be minimized and
reviewable.

With the popular tools like Ansible, Terraform, Chef etc. you need to come up with and
implement the ways to achieve the goals above. As far as I know, no tool besides ndt
has at its core a thought-out way of a branching infrastructure development model.

## What it is

nameless-deploy-tools works by defining _Amazon Machine Images_, _[Docker containers](https://www.docker.com)_,
_[Serverless services](https://serverless.com)_ and deploying _[CloudFormation](https://aws.amazon.com/cloudformation/)
stacks_ of resources. CloudFormation stacks can also be defined with _[AWS CDK](https://awslabs.github.io/aws-cdk/)_
applications. All of the above can also be deployed using _[Terraform](https://www.terraform.io)_.

## Installation

```shell
pip install nameless-deploy-tools
```

Requires Python 3.8 or newer.

## Getting started

To use nameless-deploy-tools you need to set up a _project repository_ that
describes the images you want to build, and the stacks you want to deploy them in. See
[ndt-project-template](https://github.com/NitorCreations/ndt-project-template)
for an example.

Here are few commands you can use. All of these are run in your project repository root.
You need to have AWS credentials for command line access set up.

* To bake a new version of an image: `ndt bake-image <image-name>`
* To build a new Docker container image `ndt bake-docker <component> <docker-name>`
* To deploy a stack:
  * with a known AMI id: `ndt deploy-stack <image-name> <stack-name> <AMI-id>`
  * with the newest AMI id by a given bake job: `ndt deploy-stack <image-name> <stack-name> "" <bake-job-name>`
* To undeploy a stack: `ndt undeploy-stack <image-name> <stack-name>`

For full list of commands see [here](docs/commands.md)

You can additionally use a faster register-complete by running `./faster_register_complete.sh`.
This compiles a C++ program from the file [nameless-dt-register-complete.cpp](n_utils/nameless-dt-register-complete.cpp),
and replaces the Python version of `nameless-dt-register-complete` with it.

## Documentation

* [Command Reference](docs/commands.md)
* [ndt workspace tooling](docs/workspace.md)
* [Template Pre-Processing](docs/template-processing.md)
* [Multifactor Authentication](docs/mfa.md)
* [Common parameters](docs/parameters.md)

## Versioning

This library uses a simplified semantic versioning scheme: major version change for changes
that are not backwards compatible (not expecting these) and the minor
version for all backwards compatible changes. We won't make the distinction between
new functionality and bugfixes, since we don't think it matters and is not a thing
worth wasting time on. We will release often and if we need changes that are not comptatible,
we will fork the next major version and release alphas versions of that until we are
happy to release the next major version and try and have a painless upgrade path.

## Dependencies

Python dependencies are specified in [setup.cfg](./setup.cfg).
[pip-compile](https://github.com/jazzband/pip-tools/) is used to generate the `requirements.txt` file.
To update the requirements, use the following commands:

```shell
pipx install pip-tools
pip-compile setup.py
```

Note: pip-compile needs to run inside a virtual environment.
Create and activate one before using it.

## Code formatting and linting

This project uses [Black](https://github.com/psf/black) together with [isort](https://github.com/PyCQA/isort) for Python code formatting,
and [ruff](https://github.com/astral-sh/ruff) for linting.
They are configured with a custom line length limit of 120.

Usage:

```shell
pip install --upgrade black isort ruff
black .
isort .
ruff --fix .
```

These can also be integrated to IDEs / editors or run as a pre-commit hook.
See the documentation for example for Black [here](https://black.readthedocs.io/en/stable/integrations/editors.html).
VS Code has built-in support for [Black](https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter),
[isort](https://marketplace.visualstudio.com/items?itemName=ms-python.isort),
and [ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff) through official plugins.

Using with [pre-commit](https://pre-commit.com/):

```shell
# setup to be run automatically on git commit
pre-commit install

# run manually
pre-commit run --all-files
```

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/NitorCreations/nameless-deploy-tools",
    "name": "nameless-deploy-tools",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Pasi Niemi",
    "author_email": "Pasi Niemi <pasi@nitor.com>",
    "download_url": "https://files.pythonhosted.org/packages/f9/b3/9444fdc80565de0ee7d73f5706ae36a1db255e5271c70cd773b0fcd8f2bf/nameless-deploy-tools-1.317.tar.gz",
    "platform": null,
    "description": "# Nameless Deploy Tools\n\n[![Build Status](https://api.travis-ci.com/NitorCreations/nameless-deploy-tools.svg?branch=master)](https://app.travis-ci.com/github/NitorCreations/nameless-deploy-tools/)\n[![Coverage Status](https://coveralls.io/repos/github/NitorCreations/nameless-deploy-tools/badge.svg?branch=master)](https://coveralls.io/github/NitorCreations/nameless-deploy-tools?branch=master)\n[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n## Released version 1.317\n\nNameless deploy tools are a set of tools to implement a true Infrastructure As Code workflow\nwith various cloud infrastructure management tools. Currently supported tools are\nCloudFormation, AWS CDK, Serverless Framework, Terraform, Azure Resource Manager (with\na YAML syntax) and Bicep.\n\n## Why Nameless?\n\nA common analogy for cloud infrastructure has been to move from having pets with\nnames that need lots of looking after, to cattle that has at most id's. It's time\nto move to the industrial age from the agrarian era. The infrastructure our\napplications runs now comes and goes, and we know at most some statistical information\nabout the actual executions. Run times, memory usage, used bandwidth and the like.\nWe no longer know even the id's of the things that actually run the code. Hence -\nnameless.\n\n## Rationale\n\nWe at Nitor are software engineers with mostly a developer or architect background, but\na lot of us have had to work closely with various Operations teams around the world.\nDevOps has a natural appeal to us and immediately \"infrastructure as code\" meant for us\nthat we should apply the best development practices to infrastructure development. It starts\nwith version control and continues with testing new features in isolation and a workflow\nthat supports this. Our teams usually take into use a feature branch workflow if it is\nfeasible, and we expect all the tools and practices to support this. For infrastructure\nthis type of branching means that you should be able to spin up enough of the infrastructure\nto be able to verify the changes you want to implement in production. Also, the testing\nenvironment should be close enough to the target environment for the results to be valid.\nSo the differences between testing and production environments should be minimized and\nreviewable.\n\nWith the popular tools like Ansible, Terraform, Chef etc. you need to come up with and\nimplement the ways to achieve the goals above. As far as I know, no tool besides ndt\nhas at its core a thought-out way of a branching infrastructure development model.\n\n## What it is\n\nnameless-deploy-tools works by defining _Amazon Machine Images_, _[Docker containers](https://www.docker.com)_,\n_[Serverless services](https://serverless.com)_ and deploying _[CloudFormation](https://aws.amazon.com/cloudformation/)\nstacks_ of resources. CloudFormation stacks can also be defined with _[AWS CDK](https://awslabs.github.io/aws-cdk/)_\napplications. All of the above can also be deployed using _[Terraform](https://www.terraform.io)_.\n\n## Installation\n\n```shell\npip install nameless-deploy-tools\n```\n\nRequires Python 3.8 or newer.\n\n## Getting started\n\nTo use nameless-deploy-tools you need to set up a _project repository_ that\ndescribes the images you want to build, and the stacks you want to deploy them in. See\n[ndt-project-template](https://github.com/NitorCreations/ndt-project-template)\nfor an example.\n\nHere are few commands you can use. All of these are run in your project repository root.\nYou need to have AWS credentials for command line access set up.\n\n* To bake a new version of an image: `ndt bake-image <image-name>`\n* To build a new Docker container image `ndt bake-docker <component> <docker-name>`\n* To deploy a stack:\n  * with a known AMI id: `ndt deploy-stack <image-name> <stack-name> <AMI-id>`\n  * with the newest AMI id by a given bake job: `ndt deploy-stack <image-name> <stack-name> \"\" <bake-job-name>`\n* To undeploy a stack: `ndt undeploy-stack <image-name> <stack-name>`\n\nFor full list of commands see [here](docs/commands.md)\n\nYou can additionally use a faster register-complete by running `./faster_register_complete.sh`.\nThis compiles a C++ program from the file [nameless-dt-register-complete.cpp](n_utils/nameless-dt-register-complete.cpp),\nand replaces the Python version of `nameless-dt-register-complete` with it.\n\n## Documentation\n\n* [Command Reference](docs/commands.md)\n* [ndt workspace tooling](docs/workspace.md)\n* [Template Pre-Processing](docs/template-processing.md)\n* [Multifactor Authentication](docs/mfa.md)\n* [Common parameters](docs/parameters.md)\n\n## Versioning\n\nThis library uses a simplified semantic versioning scheme: major version change for changes\nthat are not backwards compatible (not expecting these) and the minor\nversion for all backwards compatible changes. We won't make the distinction between\nnew functionality and bugfixes, since we don't think it matters and is not a thing\nworth wasting time on. We will release often and if we need changes that are not comptatible,\nwe will fork the next major version and release alphas versions of that until we are\nhappy to release the next major version and try and have a painless upgrade path.\n\n## Dependencies\n\nPython dependencies are specified in [setup.cfg](./setup.cfg).\n[pip-compile](https://github.com/jazzband/pip-tools/) is used to generate the `requirements.txt` file.\nTo update the requirements, use the following commands:\n\n```shell\npipx install pip-tools\npip-compile setup.py\n```\n\nNote: pip-compile needs to run inside a virtual environment.\nCreate and activate one before using it.\n\n## Code formatting and linting\n\nThis project uses [Black](https://github.com/psf/black) together with [isort](https://github.com/PyCQA/isort) for Python code formatting,\nand [ruff](https://github.com/astral-sh/ruff) for linting.\nThey are configured with a custom line length limit of 120.\n\nUsage:\n\n```shell\npip install --upgrade black isort ruff\nblack .\nisort .\nruff --fix .\n```\n\nThese can also be integrated to IDEs / editors or run as a pre-commit hook.\nSee the documentation for example for Black [here](https://black.readthedocs.io/en/stable/integrations/editors.html).\nVS Code has built-in support for [Black](https://marketplace.visualstudio.com/items?itemName=ms-python.black-formatter),\n[isort](https://marketplace.visualstudio.com/items?itemName=ms-python.isort),\nand [ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff) through official plugins.\n\nUsing with [pre-commit](https://pre-commit.com/):\n\n```shell\n# setup to be run automatically on git commit\npre-commit install\n\n# run manually\npre-commit run --all-files\n```\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Tools for deploying to AWS via CloudFormation and Serverless framework that support a pull request based workflow",
    "version": "1.317",
    "project_urls": {
        "Download": "https://github.com/NitorCreations/nameless-deploy-tools/tarball/1.317",
        "Homepage": "http://github.com/NitorCreations/nameless-deploy-tools"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b731d0c4ad372aa7ca8c66cec59a2f8b5b292b567301a97a7a6ec1c6d892a952",
                "md5": "32d5e36c1dfd64091f37d72da0c9be2e",
                "sha256": "cb7007524ffbb8ccc6b240037b1c0fb0e759dcc5bb66c41366c6af1a314fcd42"
            },
            "downloads": -1,
            "filename": "nameless_deploy_tools-1.317-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "32d5e36c1dfd64091f37d72da0c9be2e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 247587,
            "upload_time": "2024-03-04T14:48:42",
            "upload_time_iso_8601": "2024-03-04T14:48:42.549586Z",
            "url": "https://files.pythonhosted.org/packages/b7/31/d0c4ad372aa7ca8c66cec59a2f8b5b292b567301a97a7a6ec1c6d892a952/nameless_deploy_tools-1.317-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f9b39444fdc80565de0ee7d73f5706ae36a1db255e5271c70cd773b0fcd8f2bf",
                "md5": "c70fed269091f0b88bb680c0a6fb6b0a",
                "sha256": "82755348f216b6a7fd3407baa0cbb627be540e67f18dd433915ace12c95eb06f"
            },
            "downloads": -1,
            "filename": "nameless-deploy-tools-1.317.tar.gz",
            "has_sig": false,
            "md5_digest": "c70fed269091f0b88bb680c0a6fb6b0a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 182610,
            "upload_time": "2024-03-04T14:48:46",
            "upload_time_iso_8601": "2024-03-04T14:48:46.974953Z",
            "url": "https://files.pythonhosted.org/packages/f9/b3/9444fdc80565de0ee7d73f5706ae36a1db255e5271c70cd773b0fcd8f2bf/nameless-deploy-tools-1.317.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-04 14:48:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NitorCreations",
    "github_project": "nameless-deploy-tools",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "lcname": "nameless-deploy-tools"
}
        
Elapsed time: 0.20101s