OpenStack: Difference between revisions

From Cheatsheet
Jump to navigationJump to search
No edit summary
Line 2: Line 2:


== Modules ==
== Modules ==
=== Glance ===
Tenant example: '''as8d76asd976ds798a6d78sa95das7968d5as978''' </br>
Image example: '''as7das90d-asd867as89d6sa9-7a6sd78as6d78'''
<syntaxhighlight lang="bash">
# 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
</syntaxhighlight>
==== Image sharing ====
<syntaxhighlight lang="bash">
# 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
</syntaxhighlight>
=== Magnum ===
=== Magnum ===
Magnum is used to create Kubernetes clusters.
Magnum is used to create Kubernetes clusters.

Revision as of 17:12, 31 July 2023


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