Expand description
§cloudsctl
cloudsctl (pronounced “cloud skittle”) allows the user to modify their OpenStack
configuration (clouds.yaml, secure.yaml and clouds-public.yaml files) with a CLI.
cloudsctl can also inject cloud variables from clouds.yaml, secure.yaml and
clouds-public.yaml into the environment and run a command. This allows you to keep all your
cloud configuration in one place and get rid of any Openstack RC files you might have lying
around.
§Quickstart
§Create a profile
$ cloudsctl profile create --auth-url https://my-cloud.domain.tld:5000/v3 my-profileThis will create an OpenStack profile called my-profile in your clouds-public.yaml file.
§Show a profile
$ cloudsctl profile show my-profileThis will show you the profile my-profile
§List profiles
$ cloudsctl profile listThis will list all profiles in clouds-public.yaml
§Delete a profile
$ cloudsctl profile delete my-profileThis will delete the profile called my-profile from clouds-public.yaml
§Set profile settings
$ cloudsctl profile set --auth-url https://new-api:5000/v3 my-profileThis will change the auth-url for the profile my-profile to https://new-api:5000/v3 in
clouds-public.yaml.
Run cloudsctl profile set --help to see all the settings that you can change for a profile.
§Create a cloud
$ cloudsctl cloud create --username my-user --password-prompt --profile my-profile my-cloudThis will:
- create a cloud named
my-cloudinclouds.yamlthat uses themy-profileprofile fromclouds-public.yaml - put your password in
secure.yaml
§Show a cloud
$ cloudsctl cloud show my-cloudThis will show you the cloud my-cloud.
§List clouds
$ cloudsctl cloud listThis will list all clouds in clouds.yaml
§Delete a cloud
$ cloudsctl cloud delete my-cloudThis will delete the cloud called my-cloud from clouds.yaml
§Set cloud settings
$ cloudsctl cloud set --auth-url https://new-api:5000/v3 my-cloudThis will change the auth-url for the cloud my-cloud to https://new-api:5000/v3 in
clouds.yaml.
Run cloudsctl cloud set --help to see all the settings that you can change for a cloud.
§Copy cloud
$ cloudsctl cloud copy --username new_user source_cloud target_cloudThis will copy cloud source_cloud to target_cloud and set the user to new_user in the
target_cloud.
Run cloudsctl cloud copy --help to see all the settings that you can override in the target
cloud while copying from the source cloud.
§Inject cloud variables from configuration files into environment and run command.
$ cloudsctl cloud create --username my-user --password-prompt --project-name my-project --profile my-profile my-cloud
Password:
$ cloudsctl env my-cloud bash
$ env|grep OS_
OS_AUTH_URL=https://my-cloud.domain.tld:5000/v3
OS_VERIFY=false
OS_TENANT_NAME=my-project
OS_USERNAME=my-user
OS_PROJECT_NAME=my-project
OS_PASSWORD=foobash is the default command and could have been omitted in the command above.
I like to keep an alias called oscloud like this:
$ alias oscloud='cloudsctl env'
$ oscloud my-cloud
$ openstack server list
etc...§Shell completion
Thanks to clap, cloudsctl supports shell completion for bash, zsh, fish and elvish.
$ cloudsctl completion bashA completion file will be generated in the current directory.
Modules§
- cli
- cloud_
config - Models for OpenStack configuration.
- format