Skip to content

Instantly share code, notes, and snippets.

@strigazi
Created December 14, 2017 12:32
Show Gist options
  • Save strigazi/ae99e6a9c41c778da0cd80f47acf56c8 to your computer and use it in GitHub Desktop.
Save strigazi/ae99e6a9c41c778da0cd80f47acf56c8 to your computer and use it in GitHub Desktop.
#!/bin/bash -x
# Upgrade curl
example_req=$(cat << EOF
{
"max_batch_size": 1,
"nodegroup": "master",
"parameters": {"image": "fedora-atomic-new", "kube_tag": "v1.8.2"}
}
EOF
)
CLUSTER="f4ce0aff-fcd4-4a7b-ba27-4ee8d92423f0"
USER_TOKEN=`openstack token issue | grep "| id" | awk '{print $4}'`
curl -g -i -X PATCH http://137.138.148.67:9511/v1/clusters/${CLUSTER}/actions/upgrade \
-H "OpenStack-API-Version: container-infra latest" \
-H "X-Auth-Token: $USER_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "User-Agent: None" \
-d "$example_req"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment