Skip to main content

A Docker and AWS utility package

Project description

dokr - Make your docker and ecs tasks easy

A Helper pip package for docker and ECS tasks. This pip package helps you automate your CI/CD pipeline. If your using docker and Amazon ECS for deployments, this tool can be really helpful. This package uses aws cli and ecs cli. Mak

Assumptions:

  • Assuming python is installed on your system.
  • Docker is installed on your system
  • aws-cli is installed and credentials are configured on your system.
  • ecs-cli is installed on system [For Log Command only]

Install dokr on your system using :

pip install dokr

ECS Options

  • login into ecs directly (Assuming awscli is installed and configured)
dokr ecs login

alt dokr_aws_ip

  • Deploy an image on a cluster
dokr ecs deploy --cluster cluster_name --service service_name --tag image_version

alt dokr_aws_ip

  • Check ecs running logs of a Task - this command will ask for cluster/service and task defination.

Note: Install ecs-cli before running this command from here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI_installation.html

dokr ecs log

alt dokr_aws_ip

Docker Helper Commands

  • Prune whole system - Cleans unused images, containers and volumes.
dokr dock --clean-all

alt dokr_aws_ip

  • Delete all the images matching the pattern
dokr dock --clean pattern_xxx

alt dokr_aws_ip

  • Add a tag to the existing image matching the provided pattern (for latest tag only)
dokr dock --tag pattern_xxx tag_name

alt dokr_aws_ip

  • Push all images on a system matching a pattern

This will push all images matching pattern 'pat'

dokr dock --push pat

alt dokr_aws_ip

AWS Commands

  • Check current public ip of a machine on AWS
dokr aws --ip jenkins 

alt dokr_aws_ip

Run Apps (subsitute to docker run command and DockerCompose)

  • Configure your default values(like docker registry, port mapping, volume mapping etc. that will be same for all apps):

alt dokr_aws_ip

  • Add an new app for deployment:

alt dokr_aws_ip

  • Run all configured apps:

alt dokr_aws_ip

  • Run a particular app from ECR tags:

alt dokr_aws_ip

  • Run a particular app by providing a tag:

alt dokr_aws_ip

Development:

  • Clean ununsed: rm -rf build/ dist/ *egg* **.pyc __pycache__
  • Build package: python setup.py bdist_wheel
  • deploy package: python -m twine upload dist/*

follow this link for more details https://dzone.com/articles/executable-package-pip-install

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

dokr-1.7.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

dokr-1.7-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file dokr-1.7.tar.gz.

File metadata

  • Download URL: dokr-1.7.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for dokr-1.7.tar.gz
Algorithm Hash digest
SHA256 bc57c458fce41f7c61e5fa1c98fd612aa5dd6e7a8f410c60a54a2e029c787f4d
MD5 88f16859c4622d71ff97f143c60d8f2e
BLAKE2b-256 41ee561fc06e9353498e2a3b0dff4146b415a09489b2b490aae2d49603b1e953

See more details on using hashes here.

File details

Details for the file dokr-1.7-py3-none-any.whl.

File metadata

  • Download URL: dokr-1.7-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for dokr-1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b21e15460a9eacf95b72bb7f41ecae10cc7ad5fe6d058a34fa5562b52b25804d
MD5 c2d795f19ce19691487da5d5412ce2b6
BLAKE2b-256 c0c1e914195b1b70d4c394eaae11e65c4cf02c6240b6a5520c6391019fb29972

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