Skip to content

Latest commit

 

History

History
107 lines (79 loc) · 5.34 KB

deploy_openstack.rst

File metadata and controls

107 lines (79 loc) · 5.34 KB

OpenStack Deployment

Althouth we would like to support different OpenStack environments, at the moment openstack_deploy likely works just for the ISP RAS one.

Prior to proceding to openstack_deploy, it is necessary to perform deploy_common. Additionally you need to install following Python3 packages:

openstack_deploy 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_dev_inst - an OpenStack instance for development purposes. For klever_dev_inst many debug options are activated by default.
  • klever_experiment_inst - 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 "create --> remove":

$ $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_dev_inst you can execute actions show, create, update, ssh, remove, share and hide. Basically you should perform actions with klever_dev_inst in the following order "create --> update --> update --> ... --> update --> remove" exactly as for local_deploy:

$ $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_dev_inst and open an SSH connection to it. By default a name for klever_dev_inst is a concatenation of an OpenStack username and -klever-dev.

Klever Experimental Instances

For klever_experiment_inst you can execute actions show, create and remove. The normal workflow for klever_experiment_inst is "create --> remove":

$ $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.