Go to file
NucciTheBoss 87f1b2f5ec Overhaul build process for MicroStack snap
This commit contains multiple updates to the build process
for the MicroStack snap, and aims to resolve bugs encountered
when using MicroStack in strict confinement. Here is the
changelog below:

- snapcraft.yaml
  * Adding binding for keystone.conf file to layout.
  * Add home and removable-media interfaces to openstack app.
  * Add PYTHONPATH variable to parts that use python plugin.
  * Remove wheel as python-package and add python3-wheel as stage-package. See https://forum.snapcraft.io/t/error-invalid-command-bdist-wheel/18960.
  * Use absolute paths for route to requirements.txt file.
  * Add libdbi1, libpq5, libradcli4, and libmysqlclient21 as stage packages to nrpe part.
  * Use absolute path to patches directory for Nginx.

- tox.ini
  * Add warning to default multipass build. See https://bugs.launchpad.net/snapcraft/+bug/1982420.
  * Update test distros to newer versions of Ubuntu LTS.
  * Add TODO notes about updating tests.
  * Rework tests to be more inline with OpenStack Charm tests.

- lxd_build.sh
  * Remove Firefox, python3-selenium, and python3-petname install commands.
  * Remove apt purge for legacy LXD and /snap/bin takes higher precedence on PATH.
  * Comment out --http-proxy --https-proxy. See https://forum.snapcraft.io/t/error-unrecognized-arguments-http-proxy/30967.
  * Update snap install commands to follow convention.

- multipass_build.sh
  * Remove phantomjs due to security vulnerabilities
  * Update snap install commands to follow convention.

- test_setup.sh
  * Renamed basic_setup.sh to test_setup.sh to not confuse with basic functional test.
  * Add check to see if snap package had been built yet.
  * Install Firefox, python3-selenium, and python3-petname.
  * Change Firefox to snap package rather than deb package.
  * Add install mechanism for locally-built snap package.
  * Add for-loop to manually connect required interfaces to built snap package.

- test_cleanup.sh
  * Created file to cleanup host environment.
  * Add TODO note for further cleaning and/or switches to preserve environment.

Change-Id: Ib6ea367e15f25d0d40e4dbabd28222f37d250913
2022-07-22 17:28:06 -04:00
2020-03-05 09:31:15 +00:00
2021-05-26 16:39:33 -04:00
2021-07-14 10:53:48 +03:00

MicroStack

Snap Status

MicroStack is a single-machine, snap-deployed OpenStack cloud.

Common purposes include:

  • Development and testing of OpenStack workloads
  • Continuous integration (CI)
  • IoT and appliances
  • Edge clouds (experimental)
  • Introducing new users to OpenStack

Currently provided OpenStack services are: Nova, Keystone, Glance, Horizon, and Neutron.

MicroStack is frequently updated to provide the latest stable updates of the most recent OpenStack release.

Requirements: You will need at least 2 CPUs, 8 GiB of memory, and 100 GiB of disk space.

See the full MicroStack documentation.

Installation

At this time you can install from the --beta or --edge snap channels:

sudo snap install microstack --classic --beta

The edge channel is moving toward a strictly confined snap. At this time, it must be installed in devmode:

sudo snap install microstack --devmode --edge

Initialisation

Initialisation will set up databases, networks, flavors, an SSH keypair, a CirrOS image, and open ICMP/SSH security groups:

sudo microstack.init --auto

OpenStack client

The OpenStack client is bundled as microstack.openstack. For example:

microstack.openstack network list
microstack.openstack flavor list
microstack.openstack keypair list
microstack.openstack image list
microstack.openstack security group rule list

Creating an instance

To create an instance (called "awesome") based on the CirrOS image:

microstack.launch cirros --name awesome

SSH to an instance

The launch output will show you how to connect to the instance. For the CirrOS image, the user account is 'cirros'.

ssh -i ~/.ssh/id_microstack cirros@<ip-address>

Horizon

The launch output will also provide information for the Horizon dashboard. The username is 'admin' and the password can be obtained in this way:

sudo snap get microstack config.credentials.keystone-password

Removing MicroStack

To remove MicroStack, run:

sudo microstack.remove --auto

This will clean up the Open vSwitch bridge device and uninstall MicroStack. If you remove MicroStack with the snap remove command instead, don't worry -- the Open vSwitch bridge will disappear the next time that you reboot your system.

Note that you can pass any arguments that you'd pass to the snap remove command to microstack.remove. To purge the snap, for example, run:

sudo microstack.remove --auto --purge

LMA stack

Filebeat, Telegraf and NRPE are bundled as the snap systemd services.

Customising and contributing

To customise services and settings, look in the .d directories 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.

Reporting a bug

Please report bugs to the MicroStack project on Launchpad.

Description
OpenStack in a snap!
Readme 60 MiB
Languages
Python 43.8%
Jinja 36.7%
SCSS 10.5%
Shell 9%