Hybrid Clouds: Dancing with “Automated” Virtual Machines
Xavier Peralta Ramos
OpenNebulaConf 2018
What is CSUC?
Consortium of catalan universities
Services portfolio
DevOps portfolio
Why Terraform?
• A provisioning declarative tool that based on Infrastructure as a
Code paradigm
• Helps to evolve you infrastructure, safely and predictably
• Written in golang
• Terraform is a multipurpose composition tool:
• Composes multiple tiers (SaaS/PaaS/IaaS)
Terraform Community
https://github.com/hashicorp/terraform
• Github Stats
Terraform is not a cloud agnostic tool
It’s not a magic wand that gives you power
over all clouds and systems.
Terraform provider for OpenNebula
https://github.com/runtastic/terraform-provider-opennebula
or
https://github.com/blackberry/terraform-provider-opennebula
Example Opennebula Template for Amazon EC2
The attributes are provided in the
OpenNebula Template
Terraform provider for OpenNebula: Features
• Leverages OpenNebula's XML/RPC API
• Tested for versions 5.X
This is based on a project started by Runtastic, and has been
enhanced by BlackBerry to allow for definition of these resource
types:
• Virtual Machines
• Images
• VNET Reservations
• Security Groups
As well as data sources for:
• Images
• VNETs
• Security Groups
Continuous Integration / Continuous Delivery (CI/CD)
Repository on GitHub or GitLab
DevOps
CommitCommit
Jenkins Build Server
Checkout
Terraform workflow
Jenkins Pipeline I
Jenkins Pipeline: State Terraform Apply
The pipeline use tower-cli to add automatically hosts to the inventory
https://github.com/ansible/tower-cli
Jenkins Pipeline: State Run Playbook
Finally launch a Job Template in Ansible AWX or Ansible Tower
https://github.com/ansible/awx
AWX Jobs
AWX use the credentials added during the OpenNebula Contextualization
Demo Time
Be ONE my friend!
+IAC Tutorials at https://confluence.csuc.cat/display/IaaS/Tutorials
Be ONE my friend!
+IAC Tutorials at https://opennebula.org/focusing-iac-with-opennebula/
Questions
Thanks
Contacts
Xavier.peralta@csuc.cat
Miguel.angel.flores@csuc.cat
Twitter
@cloudadm
@CSUC_info
@miguelangelft85
@xpr85
@jordiguijarro

OpenNebulaConf2018 - Hybrid Clouds: Dancing with "Automated" Virtual Machines - Xavier Peralta - CSUC