Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

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://beekeeper.herokuapp.com/projects/pybee/waggle/shield 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_REGION=<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 -e VARIABLE <namespace>/<image>

    To mount a local directory as the source code directory:

    $ docker run -v `pwd`:/app/src <namespace>/<image>
  • To start the container with an interactive prompt:

    $ docker run -it –env-file=.env <namespace>/<image> /bin/bash

  • 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.

Metadata

Release files for waggle 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for waggle 0.2.4
File Size Uploaded
waggle-0.2.4.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for waggle 0.2.4
File Interpreter ABI Platform
waggle-0.2.4-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 16.9 kB

Release files / waggle-0.2.4.tar.gz

Download URL waggle-0.2.4.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b833e2ad9a02c426ee6e6b259702d2266fc78dd2d50f89159d89673b88f3273a
BLAKE2b-256 checksum
How to use checksums
cad38816bc9563f2261ea483492209323a73fbda871185c19373e6f17e3d8f95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / waggle-0.2.4-py2.py3-none-any.whl

Download URL waggle-0.2.4-py2.py3-none-any.whl
Size 8.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
2000e8b0211362b616b33b6bb3a395d1178475fd0bd63a8e0f05cf3498143495
BLAKE2b-256 checksum
How to use checksums
d53496e85aac6291209b04f77bcefbfcfd2af5480bc343c481e6889ba227fb58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page