Programmatic Access and Automation: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 5: | Line 5: | ||
}} | }} | ||
__TOC__ | __TOC__ | ||
=application credential = | =application credential = | ||
Revision as of 15:49, 8 October 2025
| In a Nutshell |
|
This section covers advanced automation options in bwCloud-OS. Experienced users can create Application Credentials (tokens) to enable programmatic or automated access — for example, when using Ansible or Terraform. Regular users usually don’t need this feature; it’s intended for automation and infrastructure setups only. |
application credential
create 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"
token test
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.
Prepare instance via Ansible
To control and customize your default instance, you can use automated methods.
- Create an access token/application credential as defined below.
- Tried and tested methods for automation are listed below. Use the Ansible template specified there. Follow the steps described there.
| 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. For an easier start, you can use our template. |