#!/usr/bin/env bash

# omarchy:summary=Install CloudMonkey and the OpenStack command-line clients
# omarchy:requires-sudo=true

# Based: cmk through asdf, from the plugin Based maintains, and the OpenStack
# clients from Debian's python3-*client packages; the Mac gets the
# openstackclient formula, which bundles the common services.

set -eo pipefail

asdf_data=${ASDF_DATA_DIR:-$HOME/.asdf}
omarchy-pkg-add asdf
export PATH="$asdf_data/shims:$PATH"

echo -e "Installing CloudMonkey...\n"
omarchy-dev-env-tool cloudmonkey

echo -e "\nInstalling the OpenStack clients...\n"
omarchy-pkg-add python3-openstackclient brew=openstackclient python3-barbicanclient linux=only \
  python3-cinderclient linux=only python3-designateclient linux=only python3-glanceclient linux=only \
  python3-heatclient linux=only python3-magnumclient linux=only python3-neutronclient linux=only \
  python3-octaviaclient linux=only python3-swiftclient linux=only
