Skip to content

Instantly share code, notes, and snippets.

@pavel242242
Created May 25, 2022 08:14
Show Gist options
  • Save pavel242242/572efe332991225f55d363f88455cbc4 to your computer and use it in GitHub Desktop.
Save pavel242242/572efe332991225f55d363f88455cbc4 to your computer and use it in GitHub Desktop.
## get api token
curl --location --request POST 'http://IP:9047/apiv2/login' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
"userName": "chocho",
"password": "pwd"
}'
## get clusters
curl --location --request GET 'http://IP:9047/apiv2/provision/clusters' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: token' \
## add engine (with "small" m5d.xlarge instance)
curl --location --request POST 'http://IP:9047/apiv2/provision/cluster' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: token' \
--data-raw '{
"clusterType": "EC2",
"name": "keboola",
"isAllowAutoStop": true,
"isAllowAutoStart": false,
"shutdownInterval": 600,
"dynamicConfig": {
"containerCount": 1
},
"awsProps": {
"vpc": "dremio",
"subnetId": "dremio",
"useClusterPlacementGroup": true,
"disablePublicIp": false,
"sshKeyName": "dremio",
"instanceType": "m5d.xlarge",
"connectionProps": {
"authMode": "AUTO",
"region": "us-east-1"
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment