I suppose that that you make configuration management, not bash. It means that you have to test it some how. Have you ever tested ansible roles? How do you do it?
In my case, we have:
Let us compare solutions for testing.
|Name||Test Kitchen||Molecule||Create new|
|License||Apache 2.0||MIT||Apache 2.0||Apache 2.0|
As you remember, we had a private cloud with limited possibility to create VMs on demand. We decided to create VMs inside VMs.
First of all we tried to run Virtualbox x32 without nested. It was bad idea because of kernel panic. Also vast majority of our VMs in our infrastructure are x86_64, so we decided to continue research. As a result we decided to use nested virtualization. Hopefully it was supported by our host servers.
I was implementing testkitchen and faced with some issues.
In some test suits, we configured proxy client settings inside VM created by testkitchen. However, proxy was not configured on testkitchen host & ansible cannot use extra variables with empty values
Solution: create erb template for setting default proxy if ENV variables is not set
<%= ENV['http_proxy'].to_s.empty? ? 'http://proxy.example.com:3128' : ENV['http_proxy'] %>
Some roles configure network interfaces. Test suit was looked like:
Solution: add interfaces to VMs
Virtualbox can’t use “_” in a vm name
Solution: rename suitcases “vm_” => “vm-“
We use role in production, however when we decided to test it, it was failed. We reproduced it.
I would like to show clue.
[root@vm-oracle vagrant]# getent ahosts vm-oracle 127.0.0.1 STREAM vm-oracle 127.0.0.1 DGRAM 127.0.0.1 RAW [root@vm-oracle vagrant]# getent ahosts vm-oracle. fe80::a00:27ff:febd:bd6a STREAM vm-oracle fe80::a00:27ff:febd:bd6a DGRAM fe80::a00:27ff:febd:bd6a RAW 10.0.2.15 STREAM 10.0.2.15 DGRAM 10.0.2.15 RAW [root@oracle vagrant]# getent ahosts oracle.example.com. 192.168.128.182 STREAM oracle.example.local 192.168.128.182 DGRAM 192.168.128.182 RAW
Do you have any ideas what is happening?
It is tricky bug:
I’d like to clarify it a bit more: What has happened in case vm-oracle?
What has happened in case vm-oracle.?
OOM randomly was killing VMs. Testkitchen was failed with strange errors.
Solution: increase RAM
It was working slowly
On one hand, current implementation works, but on the other hand, there are some issues
As a result, molecule & docker might be pretty interesting solution.