OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins as a part of the Git hosting and code review systems migration detailed in these mailing list posts: http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html Attempts have been made to correct repository namespaces and hostnames based on simple pattern matching, but it's possible some were updated incorrectly or missed entirely. Please reach out to us via the contact information listed at https://opendev.org/ with any questions you may have.
|1 month ago|
|doc||1 year ago|
|kolla-cli/locale||1 year ago|
|kolla_cli||6 months ago|
|tools||11 months ago|
|.gitignore||8 months ago|
|.gitreview||1 month ago|
|.stestr.conf||1 year ago|
|.zuul.yaml||11 months ago|
|LICENSE||3 years ago|
|README.rst||11 months ago|
|babel.cfg||3 years ago|
|builddocs.sh||3 years ago|
|cli_setup.py||11 months ago|
|requirements.txt||11 months ago|
|setup.cfg||9 months ago|
|setup.py||3 years ago|
|test-requirements.txt||9 months ago|
|tox.ini||11 months ago|
The Kolla-CLI project provides the ability to more easily manage Kolla-Ansible deployments. It provides both a CLI and a python API that you can use to configure and deploy OpenStack using Kolla-Ansible.
Kolla-Ansible requires that hosts, groups, and services are specified in an inventory file. With Kolla-CLI, you can add/remove hosts, change group associations, etc from the CLI or API. Kolla-Ansible also maintains passwords and various configuration variables in a variety of global, group and host files. With Kolla-CLI, you can now view and change these from the CLI/API.
Finally, Kolla-CLI provides commands to setup the SSH keys on hosts, run deployments and perform upgrades.
The installation process below assumes that the kolla-ansible repository exists at the same level as the kolla-cli repository. This is made clear in the cli_setup.py script which makes a relative '../' reference to the kolla-ansible repository. If your kolla-ansible directory is somewhere else then that location can be passed as an argument to the cli_setup.py script. The location on the system where the kolla-cli expects the kolla-ansible files to be and installs them to can be tweaked by setting the KOLLA_HOME and KOLLA_ETC environment variables before running the cli_setup.py script, and while running the kolla-cli command itself. The default value for KOLLA_HOME is /usr/share/kolla-ansible and the default value for KOLLA_ETC is /etc/kolla.
The following steps can be used to build / run the kolla-cli
At that point you will be dropped into the kollacli shell where you can run commands like help or ? to see what commands are available and any of the sub commands can be executed directly.
Alternately you can not use the shell and just execute commands directly via kollacli host add, etc.
If you make changes to the i18n strings (denoted by methods like _("message")) make sure to re-generate the i18n files with the
python setup.py extract_messages command and check in the files generated in openstack-kollacli.
To use the API, import the ClientAPI into your module:
from kolla_cli.api.client import ClientApi
Then define a global:
CLIENT = ClientApi()
And then you can use that global to execute API commands, for example, to add a host to the inventory:
Need a feature? Find a bug? Let us know! Contributions are much appreciated and should follow the standard Gerrit workflow.
If you get an error about missing python.h install the python-dev package via apt-get or yum or whatever mechanism is appropriate for your platform.