Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Rocket Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker Docker
Created by Paul Czarkowski / @pczarkowski
Private CI/CD using Docker, Deis, and Drone
Created by Paul Czarkowski / @pczarkowski
Excellent tooling/documentation for installing.
Installs on AWS as easily as:
$ ./provision-ec2-cluster.sh
{
"StackId": "arn:aws:cloudformation:us-west-1:413516094235:stack/deis/9699ec20-c257-11e3-99eb-50fa01cd4496"
}
Your Deis cluster has successfully deployed.
Please wait for all instances to come up as "running" before continuing.
$ export DEISCTL_TUNNEL="deis-1.example.com"
$ deisctl install platform
● ▴ ■
■ ● ▴ Installing Deis...
▴ ■ ●
Scheduling data containers...
...
Deis installed.
Please run `deisctl start platform` to boot up Deis.
$ git clone https://github.com/paulczar/example-python-flask.git
$ cd example-python-flask
$ deis create
$ git push deis master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 287 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
-----> Python app detected
...
...
-----> Launching...
done, gifted-hardtack:v11 deployed to Deis
http://gifted-hardtack.173.247.105.8.xip.io
$ curl http://gifted-hardtack.173.247.105.8.xip.io
POWERED By Deis
Very similar to .travis.yml
image: python:2
script:
- pip install tox
- tox
notify:
slack:
username: devop
token: {{ slack_token }}
team: cloud_austin
deploy:
git:
target: ssh://git@deis.173.247.105.8.xip.io:2222/gifted-hardtack.git
branch: master
force: false
+---------------------------------+ | | | +----------------+ | | | | | | | SQLite | | | | | | | +----------------+ | | | | +----------------+ | | | | | | | Droned | | | | | | | +----------------+ | | | | +----------------+ | | | | | | | Docker | | | | | | | +----------------+ | | | | | | Ubuntu | | | +---------------------------------+
+---------------------------------+ | | | Amazon ELB | | | +------------------+--------------+ | +----------------------+ +--------------------+ +---------------+ | | | | | | | | +--------+-------+ | | +--------------+ | | Amazon | <--------+ | | | | | | | | RDS | | | Droned | +----------> | Docker | | | | | | | | | | | | +---------------+ | +-------++-------+ | | +--------------+ | | || | | | | +-------++-------+ | | | | | | | | CoreOS | | | Docker | | | | | | | | +--------------------+ | +----------------+ | | | | | | CoreOS | | | +----------------------+
Quick and Easy:
$ curl -Ssl http://get.docker.com | bash
$ wget downloads.drone.io/master/drone.deb
$ sudo dpkg -i drone.deb
DevOpsy:
from the CLI
$ git clone https://github.com/paulczar/example-python-flask.git
$ cd example-python-flask
$ drone build .
[DRONE] creating build image
[DRONE] copying repository to /var/cache/drone/src/example-python-flask
[DRONE] starting build
[DRONE] temp directory is /tmp/drone
$ pip install tox
Downloading/unpacking tox
Running setup.py egg_info for package tox
Downloading/unpacking virtualenv>=1.11.2 (from tox)
Running setup.py egg_info for package virtualenv
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.17 in /home/ubuntu/virtualenv/python2.7/lib/python2.7/site-packages (from tox)
...
...
$ tox
pep8 create: /var/cache/drone/src/example-python-flask/.tox/pep8
pep8 installdeps: -r/var/cache/drone/src/example-python-flask/requirements.txt, -r/var/cache/drone/src/example-python-flask/test-requirements.txt
pep8 runtests: PYTHONHASHSEED='187694681'
pep8 runtests: commands[0] | pep8 --show-source --show-pep8 .
___________________________________ summary ____________________________________
pep8: commands succeeded
congratulations :)
$ exit 0
[DRONE] removing build container
[DRONE] removing build image
Drone Build Results (/tmp/example-python-flask)
✓ (15 seconds)