commit | cef1c07b5f5f74ce24dc81daef06836bb9323cd7 | [log] [tgz] |
---|---|---|
author | Dennis Dmitriev <ddmitriev@mirantis.com> | Wed Oct 24 15:00:46 2018 +0300 |
committer | Dennis Dmitriev <ddmitriev@mirantis.com> | Wed Oct 24 15:00:46 2018 +0300 |
tree | 134f9a8f9250593bf6eb4feca0c62f8fcc21c733 | |
parent | a7de8b569ad9bf3746448444dfef2782b2638a68 [diff] |
Fix processing boot values If a bool variable is False, some interpolation steps were not printed Change-Id: I8665bbe10e0f72b721aa86290894371d8ac0233d
QA tools for manipulating reclass models
apt-get install python-virtualenv python-pip build-essential python-dev libssl-dev pip install git+https://github.com/dis-xcom/reclass-tools
Please send patches using gerrithub.io:
git remote add gerrit ssh://review.gerrithub.io:29418/dis-xcom/reclass-tools git review
This tool can be used to create a new class 'environment' generated from custom inventory.
See all the nodes available from reclass inventory (including generated nodes):
reclass-tools list-nodes
See only VCP nodes for specific domain:
reclass-tools list-nodes -d mcp11-ovs-dpdk.local --vcp-only
See only non-VCP nodes for specific domain (baremetal nodes):
reclass-tools list-nodes -d mcp11-ovs-dpdk.local --non-vcp-only
Find specific key in the path (without reclass render):
reclass-tools get-key parameters._param.cluster_domain /srv/salt/reclass/classes/cluster/physical_mcp11_ovs_dpdk/
Collect all parameters._param into a single dict, to track _param changes from commit to commit:
reclass-tools list-params /srv/salt/reclass/classes/
Trace all the modifications of the pillar key _param:keepalived_vip_interface during loading the model:
reclass-tools trace-key _param:keepalived_vip_interface --node=ctl01.virtual-mcp-ocata-cicd.local
This is a PoC of creating the 'environment' class. For CI tests, please generate your 'inventory.yaml' for step #3 and create the cookiecutter template based on example template from /examples directory.
For this example will be used the 'cluster' model 'mcp11-ovs-dpdk.local' from 'mcp-baremetal-lab' repo.
All steps should be performed on the installed salt-master node, when all nodes have been generated with 'reclass.storage' state.
reclass-tools show-context -d mcp11-ovs-dpdk.local parameters.linux.network.interface > /tmp/context-mcp11-ovs-dpdk.local.yaml
reclass-tools del-key parameters.linux.network.interface /srv/salt/reclass/classes/cluster/physical_mcp11_ovs_dpdk reclass-tools del-key parameters.linux.network.interface /srv/salt/reclass/classes/system/ reclass-tools del-key parameters.linux.network.interface /usr/share/salt-formulas/reclass/
git clone https://github.com/dis-xcom/reclass_tools ~/reclass_tools reclass-tools render -e lab03_ovs_dpdk -t ~/reclass_tools/examples/environment -o /tmp/environment -c /tmp/context-mcp11-ovs-dpdk.local.yaml # You can add multiple YAMLs here
tree /tmp/environment/
ln -s /tmp/environment /srv/reclass/salt/classes
Add new class '- environment.mcp11-ovs-dpdk.local' to the classes/cluster/<cluster_model>/infra/config.yml (edit the file manually for now)
Update the nodes for reclass inventory
salt-call state.sls reclass.storage