A Python library for code common to TripleO CLI and TripleO UI.
Python Shell
Permalink
Failed to load latest commit information.
ansible_plugins/callback Ansible json error callback plugin May 31, 2018
container-images Merge "Add openshift sti-builder image" Jul 14, 2018
contrib Rename contrib to container-images for packaging Apr 7, 2017
doc/source Remove create_default_deployment_plan workflow Jun 26, 2018
healthcheck Merge "Fix gnocchi_statsd and ceilometer_agent_ipmi healthcheck" Jul 18, 2018
heat_docker_agent Remove /etc/os-net-config/config.json in os-apply-config Mar 22, 2018
image-yaml Add security hardened images that can boot from uefi Jun 19, 2018
playbooks Increase services project secgroup-rules quotas when deploying Octavia May 28, 2018
releasenotes Merge "Make config-download directory a git repository" Jul 10, 2018
roles Fix ssh_known_hosts format Jul 10, 2018
scripts Do not explode on empty containers list Jun 8, 2018
tools Avoid tox_install.sh for constraints support Dec 2, 2017
tripleo_common Merge "Include microversion in OS_VOLUME_API_VERSION" Jul 18, 2018
undercloud_heat_plugins Add custom subclass to revert mapping Mar 27, 2018
workbooks Persist ceph-ansible fetch_directory using mistral Jul 15, 2018
zuul.d Merge "Move scenario009 to the check queue" Jul 17, 2018
.coveragerc Make coverage tests work Nov 30, 2015
.gitignore Add ansible playbook for configuring octavia Jan 10, 2018
.gitreview Added .gitreview Apr 9, 2015
.mailmap Initial Cookiecutter Commit. Apr 29, 2015
.testr.conf Initial Cookiecutter Commit. Apr 29, 2015
CONTRIBUTING.rst Update and replace http with https for doc links Oct 6, 2017
HACKING.rst Update the documentation link for doc migration Jul 25, 2017
LICENSE Initial Cookiecutter Commit. Apr 29, 2015
README.rst Fix readme doc May 29, 2018
babel.cfg Initial Cookiecutter Commit. Apr 29, 2015
requirements.txt Revert "TLS by default for the overcloud" May 16, 2018
setup.cfg Persist ceph-ansible fetch_directory using mistral Jul 15, 2018
setup.py Updated from global requirements Mar 10, 2017
sudoers Fix Octavia amphora image RPM install May 23, 2018
test-requirements.txt Updated from global requirements Mar 15, 2018
tox.ini Avoid tox_install.sh for constraints support Dec 2, 2017

README.rst

Team and repository tags

tripleo-common

A common library for TripleO workflows.

Action Development

When developing new actions, you will checkout a copy of tripleo-common to an undercloud machine and add actions as needed. To test the actions they need to be installed and selected services need to be restarted. Use the following code to accomplish these tasks.

sudo rm -Rf /usr/lib/python2.7/site-packages/tripleo_common*
sudo python setup.py install
sudo cp /usr/share/tripleo-common/sudoers /etc/sudoers.d/tripleo-common
sudo systemctl restart openstack-mistral-executor
sudo systemctl restart openstack-mistral-engine
# this loads the actions via entrypoints
sudo mistral-db-manage populate
# make sure the new actions got loaded
mistral action-list | grep tripleo

Workflow Development

When developing new workflows, you will need to reload the modified workflows, e.g the following will reload all the workflows from the default packaged location, or you can use a similar approach to replace only a single workbook while under development.

for workbook in $(openstack workbook list -f value -c Name | grep tripleo); do
    openstack workbook delete $workbook
done
for workflow in $(openstack workflow list -f value -c Name | grep tripleo); do
    openstack workflow delete $workflow
done
for workbook in $(ls /usr/share/openstack-tripleo-common/workbooks/*); do
    openstack workbook create $workbook
done

Validations

Prerequisites

If you haven't installed the undercloud with the enable_validations set to true, you will have to prepare your undercloud to run the validations:

$ sudo pip install git+https://git.openstack.org/openstack/tripleo-validations
$ sudo yum install ansible
$ sudo useradd validations

Finally you need to generate an SSH keypair for the validation user and copy it to the overcloud's authorized_keys files:

$ mistral execution-create tripleo.validations.v1.copy_ssh_key

Running validations using the mistral workflow

Create a context.json file containing the arguments passed to the workflow:

{
  "validation_names": ["512e", "rabbitmq-limits"]
}

Run the tripleo.validations.v1.run_validations workflow with mistral client:

mistral execution-create tripleo.validations.v1.run_validations context.json

Running groups of validations

Create a context.json file containing the arguments passed to the workflow:

{
  "group_names": ["network", "post-deployment"]
}

Run the tripleo.validations.v1.run_groups workflow with mistral client:

mistral execution-create tripleo.validations.v1.run_groups context.json