cloudera-playbook
cloudera-playbook copied to clipboard
Molecule tests v0.1
Howto run:
# ps: ansible >2.8.2 works fine also (but not 2.9.0, see the README)
pip2 install ansible==2.9.1
pip2 install molecule==2.22
# simple cmd
cd <repo base folder>
molecule test
# the same, but avoid the 'destroy' (if something fails for ex.):
molecule test --destroy=never --scenario-name default
Early version Notes:
- the whole playbook runs through
- but the CM 'template import' action is still running (on my 1. full try, not sure if my 16GB Macbook has enough memory/resources for this config to complete)
- to run as non root/sudo user, I had todo a small patch (see below), I will create a separate PR for that
- Test inspired by similar molecule config I did for HDP deployments in https://github.com/hortonworks/ansible-hortonworks/pull/175
TODOs
- [ ] travis build
- [ ] try with suited small CDH host_templates (that allow a CDH cluster install with the 7.5GB VM memory limit of travis, free tier)
- [ ] more tests
- [ ] multi nodes installs
- [ ] test matrix for various versions, DBs , etc
to run the ansible deployment as non root/sudo user, p.eg on your local PC/Mac, with Molecule: patch_diff__disable_need_for_local_sudo.patch.txt
I added a simple .travis file , but WIP to get till the CM deploying a cluster. Current build iterations
- build °1: just an intermittent pip repo download issue (it seems)
- build °2: issue with the delegate_to: localhost task (that I patched above), which also fails in travis (for another reason, than the 'sudo' prompt on my local notebook)
- build °3: build (https://travis-ci.com/scigility/cloudera-playbook/builds/139780029)
- fixed by "pip install jmespath"
- orig error:
# the task after "Discover product versions from parcel manifests"
TASK [cdh : set_fact] **********************************************************
fatal: [centos7-cdh01.local]: FAILED! => {"msg": "You need to install \"jmespath\" prior to running json_query filter"}
- build °4 (https://travis-ci.com/scigility/cloudera-playbook/jobs/264141299), now runs till last step 👍 , just then fails in the wait loop check:
TASK [cdh : Wait for import cluster template command to complete] **************
...
FAILED - RETRYING: Wait for import cluster template command to complete (8 retries left).
fatal: [centos7-cdh01.local]: FAILED! => {"msg": "The conditional check 'not result.json.active' failed. The error was: error while evaluating conditional (not result.json.active): 'dict object' has no attribute 'json'"}
Updated my branch:
- re-based my molecule_tests branch with latest master
- including fix for missing "jmespath" python module
- that includes PR #28 (which I already merged in our fork's master branch) ps: You can see molecule tests run via Travis (activated on our repo): https://travis-ci.com/github/scigility/cloudera-playbook/builds/175154546