Perform blue/green deployment
Learn how to use the IS Deployments API to perform a blue/green deployment of InsuranceSuite apps.
Before you perform a blue/green deployment, make sure that you have the required credentials and your planet and app meet criteria for the blue/green deployment. For details, see Before you begin in Guidewire Cloud Platform documentation.
All the sample requests in this guide include the following path parameters:
Parameter name | Description |
---|---|
tenantId | Your tenant ID. |
projectId | ID of a star system that includes the InsuranceSuite app that you deploy. |
planetId | ID of a planet to which you deploy the app. |
branchId | ID of a branch from which you deploy the app build. |
Get a list of branches
To list all the branches for a star system, send the following GET
request:
curl -X 'GET' \
'{baseURL}/api/v1/tenants/{tenantId}/starsystems/{projectId}/planets/{planetId}/is/builds/branches' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}'
Get a list of builds
To get a list of builds available for a particular branch, send the following GET
request:
curl -X 'GET' \
'{baseURL}/api/v1/tenants/{tenantId}/starsystems/{projectId}/planets/{planetId}/is/builds?branch=${branch}' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}' \
A response contains a JSON object with a list of available builds.
[
{
"id": "cm/10/16",
"application": "cm",
...
},
{
"id": "cc/16/15",
"application": "cc",
...
},
{
"id": "pc/1/2",
"application": "pc",
...
}
]
Perform blue/green deployment with new builds
To specify a new build for an app, send the following POST
request:
curl -X 'POST' \
'{baseURL}/api/v1/tenants/{tenantId}/starsystems/{projectId}/planets/{planetId}/upgrade' \
-H 'Content-Type:application/json' \
-H 'Authorization: Bearer {access_token}' \
-d '{body}'
Where {body}
is an array of objects that represent an InsuranceSuite app to deploy. For example, to perform a blue/green deployment of ClaimCenter with new builds, use:
{
"applications": [
{
"application": "cc",
"buildId": "cc/16/15"
}
],
"autopilot": true,
"plannedShutdownTimeoutMins": 0,
"strategy": "blueGreen"
}
Check the deployment status
To check if the selective deployment is completed, send the following GET
request:
curl -X 'GET' \
'{baseURL}/api/v1/tenants/{tenantId}/starsystems/{projectId}/planets/{planetId}/status' \
-H 'accept: application/json' \
-H 'Authorization: Bearer {access_token}' \
The blue/green deployment is completed when the value of phase
is UPGRADED
, and of phaseDetails
is Application upgraded
.
{
"phase": "UPGRADED",
"planetId": "devabc",
"deploymentId": "0x0x0xx0-0000-0000-0000-00000x00xxx0",
"activityName": "UpgradeJob",
"operationInProgress": false,
"phaseDetails": "Application upgraded",
"applications": [
{
...
}
]
}
Was this page helpful?