Sally and Leo use infrastructure as code practices like Cucumber, ServerSpec, Vagrant, and Ansible to automate the provisioning and configuration of a web server. They write behavior tests in Cucumber and infrastructure tests in ServerSpec. Vagrant is used to provision a virtual machine, and Ansible configures the server. By tying the tests to the provisioning code, they can now repeatedly build servers that are known to meet requirements.
Embedded software development using BDDItamar Hassin
This presentation makes the case for BDD in general and focuses on its use within embedded software development. Using the Cucumber gem, I will demonstrate how to use feature files in the context of working with embedded hardware projects, and explain how to extend the framework using the Wire protocol to allow integration tests to run in-situ, which greatly enhances testing coverage compared to PC-based testing using emulators.
I also cover the notion of a SpecFlow gateway, with which one can achieve end-to-end testing with a variety of devices as an orchestration mechanism for broader tests.
Monitor-Driven Development Using AnsibleItamar Hassin
Discusses an XP approach to writing Ansible scripts: Start with a failing test and write code around it to make it pass. Write monitoring code, let it drive your Ansible code to have a functioning server. I use ServerSpec and Cucumber as the monitoring code. Broader subject is that Ansible code should be treated as regular application code - use TDD, SCM, CI and pairing to create a single delivery team consisting of devs and sysadmins as a delivery team.
This Presentation is an introducing to the IT automation environment, starting from a sys admin point of view.
The purpose of these tools is to help in troubleshooting and handling an heterogeneous it environment to ensure availability and reliability.
A revamped version of the Ansible intro talk from February 2015, brought up-to-date for the January Ansible meetup in Berlin.
Join our group: https://www.meetup.com/Ansible-Berlin
How to use Ansible to go faster when creating AWS resources, building servers, and deploying apps. This talk focuses on how AWS developers and admins can use simple Ansible scripts to rapidly create AWS resources including VPCs, security groups and instances, then configure new development and production servers, and deploy their apps. No more "snowflake servers"!
Ansible 2.0 - How to use Ansible to automate your applications in AWS.Idan Tohami
- How to use Ansible to automate your applications in AWS.
- What is Ansible and why is it different?
- How to control cloud deployments securely
- How to control AWS resources using dynamic inventory and tags.
Embedded software development using BDDItamar Hassin
This presentation makes the case for BDD in general and focuses on its use within embedded software development. Using the Cucumber gem, I will demonstrate how to use feature files in the context of working with embedded hardware projects, and explain how to extend the framework using the Wire protocol to allow integration tests to run in-situ, which greatly enhances testing coverage compared to PC-based testing using emulators.
I also cover the notion of a SpecFlow gateway, with which one can achieve end-to-end testing with a variety of devices as an orchestration mechanism for broader tests.
Monitor-Driven Development Using AnsibleItamar Hassin
Discusses an XP approach to writing Ansible scripts: Start with a failing test and write code around it to make it pass. Write monitoring code, let it drive your Ansible code to have a functioning server. I use ServerSpec and Cucumber as the monitoring code. Broader subject is that Ansible code should be treated as regular application code - use TDD, SCM, CI and pairing to create a single delivery team consisting of devs and sysadmins as a delivery team.
This Presentation is an introducing to the IT automation environment, starting from a sys admin point of view.
The purpose of these tools is to help in troubleshooting and handling an heterogeneous it environment to ensure availability and reliability.
A revamped version of the Ansible intro talk from February 2015, brought up-to-date for the January Ansible meetup in Berlin.
Join our group: https://www.meetup.com/Ansible-Berlin
How to use Ansible to go faster when creating AWS resources, building servers, and deploying apps. This talk focuses on how AWS developers and admins can use simple Ansible scripts to rapidly create AWS resources including VPCs, security groups and instances, then configure new development and production servers, and deploy their apps. No more "snowflake servers"!
Ansible 2.0 - How to use Ansible to automate your applications in AWS.Idan Tohami
- How to use Ansible to automate your applications in AWS.
- What is Ansible and why is it different?
- How to control cloud deployments securely
- How to control AWS resources using dynamic inventory and tags.
I presented this slides at the Ansible Munich Meetup on Feb 22cd 2016. You can find the recording of the talk here: https://www.youtube.com/watch?v=B7K1ETPyzoQ (starts at 1:18). This talk is giving a 101 level introduction on developing Ansible Module in Python.
From Ansible's website: "Ansible is a radically simple IT automation engine that automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs."
This introduction is based on ansible official docs, capturing most important information to make it easy to understand Ansible main concepts.
Presentation of my TechTalk at eSapce (Every Thursday one of the departments make a session about something recently begun to use or a new technology, this was my session from SysOps team.) This is an introduction to Ansible, and how to get started with it ... and since then we moved to Ansible :-)
Ansible is a great tool for many purposes like: configuration management, contentious deployment, and multi-tier orchestration ... and more!
- http://tech.aabouzaid.com/
- http://espace.com.eg/
- http://ansible.com/
A presentation delivered by Arctiq, onsite in Toronto, on Mar 1, 2017. The presentation discusses Ansible as an automation tool for Linux, Windows, and network devices. Reach out if you would like more information www.arctiq.ca
(Click 2nd slide for video) Deploy PHP apps faster in 2017. This talk focuses on how PHP developers can use simple Ansible scripts to rapidly configure new dev and production servers from scratch, and deploy their apps. No more "snowflake servers"!
This is a general introduction to DevOps essentials and Ansible, with a few extras for PHP developers, including some best practice tips and overview of two major Ansible-based PHP projects, Drupal-VM and Trellis (modern WordPress setup).
'Ansible Roles done right' is a talk about "Applying TDD while writing roles. Automatic tests powered by Continuous Integration + containers. Quick demo of the new ansible-container." Funny title: "When your applications don't have tests, at least your infrastructure does..."
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsTomas Doran
Using puppet when configuring EC2 machines seems a natural fit. However bringing up new machines from a community image with puppet is not trivial and can be slow, and so not useful for auto-scaling.
The cloud also offers a solution to ongoing server maintenance, allowing you to launch fresh instances whenever you upgrade your applications (Immutable or Phoenix servers). However to predictably succeed, you need to freeze the puppet code alongside the application version for deployment.
The solution to these issues is generating custom machine images (AMIs) with your software inlined. This talk will cover Yelp's use of a Packer, Jenkins and Puppet for generating AMIs. This will include how we deal with issues like bootstrapping, getting canonical information about a machine's environment and cluster state at launch time, as well as supporting immutable/phoenix servers in combination with more traditional long lived servers inside our hybrid cloud infrastructure.
Infrastructure Automation with Chef & Ansiblewajrcs
What is Infrastructure and why you should automate it?
Typical Infrastructure
Benefits
CMS/ Automation
Chef / Terminologies / Disadvantages
Ansible / Disadvantages
Demo
Summary
Author: Waqar Alamgir; Twitter @wajrcs
DevOps for Humans - Ansible for Drupal Deployment Victory!Jeff Geerling
Everyone knows it's a Good Idea™ to use a configuration management system (e.g. Puppet, Chef) to manage your Drupal infrastructure. But many people (myself included) have run into a wall of #wtfmoments when trying to learn the vagaries of traditional CM systems and their vendor-specific syntaxes.
In 2012, Ansible was released, enabling normal human beings to manage their servers with an easy, but powerful, CM system that uses YAML (just like Drupal 8!) to define configuration and Jinja2 (very much like Twig!) for templates. Not only that, but Ansible is also an incredibly simple and very flexible Drupal deployment and continuous delivery tool.
Learn how you can use Ansible to manage your infrastructure—including local development environments—and stop letting servers and deployments get in the way of development.
Through the magic of virtualization technology (Vagrant) and Puppet, a companion Enterprise grade provisioning technology, we explore how to make the complex configuration game a walk in the park. Bring new team members up to speed in minutes, eliminate variances in configurations, and make integration issues a thing of the past.
Welcome to the new age of team development!
I presented this slides at the Ansible Munich Meetup on Feb 22cd 2016. You can find the recording of the talk here: https://www.youtube.com/watch?v=B7K1ETPyzoQ (starts at 1:18). This talk is giving a 101 level introduction on developing Ansible Module in Python.
From Ansible's website: "Ansible is a radically simple IT automation engine that automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs."
This introduction is based on ansible official docs, capturing most important information to make it easy to understand Ansible main concepts.
Presentation of my TechTalk at eSapce (Every Thursday one of the departments make a session about something recently begun to use or a new technology, this was my session from SysOps team.) This is an introduction to Ansible, and how to get started with it ... and since then we moved to Ansible :-)
Ansible is a great tool for many purposes like: configuration management, contentious deployment, and multi-tier orchestration ... and more!
- http://tech.aabouzaid.com/
- http://espace.com.eg/
- http://ansible.com/
A presentation delivered by Arctiq, onsite in Toronto, on Mar 1, 2017. The presentation discusses Ansible as an automation tool for Linux, Windows, and network devices. Reach out if you would like more information www.arctiq.ca
(Click 2nd slide for video) Deploy PHP apps faster in 2017. This talk focuses on how PHP developers can use simple Ansible scripts to rapidly configure new dev and production servers from scratch, and deploy their apps. No more "snowflake servers"!
This is a general introduction to DevOps essentials and Ansible, with a few extras for PHP developers, including some best practice tips and overview of two major Ansible-based PHP projects, Drupal-VM and Trellis (modern WordPress setup).
'Ansible Roles done right' is a talk about "Applying TDD while writing roles. Automatic tests powered by Continuous Integration + containers. Quick demo of the new ansible-container." Funny title: "When your applications don't have tests, at least your infrastructure does..."
Chasing AMI - Building Amazon machine images with Puppet, Packer and JenkinsTomas Doran
Using puppet when configuring EC2 machines seems a natural fit. However bringing up new machines from a community image with puppet is not trivial and can be slow, and so not useful for auto-scaling.
The cloud also offers a solution to ongoing server maintenance, allowing you to launch fresh instances whenever you upgrade your applications (Immutable or Phoenix servers). However to predictably succeed, you need to freeze the puppet code alongside the application version for deployment.
The solution to these issues is generating custom machine images (AMIs) with your software inlined. This talk will cover Yelp's use of a Packer, Jenkins and Puppet for generating AMIs. This will include how we deal with issues like bootstrapping, getting canonical information about a machine's environment and cluster state at launch time, as well as supporting immutable/phoenix servers in combination with more traditional long lived servers inside our hybrid cloud infrastructure.
Infrastructure Automation with Chef & Ansiblewajrcs
What is Infrastructure and why you should automate it?
Typical Infrastructure
Benefits
CMS/ Automation
Chef / Terminologies / Disadvantages
Ansible / Disadvantages
Demo
Summary
Author: Waqar Alamgir; Twitter @wajrcs
DevOps for Humans - Ansible for Drupal Deployment Victory!Jeff Geerling
Everyone knows it's a Good Idea™ to use a configuration management system (e.g. Puppet, Chef) to manage your Drupal infrastructure. But many people (myself included) have run into a wall of #wtfmoments when trying to learn the vagaries of traditional CM systems and their vendor-specific syntaxes.
In 2012, Ansible was released, enabling normal human beings to manage their servers with an easy, but powerful, CM system that uses YAML (just like Drupal 8!) to define configuration and Jinja2 (very much like Twig!) for templates. Not only that, but Ansible is also an incredibly simple and very flexible Drupal deployment and continuous delivery tool.
Learn how you can use Ansible to manage your infrastructure—including local development environments—and stop letting servers and deployments get in the way of development.
Through the magic of virtualization technology (Vagrant) and Puppet, a companion Enterprise grade provisioning technology, we explore how to make the complex configuration game a walk in the park. Bring new team members up to speed in minutes, eliminate variances in configurations, and make integration issues a thing of the past.
Welcome to the new age of team development!
Code testing and Continuous Integration are just the first step in a source code to production process. Combined with infrastructure-as-code tools such as Puppet the whole process can be automated, and tested!
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Carlos Sanchez
Continuous Integration, with Apache Continuum or Jenkins, can be extended to fully manage deployments and production environments, running in Tomcat for instance, in a full Continuous Delivery cycle using infrastructure-as-code tools like Puppet, allowing to manage multiple servers and their configurations.
Puppet is an infrastructure-as-code tool that allows easy and automated provisioning of servers, defining the packages, configuration, services,... in code. Enabling DevOps culture, tools like Puppet help drive Agile development all the way to operations and systems administration, and along with continuous integration tools like Apache Continuum or Jenkins, it is a key piece to accomplish repeatability and continuous delivery, automating the operations side during development, QA or production, and enabling testing of systems configuration.
Traditionally a field for system administrators, Puppet can empower developers, allowing both to collaborate coding the infrastructure needed for their developments, whether it runs in hardware, virtual machines or cloud. Developers and sysadmins can define what JDK version must be installed, application server, version, configuration files, war and jar files,... and easily make changes that propagate across all nodes.
Using Vagrant, a command line automation layer for VirtualBox, they can also spin off virtual machines in their local box, easily from scratch with the same configuration as production servers, do development or testing and tear them down afterwards.
We will show how to install and manage Puppet nodes with JDK, multiple Tomcat instances with installed web applications, database, configuration files and all the supporting services. Including getting up and running with Vagrant and VirtualBox for quickstart and Puppet experiments, as well as setting up automated testing of the Puppet code.
Wordpress y Docker, de desarrollo a produccionSysdig
Docker esta revolucionando cómo desplegamos nuestras aplicaciones. Desde el entorno de desarrollo hasta la puesta en producción.
Veremos las ventajas que nos aporta Docker para el desarrollo en WordPress, las herramientas y procesos desde el punto de vista de un desarrollador.
A la hora de mover nuestra aplicación WordPress a producción, presentaremos los retos que presenta y las ventajas que aportan herramientas de orquestación como Kubernetes.
Tanto si eres un desarrollador como si también tienes que gestionar los sistemas que alojan tu WordPress, saldrás de esta charla queriendo poner todos tus WordPress en contenedores.
Get hands-on with security features and best practices to protect your containerized services. Learn to push and verify signed images with Docker Content Trust, and collaborate with delegation roles. Intermediate to advanced level Docker experience recommended, participants will be building and pushing with Docker during the workshop.
Led By Docker Security Experts:
Riyaz Faizullabhoy
David Lawrence
Viktor Stanchev
Experience Level: Intermediate to advanced level Docker experience recommended
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
HA websites are where the rubber meets the road - at 200km/h. Traditional separation of dev and ops just doesn't cut it.
Everything is related to everything. Code relies on performant and resilient infrastructure, but highly performant infrastructure will only get a poorly written application so far. Worse still, root cause analysis in HA sites will more often than not identify problems that don't clearly belong to either devs or ops.
The two options are collaborate or die.
This talk will introduce 3 core principles for improving collaboration between operations and development teams: consistency, repeatability, and visibility. These principles will be investigated with real world case studies and associated technologies audience members can start using now. In particular, there will be a focus on:
- fast provisioning of test environments with configuration management
- reliable and repeatable automated deployments
- application and infrastructure visibility with statistics collection, logging, and visualisation
Cette présentation vous montrera comment utiliser et profiter rapidement de Docker, quelles commandes utiliser et quelles fonctionnalités sont disponibles.
sfPot de Lille - Le 15 janvier 2015
Presentation at March 2019 Dutch Postgres User Group Meetup on lessons learnt while migrating from Oracle to Postgres, demo'ed via vagrant test environments and using generic pgbench datasets.
1. Itamar Hassin April 2015
INFRASTRUCTURE
DEVELOPMENT USING
CUCUMBER, SEVERSPEC & ANSIBLE
2. THE GOAL
•Avoid snowflakes
•Fail fast (offline!) and cycle quickly
•Be able to sustain infrastructure as it expands
•Support apps and heterogeneous environments
•Optimise SA’s time (reduce manualVDDs)
•Time To Rebuild < Time To Fix
4. A way by which we can define, provision, and
configure hardware andVirtual Machines to suite
our needs
INFRASTRUCTURE AS CODE
5. An activity whereby a feature’s behaviour is described
prior to its implementation
BEHAVIOUR DRIVEN DEVELOPMENT
6. MONITOR DRIVEN DEVELOPMENT
• Write production monitors based on desired result
• Implement enough infrastructure to satisfy the
monitor
• Refactor
• Repeat
11. ANSIBLE
Ansible is a radically simple IT automation engine
that automates cloud provisioning, configuration
management, application deployment, intra-service
orchestration, and many other IT needs.
12. SALLY & LEO AT WORK
Danielle: I want a web server.
Sally: Sure, boss.
Danielle: We’re a silo-ed org.
Sally: Sure, boss.
Danielle: The Admins need specs.
Sally: Sure, boss.
Sally: Leo, let’s pair.
13. WORKFLOW
How Sally and Leo go about setting up a web server
in such a way that it
•Is automated
•Is repeatable and measurable
•Assures environments for consistent development
testing
14. SALLY WRITES SPECS
(IN A WORD DOC)
Feature:
As a Webmaster (yeah baby!) I need a webserver to be
running so that I may master it.
Background:
Given my server is available
And I provision it
Scenario:
When I get access to it
Then I expect it to have apache running
15. THEY USE BDD
$ cucumber
No such file or directory @ rb_sysopen - features. Please
create a features directory to get started. (Errno::ENOENT)
18. PASTE FEATURE
(FROM WORD DOC)
Feature:
As a Webmaster (yeah baby!) I need a webserver to be running
so that I may master it.
Background:
Given my server is available
And I provision it
Scenario:
When I get access to it
Then I expect it to have apache running
19. MISSING STEPS
$ cucumber
Feature:
As a Webmaster (yeah baby!) I need a webserver to be running so that I may master it.
Background: # features/httpd.feature:4
Given my server is available # features/httpd.feature:5
And I provision it # features/httpd.feature:6
Scenario: # features/httpd.feature:8
When I get access to it # features/httpd.feature:9
Then I expect it to have apache running # features/httpd.feature:10
1 scenario (1 undefined)
4 steps (4 undefined)
0m0.002s
You can implement step definitions for undefined steps with these snippets:
Given(/^my server is available$/) do
pending # express the regexp above with the code you wish you had
end
When(/^I provision it$/) do
pending # express the regexp above with the code you wish you had
end
20. WORKFLOW
At this stage, the high-level functional requirement
needs more specification, so they MDD the server
21. THEY WRITE A MONITOR
describe package('apache2') do
it { should be_installed }
end
describe service('apache2') do
it { should be_enabled }
it { should be_running }
end
describe port(80) do
it { should be_listening }
end
describe file('/etc/apache2/sites-enabled/000-default.conf') do
it { should be_file }
it { should contain "example.com" }
end
22. MISSINGVAGRANT
A Vagrant environment or target machine is required
to run this
command.
Run `vagrant init` to create a new Vagrant
environment.
Or, get an ID of a target machine from `vagrant
global-status` to run
this command on.
23. THEY CREATE AVAGRANTFILE
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "Ubuntu 14.04"
config.vm.define "webserver"
config.vm.hostname = "webserver"
config.vm.network "private_network", ip: "33.33.33.33"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
end
24. THEY RUN MONITOR AGAIN
$ rake spec
ruby -S rspec spec/webserver/httpd_spec.rb
FFFFFF
Failures:
1) Package "apache2" should be installed
Failure/Error: it { should be_installed }
sudo dpkg-query -f '${Status}' -W apache2 | grep -E '^(install|hold)
ok installed$'
expected Package "apache2" to be installed
# ./spec/webserver/httpd_spec.rb:4:in `block (2 levels) in <top
(required)>'
2) Service "apache2" should be enabled
Failure/Error: it { should be_enabled }
sudo ls /etc/rc3.d/ | grep -- '^S..apache2' || sudo grep 'start
on' /etc/init/apache2.conf
expected Service "apache2" to be enabled
# ./spec/webserver/httpd_spec.rb:8:in `block (2 levels) in <top
(required)>'
25. THEY PROVISION AVM
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "Ubuntu 14.04"
config.vm.define "webserver"
config.vm.hostname = "webserver"
config.vm.network "private_network", ip: "33.33.33.33"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
config.vm.provision "ansible" do |ansible|
ansible.playbook = "playbook.yml"
ansible.inventory_path = "inventory.ini"
ansible.sudo = true
end
end
26. THEY RUN MONITOR
$ rake spec
ruby -S rspec spec/webserver/httpd_spec.rb
There are errors in the configuration of this machine.
Please fix
the following errors and try again:
ansible provisioner:
* `playbook` for the Ansible provisioner does not exist on
the host system: playbook.yml
......
Finished in 3.51 seconds
6 examples, 0 failures
31. WORKFLOW
At this stage,Vagrant and Ansible scripts provision and
configure the server, so all that’s left is to tie that to
the suspended Cucumber spec
32. STEP IMPLEMENTATION FOR CUCUMBER
Given(/^my server is available$/) do
output=`vagrant reload`
end
And(/^I provision it$/) do
output=`vagrant provision`
end
When(/^I get access to it$/) do
run_remote("ls")
end
Then(/^I expect it to have apache running$/) do
run_remote("ps asx | grep apache")
end
def run_remote(command)
Net::SSH.start("33.33.33.33", "vagrant", :password => "vagrant") do |ssh|
result = ssh.exec!(command)
end
end
33. GOODTIMES
LEO RUNSTHE MONITOR
$ rake spec
ruby -S rspec spec/webserver/httpd_spec.rb
......
Finished in 3.73 seconds
6 examples, 0 failures
SALLY RUNS CUCUMBER
$ cucumber
Feature:
As a Webmaster (yeah baby!) I need a webserver to be running so that I may master it.
Background: # features/httpd.feature:4
Given my server is available # features/steps/httpd_steps.rb:3
And I provision it # features/steps/httpd_steps.rb:8
Scenario: # features/httpd.feature:8
When I get access to it # features/steps/httpd_steps.rb:12
Then I expect it to have apache running
1 scenario (1 passed)
4 steps (4 passed)
34. $ rake spec
ruby -S rspec spec/webserver/httpd_spec.rb
......
Finished in 3.73 seconds
6 examples, 0 failures
LEO RUNSTHE MONITOR
35. $ cucumber
Feature:
As a Webmaster (yeah baby!) I need a webserver to be running so
that I may master it.
Background: # features/httpd.feature:4
Given my server is available # features/steps/httpd_steps.rb:3
And I provision it # features/steps/httpd_steps.rb:8
Scenario: # features/httpd.feature:8
When I get access to it # features/steps/httpd_steps.rb:12
Then I expect it to have apache running
1 scenario (1 passed)
4 steps (4 passed)
0m8.433s
SALLY RUNS CUCUMBER
37. AUTOMATION
• Commit the Cucumber and ServerSpec source
code to git
• Add a Jenkins task to run the scripts as part of the
integration test suite
• Add ServerSpec as a monitor in all environments
to ensure server configuration immutability
38. SOURCE CONTROL
SCaaCC
• Infrastructure code is part of the app code
• Developers and SysAdmins share code using git
for modifications.
• HugOps can use master
• Others can use branching or forking
39. XP PRACTICES
• SysAdmins are part of the development team
• Participate in standups, part of a story/task
cards
• Participate in pairing sessions
• Empathise