OpenStack in a snap!
Go to file
Pete Vander Giessen dfd1d5ec68 Added testing for control nodes
Ported basic-test.sh to test_basic.py, and folded in
test_horizonlogin.py.

Made a testing framework for shared components.

Added test_control.py

Got rid of default .stestr.conf, as we're going to have multiple tests
running, and one conf is confusing.

Manually ordering functional tests for now, as stestr noms too much
output, and runs things in parallel, which doesn't work for our
functional tests.

Skipping compute node test for now, as it won't work until we can
connect to a control node with databases and such.

Moved very-basic-test.sh to tools/make-a-microstack.sh. It's really
more of a tool for manual testing than an automated test.

Added test-requirements and updated gitignore.

Moved auto-detection of kvm extensions to init, rather than test, as
it makes more sense there.

Change-Id: Iba7f7fe07cbb066790f802cf2a7c87c68994062c
2019-10-16 15:44:38 +00:00
patches Make Horizon Dashboard settings operator overrideable. 2019-09-24 18:27:39 +00:00
snap/hooks Enable loading and saving of question answers. 2019-10-10 15:14:00 +00:00
snap-overlay Added testing for control nodes 2019-10-16 15:44:38 +00:00
snap-wrappers Broke configuration out into a manual step. 2019-08-01 21:12:05 +00:00
tests Added testing for control nodes 2019-10-16 15:44:38 +00:00
tools Added testing for control nodes 2019-10-16 15:44:38 +00:00
.gitignore Added testing for control nodes 2019-10-16 15:44:38 +00:00
.gitreview Added automated testing via tox and zuul. 2019-07-24 08:04:38 +01:00
.zuul.yaml Upgrade to Python3/Stein 2019-08-30 17:15:05 +00:00
CONTRIBUTING.md Added CONTRIBUTING.md. 2019-01-29 10:33:00 -05:00
DEMO.md Broke configuration out into a manual step. 2019-08-01 21:12:05 +00:00
README.md Enable loading and saving of question answers. 2019-10-10 15:14:00 +00:00
snapcraft.yaml Enable loading and saving of question answers. 2019-10-10 15:14:00 +00:00
test-requirements.txt Added testing for control nodes 2019-10-16 15:44:38 +00:00
tox.ini Added testing for control nodes 2019-10-16 15:44:38 +00:00

README.md

microstack

Snap Status

OpenStack in a snap that you can run locally on a single machine! Excellent for ...

  • Development and Testing of Openstack Workloads
  • CI
  • Edge Clouds (experimental)

microstack currently provides Nova, Keystone, Glance, Horizon and Neutron OpenStack services.

If you want to roll up your sleeves and do interesting things with the services and settings, look in the .d directories in the filesystem tree under /var/snap/microstack/common/etc. You can add services with your package manager, or take a look at CONTRIBUTING.md and make a code based argument for adding a service to the default list. :-)

Installation

microstack is frequently updated to provide the latest stable updates of the most recent OpenStack release. The quickest was to get started is to install directly from the snap store. You can install microstack using:

sudo snap install microstack --classic --beta

Quickstart

To quickly configure networks and launch a vm, run

sudo microstack.init

This will configure various Openstack databases. Then run:

microstack.launch test.

This will launch an instance for you, and make it available to manage via the command line, or via the Horizon Dashboard.

To access the Dashboard, visit http://10.20.20.1 in a web browser, and login with the following credentials:

username: admin
password: keystone

To ssh into the instance, use the username "cirros" and the ssh key written to ~/.ssh/id_microstack:

ssh -i ~/.ssh/id_microstack cirros@<IP> (Where 'IP' is listed in the output of microstack.launch)

To run openstack commands, run microstack.openstack <some command>

For more detail and control, read the rest of this README. :-)

Accessing OpenStack

microstack provides a pre-configured OpenStack CLI to access the local OpenStack deployment; its namespaced using the microstack prefix:

microstack.openstack server list

You can setup this command as an alias for openstack if you wish (removing the need for the microstack. prefix):

sudo snap alias microstack.openstack openstack

Alternatively you can access the Horizon OpenStack dashboard on http://127.0.0.1 with the following credentials:

username: admin
password: keystone

Booting and accessing an instance

microstack comes preconfigured with networking and images so you can get starting using OpenStack as soon as microstack is installed; to boot an instance:

microstack.openstack server create --flavor m1.small --nic net-id=test --image cirros my-microstack-server

To access the instance, you'll need to assign it a floating IP address:

ALLOCATED_FIP=`microstack.openstack floating ip create -f value -c floating_ip_address external`
microstack.openstack server add floating ip my-microstack-server $ALLOCATED_FIP

and as you would expect, microstack is just like a full OpenStack Cloud and does not allow ingress access to the instance by default, so next enable SSH and ping access to the instance:

SECGROUP_ID=`microstack.openstack security group list --project admin -f value -c ID`
microstack.openstack security group rule create $SECGROUP_ID --proto tcp --remote-ip 0.0.0.0/0 --dst-port 22
microstack.openstack security group rule create $SECGROUP_ID --proto icmp --remote-ip 0.0.0.0/0

once this is complete you should be able to SSH to the instance:

ssh cirros@$ALLOCATED_FIP

Happy microstacking!

Stopping and starting microstack

You may wish to temporarily shutdown microstack when not in use without un-installing it.

microstack can be shutdown using:

sudo snap disable microstack

and re-enabled latest using:

sudo snap enable microstack

Raising a Bug

Please report bugs to the microstack project on launchpad: https://bugs.launchpad.net/microstack