TechnologyJune 9, 2022

Ansible and Astra DB APIs – A Match Made in Heaven

Madhavan Sridharan
Madhavan Sridharan
Ansible and Astra DB APIs – A Match Made in Heaven
ansible-playbook astra_api.yml
ansible-playbook astra_api.yml --extra-vars 'astra_devops_api_auth_token=<your_iam_token_from_prerequisite_step2> astra_db_name=<name_for_your_db> astra_db_keyspace=<name_for_your_keyspace> astra_db_cloudProvider=<public_cloud_provider_name_AZURE_GCP_AWS> astra_db_tier=<astra_db_tier> astra_db_capacityUnits=<capacity_unit_in_numeric> astra_db_region=<your_astra_db_region> astra_db_username=<your_astra_username> astra_db_tableName=<name_for_the_table>'
astra_devops_api_auth_token
astra_db_name
astra_db_keyspace
astra_db_cloudProvider
astra_db_tier
astra_db_region
astra_db_tableName
astra_db_username
astra_db_password
astra_db_capacityUnits
PLAY RECAP ************************************************************************************************************************
localhost : ok=19 changed=0 unreachable=0 failed=0 skipped=4 rescued=0 ignored=0 
$ ansible-playbook astra_api.yml --extra-vars 'astra_devops_api_auth_token=AstraCS:CHANGE:ME astra_db_name=astra astra_db_keyspace=astra astra_db_cloudProvider=GCP astra_db_tier=serverless astra_db_capacityUnits=1 astra_db_region=us-east1 astra_db_username=astra astra_db_tableName=astra'

PLAY [localhost] *****************************************************************************************************************************************************

TASK [Returns supported regions and availability for a given user and org combination] ****************************************************************************************************************************
ok: [localhost] => {...},
"json": [{"cloudProvider": "GCP","cost": {...}, …,"description": "Free tier: Try Astra with no obligation. Get 5 GB of storage, free forever.",
"region": "us-east1", "regionContinent": "North America","regionDisplay": "Moncks Corner, South Carolina", "tier": "serverless"},{...}],
"msg": "OK (unknown bytes)", "status": 200,"url": "https://api.astra.datastax.com/v2/availableRegions"}
Discover more
DataStax Astra DBGraphQLdata operations
Share

One-stop Data API for Production GenAI

Astra DB gives JavaScript developers a complete data API and out-of-the-box integrations that make it easier to build production RAG apps with high relevancy and low latency.