OpenStack

From Cheatsheet
Revision as of 17:12, 31 July 2023 by Patrick (talk | contribs)
Jump to navigationJump to search


Modules

Glance

Tenant example: as8d76asd976ds798a6d78sa95das7968d5as978
Image example: as7das90d-asd867as89d6sa9-7a6sd78as6d78

# List all available images for the current Tenant
openstack image list

# Set an Image owner to a specific project
openstack image set as7das90d-asd867as89d6sa9-7a6sd78as6d78 --project as8d76asd976ds798a6d78sa95das7968d5as978

Image sharing

# From the Image owners' OpenRC
openstack image add project as7das90d-asd867as89d6sa9-7a6sd78as6d78 as8d76asd976ds798a6d78sa95das7968d5as978

# Verify status of the shared image
openstack image member list as7das90d-asd867as89d6sa9-7a6sd78as6d78

# Source the receiving Tenant's OpenRC
# Accept the image
 openstack image set --accept as7das90d-asd867as89d6sa9-7a6sd78as6d78

# Stop sharing from the owners' OpenRC
 openstack image remove project as7das90d-asd867as89d6sa9-7a6sd78as6d78 as8d76asd976ds798a6d78sa95das7968d5as978

Magnum

Magnum is used to create Kubernetes clusters.

# Check the Tenants' Overview tab to verify sufficient Quota has been assigned for the new nodes.
# Source the relevant OpenRC file.

# Create a Magnum template.
openstack coe cluster template create --coe kubernetes --image fedora-coreos-36 --external-network Internet-network --network-driver flannel --dns-nameserver 1.1.1.1 --master-flavor c2r4 --flavor c2r4 --docker-storage-driver overlay2 MyTemplate-v1.00

# Deploy cluster based on previously created template.
openstack coe cluster create --cluster-template MyTemplate-v1.00 --keypair MyKeyPair-2023 --master-count 1 --node-count 2 --master-flavor c1r4 --flavor c2r4 --fixed-network Tenant-Tnternal-Network --fixed-subnet Tenant-Tnternal-Network_Subnet --floating-ip-disabled MyClusterName-v1.00