Skip to main content

https://kuma.readthedocs.io/en/latest/deploy.html as a script

Project description

kuma-deployer

In the ancient times of roaming saber tooth tigers and the smog over London hanging deep there was a time the poor serfs of Kuma had to trudge through https://kuma.readthedocs.io/en/latest/deploy.html like some Kafkaesque slave of the man. That was then. This is now.

Everything that can be automated in the Kuma deploy process is scripted here.

Limitations and caveats

Hopefully, all temporary limitations and caveats.

There are some things that are hard to do such as pulling information out of Jenkins since it requires authentication and VPN.

The other thing is that all the current commands are independent and users need to know which order to run them. Ideally, it should all be wrapped up into one single command but that's a little bit tricky since it requires waiting and external checking.

Getting started

You'll need a GitHub access token. Go to github.com/settings/tokens and create a token, copy and paste it into your .env file or use export. E.g.

cat .env
GITHUB_ACCESS_TOKEN=a36f6736...

pip install kuma-deployer
kuma-deployer --help

If you don't use a .env file you can use:

GITHUB_ACCESS_TOKEN=a36f6736... kuma-deployer --help

NOTE! The .env file (with the GITHUB_ACCESS_TOKEN) needs to be in the current working directory. I.e. where you are when you run kuma-deployer. So not necessarily where your kuma directory is (if these two are different).

Goal

The goal is that you simply install this script and type kuma-deploy and sit back and relax and with a bit of luck MDN is fully upgraded, deployment, and enabled.

Contributing

Clone this repo then run:

pip install -e ".[dev]"

That should have installed the CLI kuma-deployer

kuma-deployer --help

If you wanna make a PR, make sure it's formatted with black and passes flake8.

You can check that all files are flake8 fine by running:

flake8 deployer

And to check that all files are formatted according to black run:

black --check deployer

All of the code style stuff can be simplified by installing therapist. It should get installed by default, but setting it up as a git pre-commit hook is optional. Here's how you set it up once:

therapist install

Now, next time you try to commit a .py file with a black or flake8 violation it will remind you and block the commit. You can override it like this:

git commit -a -m "I know what I'm doing"

To run all code style and lint checkers you can also use therapist with:

therapist run --use-tracked-files

Some things can't be automatically fixed, but black violations can for example:

therapist run --use-tracked-files --fix

Contributing and using

If you like to use the globally installed executable kuma-deployer but don't want to depend on a new PyPI release for every change you want to try, use this:

# If you use a virtualenv, deactivate it first
deactive
# Use the global pip (or pip3) on your system
pip3 install -e .

If you do this, you can use this repo to install in your system.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kuma-deployer-0.2.6.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

kuma_deployer-0.2.6-py2.py3-none-any.whl (17.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file kuma-deployer-0.2.6.tar.gz.

File metadata

  • Download URL: kuma-deployer-0.2.6.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4

File hashes

Hashes for kuma-deployer-0.2.6.tar.gz
Algorithm Hash digest
SHA256 3fa1212d414bf4ae6646e778b7424d0ae4fa390caa077152607a078d7e29f306
MD5 3b8812b38154143776b68d77f0acd3ea
BLAKE2b-256 03e9d1828882ec139dbe7fd9658e75fdf797c56aa14d8f1e5b093fee868f79c2

See more details on using hashes here.

File details

Details for the file kuma_deployer-0.2.6-py2.py3-none-any.whl.

File metadata

  • Download URL: kuma_deployer-0.2.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4

File hashes

Hashes for kuma_deployer-0.2.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4c0f8d5c8aceb609a2994cb17854313eea52a9c73b13d18ae2cf4edec41c417b
MD5 d6f533934c57dcd5680162e203b7cf6e
BLAKE2b-256 e552893bcbce393c9fe1570e84841c07f4427893f7defe0ff8fa5e4fc40db06f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page