kuryr-kubernetes/contrib/devstack-heat
Antoni Segura Puimedon cfa3d1121b
devstack-heat: Make parameters overridable
Up until now, if you wanted to change the defaults in the parameters,
you had to go and edit the hot/parameters.yml file. This was
inconvenient because it would then show up in git diff and prevent git
review from normal operation. This patch makes it so that now you can
pass the parameters just like if it was the openstack-cli. For example:

    ./devstack-heat stack \
        --parameter \
        "public_net=fbf9bcc6-cbaa-4c24-8d56-8010915a6494" \
        --parameter \
        "image=CentOS-7-x86_64-GenericCloud-1801-01"

Change-Id: Icf4fb124d03f56c8cf383971c5161520a1734d94
Signed-off-by: Antoni Segura Puimedon <antonisp@celebdor.com>
2018-03-08 01:32:07 +01:00
..
hot devstack-heat: Make parameters overridable 2018-03-08 01:32:07 +01:00
lib devstack-heat: Do not clone the entire kuryr-k8s 2018-03-08 00:34:55 +01:00
devstack-heat devstack-heat: Make parameters overridable 2018-03-08 01:32:07 +01:00
README.rst contrib: Add devstack-heat 2017-05-29 15:36:43 +02:00

Kuryr Heat Templates

This set of scripts and Heat templates are useful for deploying devstack scenarios. It handles the creation of an allinone devstack nova instance and its networking needs.

Prerequisites

Packages to install on the host you run devstack-heat (not on the cloud server):

  • jq
  • openstack-cli

If you want to run devstack from the master commit, this application requires a github token due to the github api rate limiting:

You can generate one without any permissions at:

https://github.com/settings/tokens/new

Then put it in your ~/.bashrc an ENV variable called DEVSTACK_HEAT_GH_TOKEN like so:

echo "export DEVSTACK_HEAT_GH_TOKEN=my_token" >> ~/.bashrc

After creating the instance, devstack-heat will immediately start creating a devstack stack user and using devstack to stack kuryr-kubernetes. When it is finished, there'll be a file names /opt/stack/ready.

How to run

In order to run it, make sure that you have sourced your OpenStack cloud provider openrc file and tweaked hot/parameters.yml to your liking then launch with:

./devstack-heat stack

This will deploy the latest master. You can also specify specific gerrit change numbers:

./devstack-heat stack 465657

To obtain this number, just look for example at the following change:

https://review.openstack.org/#/c/465657

In this instance, the number to pass to the stack subcommand is 466291.

This will create a stack named gerrit_465657. Further devstack-heat subcommands should be called with the whole name of the stack, i.e., gerrit_465657.

Getting inside the deployment

You can then ssh into the deployment in two ways:

./devstack-heat show name_of_my_stack

Write down the FIP it tells you and then:

./devstack-heat getkey name_of_my_stack > ~/name_of_my_stack.pem

Finally to get in (use the default username for the distro of your chosen glance image, in the example below centos):

ssh -i ~/name_of_my_stack.pem centos@obtained_fip

Alternatively, if you wait a bit, devstack-heat will have set up the devstack stack user and you can just do:

./devstack-heat ssh name_of_my_stack

To delete the deployment:

./devstack-heat unstack name_of_my_stack

Supported images

It should work with the latest centos7 image. It is not tested with the latest ubuntu 16.04 cloud image but it will probably work.