Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.

Build OpenStack infrastructure from command-line using openstack client

Pre-requisites

  • Linux/Mac/WSL2 terminal
  • BASH shell
  • installed openstack client (how?)
  • MetaCentrum OpenStack cloud group project granted.
  • downloaded application credentials from OpenStack Horizon dashboard (how?) and store as text file project_openrc.sh.inc.

How to use the script

# in bash shell
source project_openrc.sh.inc
./cmdline-demo.sh g2-prod-brno basic-infrastructure-1

See linked reference executions.

Infrastructure overview

How does the basic infrastructure looks like?

  • single VM (ubuntu-jammy)
    • VM firewall opening port 22
    • VM SSH keypair generated locally and pubkey uploaded to cloud
    • attached additional volume (size 10GB)
  • private subnet and network
  • router to external internet
  • public floating ip address

basic-infrastructure.png

G1 and G2 cloud differences

Inspect (g1-prod-brno.sh.inc, g2-prod-brno.sh.inc, g2-prod-ostrava.sh.inc) include shell files to see what needs to be changed.