blacklabelops/swarm-aws

By blacklabelops

Updated almost 7 years ago

Jenkins Slave Container with Amazon WS CLI

Image

1.5K

Jenkins Slave Container with Amazon WS CLI

Check this project on how to configure a swarm slave: blacklabelops/jenkins-swarm

Make It Short!

In short, you can use AmazonWS CLI commands inside a Jenkins slave.

First start a master!

$ docker run -d -p 8090:8080 --name jenkins_jenkins_1 blacklabelops/jenkins

This will pull the my jenkins container ready with swarm plugin and ready-to-use!

Now start the build slave!

$ docker run  \
    -e "AWS_ACCESS_KEY_ID=YOUR_AWS_ACCESS_KEY" \
    -e "AWS_SECRET_ACCESS_KEY=YOUR_SECRET_ACCESS_KEY" \
    -e "AWS_DEFAULT_REGION=eu-central-1" \
    --link jenkins_jenkins_1:jenkins \
    blacklabelops/swarm-aws

CLI commands will be available when you specify the correct aws credentials.

Configuring ECS-Cli

$ ecs-cli configure --region $AWS_DEFAULT_REGION --access-key $AWS_ACCESS_KEY_ID  --secret-key $AWS_SECRET_ACCESS_KEY --cluster cluster_name

References

Docker Pull Command

docker pull blacklabelops/swarm-aws