Services Commands:
Display services:
Copy microstack.openstack catalog list
Display users:
Copy microstack.openstack user list
Display images:
Copy microstack.openstack image list
Display networks:
Copy microstack.openstack network list
Display hypervisors:
Copy microstack.openstack hypervisor list
Dashboard Navigation:
Themes:
Users:
Access users:
Change user password:
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:
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
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:
Copy 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:
Copy 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:
Copy microstack.openstack flavor create --ram 1024 --disk 10 --vcpus 1 paul-flavor
List flavors:
Copy microstack.openstack flavor list
Manage flavors in dashboard:
To create the flavor, fill in the form as follows:
Identities:
Manage Domains:
Create domain:
Copy microstack.openstack domain create --description "paul_domain" pauldomain
List domain:
Copy microstack.openstack domain list
Create domain user:
Copy 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:
Copy # Setup multidomain support
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = "Default"
Additions seen added to _05_snap_tweaks.py
:
Then ran:
Copy sudo snap restart microstack.horizon-uwsgi
To login with domain user:
Domains:
Manage Roles:
Create role:
Copy microstack.openstack role create _paulmember_
List roles:
Copy microstack.openstack role list
Project management:
Create project:
Copy microstack.openstack project create --domain pauldomain paulproject
List project in domain:
Copy microstack.openstack project list --domain pauldomain
User and group management:
Create new user:
Copy microstack.openstack user create --domain pauldomain --password <password> admin2
Create a new group:
Copy microstack.openstack group create --domain pauldomain paulgroup
List groups:
Copy microstack.openstack group list --domain pauldomain
Membership and assignment management:
Add user to group:
Copy microstack.openstack group add user --group-domain pauldomain --user-domain pauldomain paulgroup admin2
Assign group to project:
Copy microstack.openstack role add --project paulproject --project-domain pauldomain --group paulgroup --group-domain pauldomain member
Multi-tenancy:
Setup:
Copy 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:
Copy openstack --insecure keypair create --private-key ./mykeypair.pem --type ssh mykeypair
Networking:
Network:
Create network:
Copy microstack.openstack network create paulnetwork
List networks:
Copy microstack.openstack network list
Subnet:
Create subnet:
Copy 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:
Copy microstack.openstack subnet list
Routers:
Create:
Copy microstack.openstack router create paulrouter
List:
Copy microstack.openstack router list
Set external network:
Copy microstack.openstack router set --external-gateway external-network paulrouter
Add subnet:
Copy microstack.openstack router add subnet paulrouter paulsubnet
Floating IPs:
Create:
Copy microstack.openstack floating ip create external
list:
Copy microstack.openstack floating ip list
Security Groups:
Create:
Copy microstack.openstack security group create paulsecuritygroup
list:
Copy microstack.openstack security group list
All 22 to my security group:
Copy microstack.openstack security group rule create --remote-ip 0.0.0.0/0 --dst-port 22:22 --protocol tcp --ingress paulsecuritygroup
List rules:
Copy microstack.openstack security group rule list paulsecuritygroup
Instances:
Launch instance:
launch:
Copy microstack.openstack --insecure server create --flavor paul-flavor --image cirros --network paulnetwork --key-name mykeypair --min 2 --max 2 paulinstance
Server list:
Copy microstack.openstack server list
Floating IP to instance:
Copy 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:
Copy microstack.openstack server add security group paulinstance paulsecuritygroup
Attach security group:
Copy chmod 0400 ~/Downloads/mykeypair.pem
Copy 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:
Copy microstack.openstack server delete paulinstance