Programmatic Access and Automation: Difference between revisions
No edit summary |
No edit summary |
||
| Line 93: | Line 93: | ||
| Terraform || This tool can be used to create an instance or a defined infrastructure. | | Terraform || This tool can be used to create an instance or a defined infrastructure. | ||
|- | |- | ||
| Ansible || Create roles or tasks for all customizations that you make in an instance. | | Ansible || Create roles or tasks for all customizations that you make in an instance.]. | ||
|} | |} | ||
== Does bwCloud-OS offer any templates for auto-deployment of OpenStack Instances? == | == Does bwCloud-OS offer any templates for auto-deployment of OpenStack Instances? == | ||
Yes. You can use this [https://github.com/bwCloud/ansible-template Ansible-template] or an easier start. | |||
Revision as of 16:02, 19 October 2025
| In a Nutshell |
|
Application Credentials
How can I create an application credential?
Application credential/ token allow to gain and control access to the Project. Therefore, respective privileges as members of the project are required.
Token create:
- Dashboard -> Indenty -> Application Credentials
- Create Application Credentials
- Fill out the opened form with name, secret and expiration date.
- Create Application Credentials
- Download openrc file
- Save file. E. g. as
my_token.sh - Save the secret protected.
Optional:
In my_token.sh replace the line export OS_APPLICATION_CREDENTIAL_SECRET=******************** by
echo "Passphrase: " read -sr os_credential_secret_input export OS_APPLICATION_CREDENTIAL_SECRET="$os_credential_secret_input"
Test Token
Source your credential file my_token.sh
source my_token.sh
Run the following command. You should see your credential ID.
curl \
-s \
-H "Content-Type: application/json" \
-d '{ "auth": { "identity": { "methods": ["application_credential"], "application_credential": { "id": "'${OS_APPLICATION_CREDENTIAL_ID}'", "secret": "'${OS_APPLICATION_CREDENTIAL_SECRET}'" }}}}' \
"${OS_AUTH_URL}/auth/tokens" \
| jq .token.application_credential
If the curl command is not available, install the corresponding package with your package manager.
OpenStack Client
How can I connect to the bwCloud-OS via CLI/OpenStack client?
The following describes how to connect using the python-openstackclient.
There are two ways to do that:
Via Tokens (recommended)
- Log in to the dashboard.
- Create a Token as described here. Save this file on your device (for example as
my_creds.sh). - Now run the following commands in a terminal:
# source ./my_creds.sh # openstack server list
Via Login-Password
- Log in to the dashboard.
- In the upper right corner, you will find the **OpenStack RC File** option, which provides you with a file containing your bwCloud credentials / access parameters. Save this file on your device (for example as
my_creds.sh). - Now run the following commands in a terminal:
# source ./my_creds.sh # openstack server list
You should now see all your servers.
Auto-Deployment
Proven methods for the (semi-)automated generation of services are listed below.
| Method | Usage |
|---|---|
| Terraform | This tool can be used to create an instance or a defined infrastructure. |
| Ansible | Create roles or tasks for all customizations that you make in an instance.]. |
Does bwCloud-OS offer any templates for auto-deployment of OpenStack Instances?
Yes. You can use this Ansible-template or an easier start.