MAKING SOFTWARE
Vaidas Mikalauskas
DEV@DATADOG
THINGS I DO:
Write code
Review / Test code
Fix servers
THINGS I LIKE:
Delete code
Green tests
Do stuff with servers
# failing is first step to succeding
Caproni Ca 60
Antonov A-40
Kalinin K-7
# CHOOSE YOUR WEAPONS
Owner decides them
Developers do not...
Not always...
Flettner airplane
# setup
(docker)
NASA AD-1
php:
image: datadoglt/php56
volumes:
- ".:/var/www"
- "init.sh:/init.sh"
- "app/session:/var/lib/php/session"
links: [mysql]
web:
build: docker/nginx
ports: ["80", "443"]
volumes:
- ".:/var/www"
links: [php]
environment:
VIRTUAL_HOST: giftoff.dev
mysql:
image: mysql
env_file: .env
hostname: mysql
volumes:
- "app/mysql:/var/lib/mysql"To run full development stack:
1 command
# coding
Use GitLab, Github, BitBucket or etc...
Make pull requests
Do code reviews
DO
Work on feature branches
Make master branch protected
Let someone review code
Review it yourself
DONT
Make it personal
Be too strict
Laugh at others code
Lackner HZ-1 Aerocycle
Tests should be fast
If you have tests - always run them
Tests is code, it should be clean
Feature: ls
In order to see the directory structure
As a UNIX user
I need to be able to list the current directory's contents
Scenario: List 2 files in a directory
Given I am in a directory "test"
And I have a file named "foo"
And I have a file named "bar"
When I run "ls"
Then I should get:
"""
bar
foo
"""# production
# application services
# servers
# toolset
Configuratios = Steps X Application X Server
Example:
50 steps
2 developers
production + testing
application + backend
= 400
Current project:
~70 steps per configuration
4 developers
16 production servers + testing + staging
11 applications
~ 10000
Convair XFY Pogo
# provisioning
Automated process of configuring servers
---
- name: MYSQL | INSTALL
apt: name=mysql-server state=present
- name: MYSQL | ENABLE AT STARTUP
service: name=mysql-server state=started enabled=yes
- name: MYSQL | CREATE DATABASES
mysql_db: name={{item}} state=present
with_items:
- app_prod
- app_dev
- name: MYSQL | CREATE USERS
mysql_user: name="john" password="pass" state=present
- name: MYSQL | GRANT PERMISSIONS
mysql_user: name="john" priv=app_prod.*:ALL state=presentHafner Rotabuggy
# releases
# we have them
http://vaulthq.com
https://github.com/private-vault/vault
# how we do it
Staging don't need:
Staging servers should:
http://dogdep.github.io/dogpro
https://github.com/dogdep/dogpro
DEMO
# stats
https://slides.com/vaidasmikalauskas/ktu-2015
vaidas.m@datadog.org