commit | f17eb899ec98610f24abb4596a894da07b749f83 | [log] [tgz] |
---|---|---|
author | Dennis Dmitriev <ddmitriev@mirantis.com> | Tue Jul 11 19:47:45 2017 +0300 |
committer | Dennis Dmitriev <ddmitriev@mirantis.com> | Tue Jul 11 19:47:45 2017 +0300 |
tree | 5db75ca83c7d4e4d5cb54af13ee24c7c400034d1 | |
parent | 86750966f33cdc7f5a1d2917474ef679c59b6c4a [diff] |
Fix 'code' in readme
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
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/
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 -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