Testing Ansible Roles using Molecule on openSUSE
Make Automation Run Perfectly, No Error, Repeatable.
Estu Fardani is currently working as DevOps in Indonesian local startup, have 3 (three) years experience in system support as system administrator, 6 (six) years experience as GNU/Linux technical support, helpdesk and trainer. He has extensive experience in all aspects of managing event for local, national and international. Last year He success manage GNOME.Asia Summit 2015 at Universitas Indonesia, Depok, West Java. Indonesia and openSUSE.Asia Summit 2016 at UIN Sunan Kalijaga, Yogyakarta.
Today in DevOps Culture, everything must less broken code, bug, error. Everything must pass testing process before run in server, staring on Development environment, Staging until Production environment.
This process also happen when writing automation script, wherever ansible, chef, puppet etc. Molecule is one of platform to aid development and testing of ansible role. This platform will make sure ansible role working perfectly, no error, repeatable. Molecule write in python. Molecule will need vagrant or docker for their virtualization provider. and able use multiple verify tool, such as serverspec, tox etc. It will make operation engineer working faster.
In this talk, I will demonstrate how to write clean ansible role, testing in local. testing using jenkins and deploy directly to production server automatically.
I will breakdown each part of my workshop
- Introduction of Ansible, Role, Molecule
- Installation tool (optional, I prefer all this tool have installed before workshop).
- Writing Code
- Testing Code
- Implementation Code
For people who want join this workshop, please read this preparation step to make our workshop more easy:
1. Bring your laptop, Min 4core, 8GB.
2. Operating System. I recommend use openSUSE Leap 42.2 or 42.3. But other GNU/Linux distribution is fine too. *nix OS is still fine too.
3. Install tool for this workshop:
* Virtualbox Last Stable Version.
* Vagrant; and donwload openSUSE image for vagrant.
* Your text editor (sublime, atom, vim)
4. Bring your Internet connection. I am not sure about Internet from the class.
5. Bring your external hardisk or USB Drive(8GB min) for backup plan, copy image etc from me.
6. Read introduction about molecule from official website (http://molecule.readthedocs.io). We will use version 1.2 stable.
If you need more information, question you can send me an email estu[at]blankon[dot]id.
- 2017 October 22 15:45
- 2 h
- Workshop Space
- openSUSE.Asia Summit 2017