MOCs

Overview

Documentation

Services Commands:

Display services:

microstack.openstack catalog list

Display users:

microstack.openstack user list

Display images:

microstack.openstack image list

Display networks:

microstack.openstack network list

Display hypervisors:

microstack.openstack hypervisor list

Dashboard Navigation:

Themes:

Users:

Access users:

Change user password:

Project Menu:

Project drop down:

The Project menu on the left is grouped into three sections:

  • API Access provides information about API endpoints of OpenStack services.
  • Compute provides access to project compute resources, such as instances.
  • Network provides access to project network resources, such as virtual networks.

List images for a project:

Admin Menu:

The Admin menu on the left is grouped into five sections:

  • Overview displays usage metrics across all projects.
  • Compute provides access to global compute resources, such as hypervisors.
  • Network provides access to global network resources, such as RBAC policies.
  • System provides access to various system information.
  • Optimization currently not used

Identity Menu:

The Identity menu on the left is grouped into six sections:

  • Domains provides acces to domains.
  • Projects provides access to project accounts.
  • Users provides access to user accounts.
  • Groups provides access to user groups.
  • Roles provides access to user roles.
  • Application Credentials provides access to application credentials.

Templates:

Create Image:

microstack.openstack image create --disk-format qcow2 --min-disk 8 --min-ram 512 --file ~/Downloads/focal-server-cloudimg-amd64-disk-kvm.img --private paul-focal

List images:

microstack.openstack image list

Manage through dashboard:

Example upload:

  • Image Name - Type ubuntu-focal
  • File - Click Browse and find the focal-server-cloudimg-amd64-disk-kvm.img file in your Downloads directory
  • Format - Select QCOW2 - QEMU Emulator
  • Minimum Disk (GB) - Type 8
  • Minimum RAM (MB) - Type 512
  • Visibility - Choose Private

Manage flavors:

Create a flavor:

microstack.openstack flavor create --ram 1024 --disk 10 --vcpus 1 paul-flavor

List flavors:

microstack.openstack flavor list

Manage flavors in dashboard:

To create the flavor, fill in the form as follows:

  • Name - Type paul-flavor
  • VCPUS - Type 1
  • RAM (MB) - Type 1024
  • Root Disk (GB) - Type 10

Identities:

Manage Domains:

Create domain:

microstack.openstack domain create --description "paul_domain" pauldomain

List domain:

microstack.openstack domain list

Create domain user:

microstack.openstack user create --domain pauldomain --password <password> admin
microstack.openstack role add --domain pauldomain --user-domain pauldomain --user admin admin

Oliver added the following code to enable domains:
Add the following to /var/snap/microstack/common/etc/horizon/local\_settings.d/\_05\_snap\_tweaks.py to enable domains:

# Setup multidomain support
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"

Additions seen added to _05_snap_tweaks.py:

Then ran:

sudo snap restart microstack.horizon-uwsgi

To login with domain user:

Domains:

Manage Roles:

Create role:

microstack.openstack role create _paulmember_

List roles:

microstack.openstack role list

Project management:

Create project:

microstack.openstack project create --domain pauldomain paulproject

List project in domain:

microstack.openstack project list --domain pauldomain

User and group management:

Create new user:

microstack.openstack user create --domain pauldomain --password <password> admin2

Create a new group:

microstack.openstack group create --domain pauldomain paulgroup

List groups:

microstack.openstack group list --domain pauldomain

Membership and assignment management:

Add user to group:

microstack.openstack group add user --group-domain pauldomain --user-domain pauldomain paulgroup admin2

Assign group to project:

microstack.openstack role add --project paulproject --project-domain pauldomain --group paulgroup --group-domain pauldomain member

Multi-tenancy:

Setup:

sudo apt install python3-pip python3.10-venv -y
 
python3 -m venv venv
source venv/bin/activate
pip install python-openstackclient
 
source ~/Downloads/pauldomain_admin2.sh

Keypair:

openstack --insecure keypair create --private-key ./mykeypair.pem --type ssh mykeypair

Networking:

Network:

Create network:

microstack.openstack network create paulnetwork

List networks:

microstack.openstack network list

Subnet:

Create subnet:

microstack.openstack subnet create --network paulnetwork --subnet-range 10.5.0.0/24 --allocation-pool start=10.5.0.75,end=10.5.0.100 --dns-nameserver 1.1.1.1 paulsubnet

List subnets:

microstack.openstack subnet list

Routers:

Create:

microstack.openstack router create paulrouter

List:

microstack.openstack router list

Set external network:

microstack.openstack router set --external-gateway external-network paulrouter

Add subnet:

microstack.openstack router add subnet paulrouter paulsubnet

Floating IPs:

Create:

microstack.openstack floating ip create external

List:

microstack.openstack floating ip list

Security Groups:

Create:

microstack.openstack security group create paulsecuritygroup

List:

microstack.openstack security group list

All 22 to my security group:

microstack.openstack security group rule create --remote-ip 0.0.0.0/0 --dst-port 22:22 --protocol tcp --ingress paulsecuritygroup

List rules:

microstack.openstack security group rule list paulsecuritygroup

Instances:

Launch instance:

Launch:

microstack.openstack --insecure server create --flavor paul-flavor --image cirros --network paulnetwork --key-name mykeypair --min 2 --max 2 paulinstance

Server list:

microstack.openstack server list

Floating IP to instance:

IP=$(openstack --insecure floating ip list | tail -n 2 | head -n 1 | awk '{print $4}')
microstack.openstack --insecure server add floating ip paulinstance $IP

Attach security to instance:

microstack.openstack server add security group paulinstance paulsecuritygroup

Attach security group:

chmod 0400 ~/Downloads/mykeypair.pem
IP=$(openstack floating ip list | tail -n 2 | head -n 1 | awk '{print $4}')
ssh -i ~/Downloads/mykeypair.pem -o StrictHostKeyChecking=no cirros@$IP

Delete Instance:

microstack.openstack server delete paulinstance