OpenStack in a snap!
Go to file
Dmitrii Shcherbakov a904cb6804 Rework the test framework & the clustering test
* Remove the dead code;
* Rework the test types;
* Restore the instance connectivity check;
* Rework the clustering test to support the new node addition workflow;
* Check whether a machine where MicroStack is installed has hardware
  virtualization capabilities for different architectures. If not, use
  software emulation;
  * the host model is used with KVM since the default QEMU CPU models on
    x86_64 are subject to vulnerabilities without certain CPU-specific
    features. This conflicts with being able to use live migration
    reliably across hosts with different CPUs.
* Add a default-source-ip init argument to allow controlling the source
  IP of the installation host that will be used as a control ip or
  compute ip locally.
  * used in the clustering test so that the local host IP on the
    multipass network is used as a control IP instead of the IP
    through which the default gateway is available;
  * the IP through which the default gateway is accessible is
    used as a fallback for default-source-ip;
* Given upstream CI has a low amount of resources allocated per machine
  use LXD to set up a dummy compute node;
  * Set RLIMIT_MEMLOCK to 'unlimited' in the LXD container profile
    (see the discussion in LP: #1906280);
  * set remember_owner to 0 in qemu.conf for libvirt to avoid the
    uses of XATTRS (the root user is used anyway so there is no
    need to remember a file owner), otherwise libvirt errors out
    in an unprivileged LXD container.
* Use numeric versions of OpenStack packages in the python-packages
  section of the openstack-projects part since the resolver change in
  recent versions of pip disallows for constraints dependencies of
  packages that come from a URL or a path.
  https://github.com/pypa/pip/issues/8210
  * The newest released version of pip is always used during builds
    since snapcraft uses venv to set up virtual environments and the
    ensurepip package is invoked such that a pip version shipped with
    the distro version of python is upgraded:
    https://github.com/python/cpython/blob/3.8/Lib/venv/__init__.py#L282-L289
            cmd = [context.env_exe, '-Im', 'ensurepip', '--upgrade',
                                                    '--default-pip']
  * Environment variables are ignored when pip is installed in the venv:
    https://docs.python.org/3/using/cmdline.html#id2 (-I option)
    So there is no way to use the old pip version resolver.

Minor clustering client and add-compute changes:

* use stderr for diagnostic messages;
* use stdout to output the connection string so that it can be easily
  picked up by CLI tools without parsing.

Change-Id: I5cb3872c5d142c34da2c8b073652c67021d9ef55
2021-01-15 15:58:03 +03:00
checks Added Filebeat, NRPE and Telegraf to Microstack 2020-02-11 14:33:26 +00:00
patches Use focal/core20/Ussuri/OVN & enable confinement 2020-09-25 13:20:12 +00:00
snap/hooks Fix service enablement during init 2020-11-12 15:01:32 +03:00
snap-overlay Rework the test framework & the clustering test 2021-01-15 15:58:03 +03:00
snap-wrappers Skip hostname checks and drop IP-based ACLs 2020-11-09 13:30:41 +03:00
tests Rework the test framework & the clustering test 2021-01-15 15:58:03 +03:00
tools Rework the test framework & the clustering test 2021-01-15 15:58:03 +03:00
.gitignore Strict confinement (devmode) 2020-03-05 09:31:15 +00:00
.gitreview Added automated testing via tox and zuul. 2019-07-24 08:04:38 +01:00
.zuul.yaml Migrate functional testing to third-parth CI 2021-01-15 14:08:02 +03:00
CONTRIBUTING.md Updated "Building MicroStack" section of CONTRIBUTING.md 2019-11-14 17:36:25 +00:00
DEMO.md Add Secure Clustering 2020-10-15 01:37:33 +03:00
filebeat.pgp.key Added Filebeat, NRPE and Telegraf to Microstack 2020-02-11 14:33:26 +00:00
osci.yaml Migrate functional testing to third-parth CI 2021-01-15 14:08:02 +03:00
README.md Add command to README for retrieving admin password 2020-12-03 16:44:31 +00:00
snapcraft.yaml Rework the test framework & the clustering test 2021-01-15 15:58:03 +03:00
telegraf.pgp.key Added Filebeat, NRPE and Telegraf to Microstack 2020-02-11 14:33:26 +00:00
test-requirements.txt Rework the test framework & the clustering test 2021-01-15 15:58:03 +03:00
tox.ini Rework the test framework & the clustering test 2021-01-15 15:58:03 +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.