streamlining agile linux development with docker and rhel atomic
TRANSCRIPT
4
Test before you pushSyntax, Workflow, Unit Tests
Test after you pushReproducibility, Build Environments, Unit Tests
Test before you deployIntegration Tests, Performance Tests, Merge Tests
Continuous IntegrationDid I just break something?
5
Code moves through a set of manual and automated gates in a feature branch before being committed to the master branch.
Example CI Pipelineused by OpenStack Nova project
6
Installs Django library, validates data models, and runs unit tests.
Example Jenkins Build Scriptfor Django application
/usr/bin/virtualenv venvsource venv/bin/activatepip install -r requirements.txtpython manage.py validatepython manage.py syncdb --noinputpython manage.py test
7
Package the codePrepare the code for distribution
Deploy the packagePush the package to the production environment
Test the deployment in productionQA the deployed application
Continuous DeliveryIt works - deploy it for me.
8
Example Jenkins Deploy Processfor Django application
● Package the application (either pypi or RPM)– rpmbuild -bb build/package.spec
● Push the package to an application repository– scp build/*.rpm yum@repo
● Pull the package down to an integration environment– ssh host yum -y update
● Restart services on the integration environment– ssh host service httpd restart
9
In the traditional deployment model, a subset of servers are updated with the latest build and put through UAT. Then the load balancer cuts over the new build.
Production Rolloutfor Django application behind load balancer
11
Consistent Delivery Format No wars, jars, ears, tars, or RPMs.
Consistent Packaging DefinitionDockerfiles are stored alongside code and are human readable
Built-in Deployment InfrastructureDocker Registries simplify application deployment
Introducing DockerDocker simplifies the delivery pipeline
15
Example Jenkins Deploy Processfor Django application with Docker
● Copy the source into a new Docker image– ADD . /webapps/polls/
● Build the new Docker image– docker build -t rhel6-django16-polls .
● Tag the Docker image– docker tag rhel6-django16-polls:$BUILD_NUMBER
● Push the image to the registry– docker push ...
● Run the new image alongside the existing image
16
In the docker deployment model, all servers run both the latest build and production build during UAT.
Production Rollout with Dockerfor Django application behind load balancer
For more information on Docker in RHEL:http://red.ht/1Gk9w62
RH_PREStemp_light_v1_0324
INSERT DESIGNATOR, IF NEEDED 18
THANK YOU
plus.google.com/+RedHat
linkedin.com/company/red-hat
youtube.com/user/RedHatVideos
facebook.com/redhatinc
twitter.com/RedHatNews