OpenStack Deployment¶
Althouth we would like to support different OpenStack environments, at the moment OpenStack Deployment likely works just for the ISP RAS one.
Prior to proceding to OpenStack Deployment, it is necessary to perform Common Deployment. Additionally you need to install following Python3 packages:
OpenStack Deployment supports 3 kinds of entities:
- Klever Base Image - usually this is a Debian 9 OpenStack image with installed packages and Python3 packages which will most likely required for Klever. Using Klever Base Image allows to substantially reduce a time for deploying other entities.
- Klever Developer Instance - an OpenStack instance for development purposes. For Klever Developer Instance many debug options are activated by default.
- Klever Experimental Instances - a specified number of OpenStack instances for performing various experiments.
In addition to arguments mentioned below, there are several optional arguments which you can find out by running:
$ $KLEVER_SRC/deploys/bin/deploy-openstack --help
Klever Base Image¶
For Klever Base Image you can execute actions show, create and remove. The normal workflow for Klever Base Image is “ ”:
$ $KLEVER_SRC/deploys/bin/deploy-openstack --ssh-rsa-private-key-file $SSH_RSA_PRIVATE_KEY_FILE create "Klever base image"
It is not necessary to remove Klever Base Image ever for allowing one to understand what images running OpenStack instances are based on. Unless specified, name Klever Base is used for new Klever Base Image. If there is already an image with such the name it will be renamed by adding suffix deprecated (indeed, this is done recursively with using ordinal numbers of images in addition, so, no images will be lost and there will not be any duplicates).
Klever Developer Instance¶
For Klever Developer Instance you can execute actions show, create, update, ssh, remove, share and hide. Basically you should perform actions with Klever Developer Instance in the following order “ ” exactly as for Local Deployment:
$ $KLEVER_SRC/deploys/bin/deploy-openstack --ssh-rsa-private-key-file $SSH_RSA_PRIVATE_KEY_FILE create "Klever developer instance"
In addition, between creating and removing you can also share/hide for/from the outside world Klever Developer Instance and open an SSH connection to it. By default a name for Klever Developer Instance is a concatenation of an OpenStack username and -klever-dev.
Klever Experimental Instances¶
For Klever Experimental Instances you can execute actions show, create and remove. The normal workflow for Klever Experimental Instances is “ ”:
$ $KLEVER_SRC/deploys/bin/deploy-openstack --ssh-rsa-private-key-file $SSH_RSA_PRIVATE_KEY_FILE --instances $INSTANCES create "Klever experimental instances"
Deployment Troubleshooting¶
If at running script deploy-openstack
you met the following exception:
Traceback (most recent call last):
File "./deploys/bin/deploy-openstack", line 27, in <module>
sys.exit(deploys.openstack.main())
File "./deploys/bin/../deploys/openstack/__init__.py", line 80, in main
getattr(OSKleverDeveloperInstance(args, logger), args.action)()
File "./deploys/bin/../deploys/openstack/openstack.py", line 296, in create
base_image=base_image, flavor_name=self.args.flavor) as self.instance:
File "./deploys/bin/../deploys/openstack/instance.py", line 75, in __enter__
self._setup_keypair()
File "./deploys/bin/../deploys/openstack/instance.py", line 171, in _setup_keypair
public_key = RSA.import_key(private_key).publickey().exportKey('OpenSSH')
AttributeError: module 'Crypto.PublicKey.RSA' has no attribute 'import_key'.
Then you should check that you have properly installed Python3 package pycryptodome.