Openstack
What does it mean
aodh Alarming service barbican REST API designed for the secure storage, provisioning and management of secrets such as passwords, encryption keys and X.509 cinder OpenStack Block Storage gnocchi Time Series Database as a Service glance OpenStack Image Service heat Deploy instances, volumes and other OpenStack services using YAML based templates. horizon Openstack’s Dashboard, which provides a web based user interface to OpenStack services ironic bootstrap magnum container orchestration engines Mistral workflow service keystone identity service neutron networking as a service octavia Load balancer swift OpenStack Object Storage
bash completion
. <(openstack complete 2>/dev/null )
list volumes
openstack volume list
install openstack
dnf install python3-openstackclient
get ip addresses of all host
openstack server list -c Networks -f json | jq -r '.[].Networks[][]'
output
-f csv,json,table,value,yaml
list all
openstack command list -f yaml | grep - | grep list | sed 's/^ - /openstack /g' |grep -v "openstack command list" | while read i ; do echo '*' $i ; $i 2>&1 ; done | tee /tmp/openstack_list_resources.${OS_CLOUD}
How to reach nodes
OPENSTACK=$(openstack server list -c Networks -f json | jq -r '.[].Networks[][]') ; OPENSTACK_JUMP=$(grep 185 <<< "${OPENSTACK}") ; NODES=$(grep -v 185 <<< "${OPENSTACK}") ; for NODE in ${NODES} ; do echo ssh -J core@${OPENSTACK_JUMP} core@${NODE} ; done
create server
openstack server create --flavor gp.1x2 --availability-zone europe-se-1a --image fedora-37-x86_64 --boot-from-volume 100 --network abjorklund-01-5tsbc-openshift --security-group ssh_allow --key-name abjorklund_ed25519 abjorklund_$(date_file)
get router ip
List routers
openstack router list
Get external ip.
openstack router show abjorklund-01-5tsbc-external-router -c external_gateway_info -f json | jq '.external_gateway_info.external_fixed_ips[0].ip_address' 185.102.213.238
Download image
Get info about image.
openstack image list | grep -i nord-ic- | 98c03b69-4ba8-4276-8695-b6c3f006cf20 | nord-ic-bc84t-rhcos | active | glance image-download --file nord-ic-bc84t-rhcos --progress 98c03b69-4ba8-4276-8695-b6c3f006cf20