Skip to content

Commit aabca55

Browse files
Migrate update version to management APIv2 (#3430)
1 parent 1c3636d commit aabca55

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/ansible/deploy.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@
117117
shell:
118118
cmd: |
119119
INSTANCE_ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)
120-
curl -sfS -d '{"version": {{ current_version }} }' -X PATCH {{ console_mgmt_base_url }}/api/v1/pageservers/$INSTANCE_ID
120+
curl -sfS -H "Authorization: Bearer {{ CONSOLE_API_TOKEN }}" {{ console_mgmt_base_url }}/management/api/v2/pageservers/$INSTANCE_ID | jq '.version = {{ current_version }}' > /tmp/new_version
121+
curl -sfS -H "Authorization: Bearer {{ CONSOLE_API_TOKEN }}" -X POST -d@/tmp/new_version {{ console_mgmt_base_url }}/management/api/v2/pageservers
121122
tags:
122123
- pageserver
123124

@@ -186,6 +187,7 @@
186187
shell:
187188
cmd: |
188189
INSTANCE_ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)
189-
curl -sfS -d '{"version": {{ current_version }} }' -X PATCH {{ console_mgmt_base_url }}/api/v1/safekeepers/$INSTANCE_ID
190+
curl -sfS -H "Authorization: Bearer {{ CONSOLE_API_TOKEN }}" {{ console_mgmt_base_url }}/management/api/v2/safekeepers/$INSTANCE_ID | jq '.version = {{ current_version }}' > /tmp/new_version
191+
curl -sfS -H "Authorization: Bearer {{ CONSOLE_API_TOKEN }}" -X POST -d@/tmp/new_version {{ console_mgmt_base_url }}/management/api/v2/safekeepers
190192
tags:
191193
- safekeeper

0 commit comments

Comments
 (0)