blacklabelops/swarm-aws
Jenkins Slave Container with Amazon WS CLI
1.5K
Jenkins Slave Container with Amazon WS CLI
Check this project on how to configure a swarm slave: blacklabelops/jenkins-swarm
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.
$ ecs-cli configure --region $AWS_DEFAULT_REGION --access-key $AWS_ACCESS_KEY_ID --secret-key $AWS_SECRET_ACCESS_KEY --cluster cluster_name
docker pull blacklabelops/swarm-aws