4/25/2023 0 Comments Define vagranteach do | machine_id | # Give the server a unique name config. linked_clone = true end # We want to provision 3 servers for our cluster N = 3 ( 1. box = "generic/rhel7" # To save overhead and time we use linked_clones () config. box_download_insecure = true # We want to use redhat7 as the target servers are also redhat 7 config. configure ( "2" ) do | config | # If you have issues with SSL certificates add this config. cp %w(tests/files/ tests/files/), 'files/' Vagrant. cp %w(tests/files/ tests/files/), 'files/' FileUtils. ![]() cp %w(tests/files/ca.pem tests/files/cert.pem tests/files/key.pem), 'roles/ansible-role-rethinkdb-configure/files/' FileUtils. # -*- mode: ruby -*- # vi: set ft=ruby : # Copy certificate files to destination they are expected. This way we are verifying that the installation of the (new) version went successful as the version is being used. In another step we validate that the output is what we expect. To do so, we get the version that is installed by executing the rethinkdb -v command and save the output. So for instance the install-rethinkdb role should validate that it did install the package provided. Making sure roles are doing what they should The role itself should validate if the work it did was actually executed and working as intended. Instead I focussed on a few other things: In my case the roles I created where specific for my situation so I didn't, wanted to, create unit tests as that would have been a bit overkill. You can have Ansible roles unit tests, which will validate if the roles 'works'. There are a few levels of testing that can be done for the Ansible playbook. The part we will focus on is the test folder. There will be some specific commands for rethinkDB, but most of it will be about the testing setup and ways you should test.Ī pretty normal layout for Ansible projects. You probably didn't heard from it before, and you can forget about it after reading this. We will be provisioning a 3 server cluster of a database server, RethinkDB Turned out it was not that hard to create, but getting all the information was.īecause of the combination of Ansible and Vagrant and probably my lack of knowledge on those topics □~įirst off, what are we actually going to provision? Or ways to test the playbook on the target systems, but I wanted to test the playbook before deployment during the build and/or locally. Looking through all the things, I mostly saw tests for Ansible Roles. ![]() (still don't) So Google it was to get the journey started. So I thought there should be a smarter and better way.Īs I am mainly a dev engineer, I didn't had thorough expertise on Ansible. As the setup was a bit larger and the overhead (commit, deploy) was bigger. This time around I didn't want to 'test' the provisioning manually. ![]() While I had worked with it before, it was mainly putting some roles together run the script and validate, manually, that it worked. So when I needed to create a new database cluster I looked into a setup that would be reproducible and it should be testable before it was deployed on the actual servers.įor stateless things we can used docker but that wasn't a great fit for the database servers as we need to have persistent storage and scaling and/or changes where not expected that often. Previously infrastructures where created and maintained by hand, which works well until. More at walk.Infrastructure as Code is getting more and more attention and for good reasons. Cognate with Old High German walchan, walkan (“to move up and down, press together, full, walk, wander"), Middle Dutch walken (“to knead, full"), Old English wealcan (“to roll"), Old English Ä¡ewealcan (“to go, walk about"), Old Norse valka (“to wander"), Latin valgus (“bandy-legged, bow-legged"). From Middle English vagraunt (“wandering about"), from Anglo-Norman wakerant, wacrant, walcrant (“vagrant"), Old French wacrant, waucrant (“wandering about"), present participle of wacrer, waucrer, walcrer (“to wander, wander about as a vagabond"), from Frankish *walkrōn (“to wander about"), frequentative form of *walkōn (“to walk, wander, trample, stomp, full"), from Proto-Germanic *walkōnÄ…, *walkanÄ… (“to twist, turn, roll about, full"), from Proto-Indo-European *walg-, *walk- (“to twist, turn, move").
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |