live slides @ tinyurl.com/pycon8-cd
behave-django
codeship-yaml
sentrylogs
django-apptemplates
djangocms-maps
.
As a coach you do:
30%
20%
15%
5%
10%
15%
5%
... a set of practices and principles ... building, testing, and releasing software, faster and more frequently
... put release schedule in the hands of the business - not IT
Text
Satisfy the customer!
Tests are fundamental for build pipeline.
TDD good practice
BDD helpful for acceptance
Selenium / performance
!! risk !!
Containers make process easier.
Optional, but makes it easier
Container images built by pipeline
Push complete system
Definition: https://painless.software/continuous-delivery
So, in future, we will:
All in a matter of minutes
No fear to break anything
Happy devs + clients
Someone needs to ship it.
push code
open PR/MR
approve
build
review
feature
production
system
branch
server
system
Someone needs to maintain it.
*
Self-explanatory procedures
Don't break conventions
Make developers love it!
Someone needs to build it.
CI Services: http://alternativeto.net/software/travis-ci/
Registries: http://alternativeto.net/software/docker-hub/
Someone needs to serve it.
Someone needs to babysit it.
Monitoring: http://alternativeto.net/software/sentry/
Transparency: https://painless.software/transparency
Run project: `docker-compose up`
`manage.py runserver` works too
Run tests: `tox` or `pytest`
language: python
python: 3.5
env:
matrix:
- TOXENV=flake8
- TOXENV=py27
- TOXENV=py35
install: pip install tox
script: tox
deploy:
# magic stuff here
[tox]
envlist = flake8,py27,py35
skipsdist = true
[flake8]
exclude = .cache,.git,.tox,build
max-line-length = 80
[pytest]
addopts = --junitxml=unittests.xml
--strict
version: "2"
services:
webserver:
build: ./config/webserver
application:
build:
context: .
dockerfile: ./config/application/Dockerfile
user: application
database:
image: postgres
[uwsgi]
cheaper = 2
chmod-socket = 660
chown-socket = application:application
enable-threads = True
master = True
processes = 16
python-autoreload = 1
socket = /run/project/uwsgi.sock
wsgi-file =
/opt/project/application/wsgi.py
server {
location / {
include uwsgi_params;
uwsgi_pass
unix:///run/project/uwsgi.sock;
}
location /media {
root /opt/project
}
location /static {
root /opt/project;
}
}
Project Name
============
Awesome demo website for PyCon 8.
Getting Started
---------------
To start developing on this project simply bring up the Docker setup:
.. code-block:: bash
docker-compose up --build -d
docker-compose logs -f
Run `cookiecutter
gh:painless-software/
painless-continuous-delivery`
Then start working immediately!
Grandpa nailed it,
once again.
Just awesome.
I'll tell our developers.
Less pain, more fun.