Skip to main content

Tools for a BeeKeeper worker drone to report status back to the hive.

Project description

http://pybee.org/project/projects/tools/waggle/waggle.png

Waggle

https://img.shields.io/pypi/pyversions/waggle.svg https://img.shields.io/pypi/v/waggle.svg https://img.shields.io/pypi/status/waggle.svg https://img.shields.io/pypi/l/waggle.svg https://travis-ci.org/pybee/waggle.svg?branch=master https://badges.gitter.im/pybee/general.svg

Prepare and upload Docker images for use by BeeKeeper.

Quickstart

Create a directory, and in that directory place a Dockerfile, along with any files required by the Dockerfile.

Optionally, you can also put an ecs.json file in the directory. The ecs.json file should contains a JSON definition of any ECR container settings that you want task to have. For example, if you wanted to specify a particular memory and CPU usage profile for the task, you would specify:

{
    memory: 50,
    cpu: 8192
}

These settings will be used as overrides for the default container settings used by BeeKeeper.

Then, create a file named .env in your current working directory that contains the following content:

AWS_ECS_REGION_NAME=<Your AWS region (e.g., us-west-2)>
AWS_ACCESS_KEY_ID=<Your AWS access key>
AWS_SECRET_ACCESS_KEY=<Your AWS secret access key>

Then, run:

$ waggle <path to docker image directory>

This will:

  • Log into AWS ECR

  • Find (or create) an AWS ECR repository for your image

  • Build the Docker image

  • Tag the image for publication to AWS ECR

  • Push the image to AWS ECR

  • Register (or update) an AWS ECS task that uses the image.

If your Docker image is contained in a directory called myimage, your BeeKeeper configuration will now be able to reference a task image of myimage.

Testing

Before you waggle your task, you’re probably going to want to test it.

  • To build an image locally:

    $ cd <directory with a Dockerfile in it>
    $ docker build -t <namespace>/<image> .
  • To run an image locally:

    $ docker run <namespace>/<image>

    If your docker image requires environment variables (all the Beekeeper ones do), you may find it easier to put all those variables in a file (e.g., .env), and run:

    $ docker run --env-file=.env <namespace>/<image>

    To temporarily define a variable for the duration of the test:

    $ VARIABLE=value docker run --env-file=.env <namespace>/<image>
  • To clean up afterwards, run:

    $ docker ps -a

    to list all the containers that have been executed, and:

    $ docker rm $(docker ps -aq)

    to remove all the stale containers.

Community

Waggle is part of the BeeWare suite. You can talk to the community through:

We foster a welcoming and respectful community as described in our BeeWare Community Code of Conduct.

Contributing

If you experience problems with Waggle, log them on GitHub. If you want to contribute code, please fork the code and submit a pull request.

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

waggle-0.1.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

waggle-0.1.1-py2.py3-none-any.whl (7.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file waggle-0.1.1.tar.gz.

File metadata

  • Download URL: waggle-0.1.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for waggle-0.1.1.tar.gz
Algorithm Hash digest
SHA256 73cdadc2ffcb8dce98931e4df89e645a30a97722c690528fd3acf7d6f670e02d
MD5 a875a61f4420253f7f5d8556971e5ef2
BLAKE2b-256 a252f6dca83313c7587227af1a2d232f4f51ad5a9fe655c1946ee64629efb4e3

See more details on using hashes here.

Provenance

File details

Details for the file waggle-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for waggle-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 04a17c893104d491adde097bbea8193ca58c733d2d9eb4553fe0712c891ab362
MD5 a0bba3da80a2bab430ee54f9233db1b7
BLAKE2b-256 a39b55e7c3eb61919e0b73b27dc4f55bad18e804b480d698957381b9582d4eae

See more details on using hashes here.

Provenance

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