Automated provisioning and
deployment
E2E Testing Team
Why?
• Complex configuration: users, GIBA proxy, database, database
seeding, Test Center, Scheduler, deployment scripts.
• We wanted:
• Server configuration as code and under version control.
• Provision a new IPC host in minutes.
• Repeatable process.
Ansible setup
• Automates provisioning, configuration and deployment.
• A controller node, which acts as a provisioner.
• One (or many) managed hosts.
• No agents needed. Instructions on playbooks are translated to
commands through SSH.
How to develop?
• Vagrant project with Virtual Box as virtualization provider.
• Vagrant sits on top of the virtualization provider.
• CentOS as base box.
• Vagrantfile:
• Ruby file that declares:
• A controller VM.
• A node VM.
• It’s very easy to create the VMs from scratch, boot them, and destroy them
• $ vagrant up controller
• $ vagrant up node
• $ vagrant destroy node
Our playbooks
How to run against IPC?
• Request new Red Hat instance.
• Create a snapshot.
• Try.
• Revert.
Lessons learnt
• Ansible playbooks are the best documentation for infrastructure.
• It helps to improve/refine the infrastructural set-up.
• Always check for idempotency!
• It’s better to use a module than running a raw command.

Ansible E2E Testing

  • 1.
  • 2.
    Why? • Complex configuration:users, GIBA proxy, database, database seeding, Test Center, Scheduler, deployment scripts. • We wanted: • Server configuration as code and under version control. • Provision a new IPC host in minutes. • Repeatable process.
  • 3.
    Ansible setup • Automatesprovisioning, configuration and deployment. • A controller node, which acts as a provisioner. • One (or many) managed hosts. • No agents needed. Instructions on playbooks are translated to commands through SSH.
  • 4.
    How to develop? •Vagrant project with Virtual Box as virtualization provider. • Vagrant sits on top of the virtualization provider. • CentOS as base box. • Vagrantfile: • Ruby file that declares: • A controller VM. • A node VM. • It’s very easy to create the VMs from scratch, boot them, and destroy them • $ vagrant up controller • $ vagrant up node • $ vagrant destroy node
  • 5.
  • 7.
    How to runagainst IPC? • Request new Red Hat instance. • Create a snapshot. • Try. • Revert.
  • 8.
    Lessons learnt • Ansibleplaybooks are the best documentation for infrastructure. • It helps to improve/refine the infrastructural set-up. • Always check for idempotency! • It’s better to use a module than running a raw command.