Tools for a BeeKeeper worker drone to report status back to the hive.
Project description
Waggle
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 --env-file=.env <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:
The pybee/general channel on Gitter.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file waggle-0.2.3.tar.gz
.
File metadata
- Download URL: waggle-0.2.3.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1be9cd7c4f78ccd87bf0983bae7dfc8665694fdc4987d45e356c159f92aea4e2 |
|
MD5 | 9e18b447978c4c1d0af9e93874c657c9 |
|
BLAKE2b-256 | 43b638a1fc30f569b977c5c4e5ad74bcaec3562ecbdf0bf07346a7c4a9e1ebe0 |
Provenance
File details
Details for the file waggle-0.2.3-py2.py3-none-any.whl
.
File metadata
- Download URL: waggle-0.2.3-py2.py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0350fdb42c98f08f982223334007ac74667316759a74a8eec9fd842b3fb26c2 |
|
MD5 | 07ebaf6b1f573b0e17838984baa0693b |
|
BLAKE2b-256 | 8aeb38ec518dcda4cf369f49b152016c5d77c836ebf95394a788f427ab9db9b9 |