Note
Although we would like to support different OpenStack environments, we tested openstack_deploy
just for the ISP RAS one.
To install additional packages required only by OpenStack deployment scripts you need to execute the following command:
$ pip install -r requirements-openstack.txt ".[openstack]"
Note
If in the previous step you installed Klever package with the -e argument, then you should use it here as well (i.e. execute pip install -e ".[openstack]").
openstack_deploy
supports 2 kinds of entities:
klever_base_image
- with default settings this is a Debian 9 OpenStack image with installed Klever dependencies. Usingklever_base_image
allows to substantially reduce a time for deploying otherklever_inst
.klever_inst
- an OpenStack instance, either for development or production purposes. For development mode many debug options are activated by default.
Almost all deployment commands require you to specify path to the private SSH key and your OpenStack username:
$ klever-deploy-openstack --os-username $OS_USERNAME
--ssh-rsa-private-key-file $SSH_RSA_PRIVATE_KEY_FILE
create instance
For brevity they are omitted from the following examples.
Also, in addition to command-line arguments mentioned above and below, there are several optional command-line arguments which you can find out by running:
$ klever-deploy-openstack --help
For klever_base_image
you can execute actions show, create and remove. The common workflow for klever_base_image
is create --> remove
, e.g.:
$ klever-deploy-openstack create image
Unless specified, name Klever Base vN (where N is 1 plus a maximum of 0 and vi) is used for new klever_base_image
. Besides, deployment scripts overwrites file klever/deploys/conf/openstack-base-image.txt
with this name so that new instances will be based on the new klever_base_image
. To force other users to switch to the new klever_base_image
you need to commit changes of this file to the repository.
For klever_inst
you can execute actions show, create, update, ssh, remove, share and hide. Basically you should perform actions with klever_inst
in the following order: create --> update --> update --> ... --> update --> remove
exactly as for local_deploy
, e.g.:
$ klever-deploy-openstack create instance
By default Klever is deployed in production mode, but you can change this with the --mode command-line argument:
$ klever-deploy-openstack --mode development create instance
In addition, between creating and removing you can also share/hide for/from the outside world klever_inst
and open an SSH connection to it. By default name for klever_inst
is a concatenation of $OS_USERNAME
, "klever", and the mode used (development or production), e.g. petrov-klever-development.
You can also create a specified number of OpenStack instances for performing various experiments by using the --instances command-line argument. In this mode you can only execute actions show, create, update and remove. The normal workflow for klever_insts
is the same as for klever_inst
, e.g.:
$ klever-deploy-openstack --instances $INSTANCES
create instance