vagrant + saltstack + django - ararat poghosyan - dm10
TRANSCRIPT
Ararat Poghosyan
Backend Developer at Geno6
[email protected]: @araratpoghosyanSkype: ararat.poghosyan
The Story
• There was a developer• And his team• And a project• And a server• AND THE DEPLOYMENT PROBLEM
Still Problems?
• Operating System (Windows, Mac OS X, Linux, etc.)
• Conflicts• Something is missing• Speed• Not Repeatable
What is Vagrant?
• VM in few steps• Easy to configure• Simple provision• Supports VirtualBox, VMWare, etc.• Fast
Vagrant is a portable development environment
Vagrant Concepts
• Boxes: Preinstalled templates• Vagrantfile• Vagrant CLI
$vagrant up
$vagrant halt
$vagrant ssh
Vagrant Features
• Networking• Synced folders• Port forwarding• Provisioning: Puppet, Chef, SaltStack,
Shell scripts, etc.
What is SaltStack
• Easy to learn• Written in Python• Active community• Awesome
SaltStack is an orchestration and software configuration management tool
SaltStack Features
• Language agnostic• Simple and easy: YAML and Jinja
templates• Can work in masterless mode• Configure packages, services and files• More than 200 built-in states• Create your own modules
The State
nginx: pkg: - installed service: - running - enable: True - watch: - file: /etc/nginx/sites-enabled/* - require: - pkg: nginx
Configuration
mysql-base: mysql_database.present: - name: {{ pillar["mysql"]["database"] }} - require: - service: mysql
mysql:user: rootpassword: passworddatabase: symba