User Tools

Site Tools


infrastructure:openstack

OpenStack documentation

How to use the OpenStack platform provided by OSUOSL: create VM, manage them, etc.

All documentation here applies to the OpenStack web interface

Purpose and limitations

OSUOSL is graciously providing resources on their OpenStack cluster (thank you!)

The main purpose is to run reliable builders, which is needed when building OpenWrt releases.

A secondary purpose is to run CI tasks for OpenWrt.

We are limited to run no more than 8 VMs at any given time, with ample limits regarding RAM and CPU cores.

Initial setup: add your SSH public key

Go to “Compute / Key Pairs” and use “Import Public Key”. You should copy/paste your SSH public key.

You can add several public keys, and even add public keys of other admins. These keys will be available when creating a virtual machine.

It is also possible to copy/paste several SSH keys into a single “Key Pair”, simply separate them with newlines. It is useful because OpenStack only allows one Key Pair when creating a VM.

Create a new virtual machine

Go to “Compute / Instances” and use “Launch Instance”.

Most of the parameters are self-explanatory, with a few exceptions:

  • Create New Volume:
    • if enabled, an OpenStack-managed volume will be created to store the VM disk. This volume will be stored on a Ceph cluster. When deleting the VM, the volume can be kept around and attached to a new VM later on.
    • if disabled, the VM disk will be stored on the same Ceph cluster but outside of OpenStack. When deleting the VM, its disk will also be deleted. This is most suitable for “throwable” virtual machines that don't store important data.
  • Networks: use general_servers1
  • Key Pair: select the SSH key that should be installed. It seems only a single key is accepted.

Connect to the virtual machine

Look up the IP address shown in the list of instances.

You can login with SSH, using your SSH key.

The SSH username is usually the name of the distribution: “debian”, “ubuntu”, etc. If you can't find it, check the documentation of your distribution, the keywords are “openstack” and “cloud-init”.

The default user usually has passwordless sudo privileges.

See https://docs.openstack.org/image-guide/obtain-images.html for more documentation on distro images.

Troubleshooting

Connect with serial console

OpenStack has a browser-based serial console with which you can debug a VM. This is useful if network configuration is broken.

However, you need to know the password of an existing user. There is no default password in Debian images.

Reset a virtual machine

If something goes wrong, you can “rebuild” a virtual machine from the list of instances.

This will erase everything and go back to the initial state of the image (in our case, a standard Debian). Be careful, this will also reset SSH keys, so make sure you have access to the SSH key that was used to create the virtual machine. It will also change the SSH host key.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
infrastructure/openstack.txt · Last modified: 2020/08/19 21:03 by zorun