Skip to main content

Output notes for a Kubernetes deployment

Project description

github latest release pypi latest package docker latest image project license

dok8s CI dok8s CD security scan pre-commit

code coverage code alerts code quality code style

dok8s

dok8s: Output notes for a Kubernetes deployment.

Contents

  1. Use Case
  2. Configuration
  3. Development
  4. Testing
  5. Versioning
  6. Deployment
  7. Production

Use Case

A collection of output notes for Kubernetes deployments.
Input: [TODO].
Output: [TODO].

Requirements

  • [TODO]

Assumptions

  • [TODO]

Design

[TODO]

Configuration

Behaviour of the application can be configured via Environment Variables.

Environment Variable Description Type Default Value
DOK8S_LOG_LEVEL Level of logging - overrides verbose/quiet flag string -
DOK8S_LOG_DIR Directory to save logs string -
DOK8S_BIN_DIR Directory to save any output (bin) string bin

Development

Configure for local development

  • Clone repo on your local machine
  • Install conda or miniconda
  • Create your local project environment (based on conda, poetry, pre-commit):
    $ make env
  • (Optional) Update existing local project environment:
    $ make env-update

Run locally

On a terminal, run the following (execute on project's root directory):

  • Activate project environment:
    $ . ./scripts/helpers/environment.sh
  • Run the CLI using poetry:
    $ poetry run dok8s

Contribute

[ Not Available ]

Testing

(part of CI/CD)

[ Work in progress... ]

To run the tests, open a terminal and run the following (execute on project's root directory):

  • Activate project environment:
    $ . ./scripts/helpers/environment.sh
  • To run pytest:
    $ make test
  • To check test coverage:
    $ make test-coverage

Versioning

Increment the version number:
$ poetry version {bump rule}
where valid bump rules are:

  1. patch
  2. minor
  3. major
  4. prepatch
  5. preminor
  6. premajor
  7. prerelease

Changelog

Use CHANGELOG.md to track the evolution of this package.
The [UNRELEASED] tag at the top of the file should always be there to log the work until a release occurs.

Work should be logged under one of the following subtitles:

  • Added
  • Changed
  • Fixed
  • Removed

On a release, a version of the following format should be added to all the current unreleased changes in the file.
## [major.minor.patch] - YYYY-MM-DD

Deployment

Pip package

On a terminal, run the following (execute on project's root directory):

  • Activate project environment:
    $ . ./scripts/helpers/environment.sh
  • To build pip package:
    $ make build-package
  • To publish pip package (requires credentials to PyPi):
    $ make publish-package

Docker image

On a terminal, run the following (execute on project's root directory):

  • Activate project environment:
    $ . ./scripts/helpers/environment.sh
  • To build docker image:
    $ make build-docker

Production

For production, a Docker image is used. This image is published publicly on docker hub.

  • First pull image from docker hub:
    $ docker pull nichelia/dok8s:[version]
  • First pull image from docker hub:
    $ docker run --rm -it -v ~/dok8s_bin:/usr/src/bin nichelia/dok8s:[version]
    This command mounts the application's bin (outcome) to user's root directory under dok8s_bin folder.

where version is the published application version (e.g. 0.1.0)

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

dok8s-0.0.3.tar.gz (13.6 kB view hashes)

Uploaded Source

Built Distribution

dok8s-0.0.3-py3-none-any.whl (17.6 kB view hashes)

Uploaded Python 3

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