| name | guidewire-multi-env-setup |
| description | Configure multi-environment setup for Guidewire InsuranceSuite including development,
staging, and production environments with proper isolation and promotion workflows.
Trigger with phrases like "guidewire environments", "multi-environment",
"dev staging production", "environment configuration", "environment promotion".
|
| allowed-tools | Read, Write, Edit, Bash(curl:*), Bash(gradle:*), Grep |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
Guidewire Multi-Environment Setup
Overview
Configure and manage multiple Guidewire InsuranceSuite environments with proper isolation, configuration management, and promotion workflows.
Prerequisites
- Guidewire Cloud Console access for all environments
- Understanding of environment promotion workflows
- Git-based configuration management
- CI/CD pipeline infrastructure
Environment Topology
┌─────────────────────────────────────────────────────────────────────────────────┐
│ Environment Landscape │
├─────────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
│ │ DEV │───▶│ QA │───▶│ UAT │───▶│ PROD │ │
│ │ │ │ │ │ │ │ │ │
│ │ Feature │ │ Integration│ │ Acceptance│ │ Production│ │
│ │ Development│ │ Testing │ │ Testing │ │ │ │
│ └───────────┘ └───────────┘ └───────────┘ └───────────┘ │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────────────────────────┐ │
│ │ Shared Infrastructure │ │
│ │ • Identity Provider (Guidewire Hub) │ │
│ │ • Document Storage │ │
│ │ • Monitoring/Logging │ │
│ └─────────────────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────────┘
Instructions
Step 1: Environment Configuration Files
config/
├── environments/
│ ├── base/
│ │ ├── database.properties
│ │ ├── logging.properties
│ │ └── integration.properties
│ ├── dev/
│ │ ├── env.properties
│ │ └── secrets.encrypted
│ ├── qa/
│ │ ├── env.properties
│ │ └── secrets.encrypted
│ ├── uat/
│ │ ├── env.properties
│ │ └── secrets.encrypted
│ └── prod/
│ ├── env.properties
│ └── secrets.encrypted
└── gradle.properties
Step 2: Environment-Specific Properties
# config/environments/dev/env.properties
environment=development
environment.code=DEV
# Guidewire Cloud endpoints
gw.tenant.id=your-tenant-dev
gw.hub.url=https://hub-dev.guidewire.com
gw.api.base.url=https://your-tenant-dev.cloud.guidewire.com
# Application URLs
policycenter.url=${gw.api.base.url}/pc/rest
claimcenter.url=${gw.api.base.url}/cc/rest
billingcenter.url=${gw.api.base.url}/bc/rest
# Database (Guidewire managed)
database.readonly.enabled=false
# Logging
logging.level.root=DEBUG
logging.level.gw.api=DEBUG
logging.level.gw.custom=DEBUG
# Features
feature.debug.enabled=true
feature.sample.data.enabled=true
feature.mock.integrations=true
# Integration endpoints (mocked in dev)
integration.rating.url=http://localhost:8081/mock/rating
integration.mvr.url=http://localhost:8081/mock/mvr
integration.credit.url=http://localhost:8081/mock/credit
# config/environments/prod/env.properties
environment=production
environment.code=PROD
# Guidewire Cloud endpoints
gw.tenant.id=your-tenant-prod
gw.hub.url=https://hub.guidewire.com
gw.api.base.url=https://your-tenant.cloud.guidewire.com
# Application URLs
policycenter.url=${gw.api.base.url}/pc/rest
claimcenter.url=${gw.api.base.url}/cc/rest
billingcenter.url=${gw.api.base.url}/bc/rest
# Database
database.readonly.enabled=false
# Logging
logging.level.root=WARN
logging.level.gw.api=INFO
logging.level.gw.custom=INFO
# Features
feature.debug.enabled=false
feature.sample.data.enabled=false
feature.mock.integrations=false
# Integration endpoints (production)
integration.rating.url=https://rating.production.com/api
integration.mvr.url=https://mvr.production.com/api
integration.credit.url=https://credit.production.com/api
Step 3: Gradle Environment Configuration
// build.gradle
plugins {
id 'com.guidewire.gradle' version '10.12.0'
}
// Environment-specific configuration
ext {
environment = project.findProperty('env') ?: 'dev'
envConfigDir = file("config/environments/${environment}")
}
// Load environment properties
def loadEnvProperties() {
def props = new Properties()
// Load base properties
file('config/environments/base').eachFile { f ->
if (f.name.endsWith('.properties')) {
props.load(f.newReader())
}
}
// Load environment-specific properties (override base)
envConfigDir.eachFile { f ->
if (f.name.endsWith('.properties')) {
props.load(f.newReader())
}
}
return props
}
ext.envProps = loadEnvProperties()
// Configure Guidewire plugin with environment
guidewire {
server {
environment = project.ext.environment
properties = project.ext.envProps
}
}
// Tasks for each environment
['dev', 'qa', 'uat', 'prod'].each { env ->
tasks.register("deploy${env.capitalize()}") {
description = "Deploy to ${env} environment"
group = 'deployment'
doLast {
println "Deploying to ${env}..."
// Deployment logic here
}
}
}
// Validate environment configuration
tasks.register('validateEnvConfig') {
description = 'Validate environment configuration'
doLast {
def requiredProps = [
'gw.tenant.id',
'gw.hub.url',
'gw.api.base.url'
]
requiredProps.each { prop ->
if (!project.ext.envProps.containsKey(prop)) {
throw new GradleException("Missing required property: ${prop}")
}
}
println "Environment configuration valid for: ${project.ext.environment}"
}
}
Step 4: Environment Manager
interface EnvironmentConfig {
name: string;
code: string;
tenantId: string;
hubUrl: string;
apiBaseUrl: string;
features: Record<string, boolean>;
integrations: Record<string, string>;
}
class EnvironmentManager {
private configs: Map<string, EnvironmentConfig> = new Map();
constructor() {
this.loadConfigurations();
}
private loadConfigurations(): void {
this.configs.set('dev', {
name: 'Development',
code: 'DEV',
tenantId: process.env.GW_TENANT_DEV!,
hubUrl: 'https://hub-dev.guidewire.com',
apiBaseUrl: `https://.cloud.guidewire.com`,
: {
: ,
: ,
:
},
: {
: ,
:
}
});
..(, {
: ,
: ,
: process..!,
: ,
: ,
: {
: ,
: ,
:
},
: {
: ,
:
}
});
}
(: ): {
config = ..(env);
(!config) {
();
}
config;
}
(): {
process.. || ;
}
(: ): {
config = .(.());
config.[feature] ?? ;
}
}
{
: ;
: ;
() {
. = ();
config = ..(..());
. = ({
: .(),
: .(),
: config.
});
}
(): {
env = ..();
process.[]!;
}
(): {
env = ..();
process.[]!;
}
request<T>(: , ?: ): <T> {
config = ..(..());
token = ..();
response = (, {
...options,
: {
...options?.,
: ,
: config.
}
});
response.();
}
}
Step 5: Secrets Management
import { SecretManagerServiceClient } from '@google-cloud/secret-manager';
interface EnvironmentSecrets {
clientId: string;
clientSecret: string;
webhookSecret: string;
encryptionKey: string;
}
class SecretsManager {
private client: SecretManagerServiceClient;
private projectId: string;
constructor(projectId: string) {
this.client = new SecretManagerServiceClient();
this.projectId = projectId;
}
async getSecrets(environment: string): Promise<EnvironmentSecrets> {
const prefix = `gw-${environment}`;
const [clientId, clientSecret, webhookSecret, encryptionKey] = await Promise.all([
this.getSecret(`${prefix}-client-id`),
.(),
.(),
.()
]);
{
clientId,
clientSecret,
webhookSecret,
encryptionKey
};
}
(: ): <> {
name = ;
[response] = ..({ name });
response.?.?.() || ;
}
(: , : , : ): <> {
fullName = ;
parent = ;
..({
parent,
: {
: .(newValue)
}
});
.();
}
}
Step 6: Environment Promotion Workflow
interface PromotionRequest {
sourceEnv: string;
targetEnv: string;
packageVersion: string;
approver: string;
changeTicket: string;
}
class EnvironmentPromotion {
private allowedPromotionPaths = [
['dev', 'qa'],
['qa', 'uat'],
['uat', 'prod']
];
async promote(request: PromotionRequest): Promise<PromotionResult> {
this.validatePromotionPath(request.sourceEnv, request.targetEnv);
await this.runPrePromotionChecks(request);
const package = await this.getPackageFromEnvironment(
request.sourceEnv,
request.packageVersion
);
const deploymentId = await this.(
request.,
package
);
.(deploymentId);
.(request.);
.(request, deploymentId);
}
(: , : ): {
isValid = ..(
=== source && to === target
);
(!isValid) {
();
}
}
(: ): <> {
(request. === ) {
ticketApproved = .(request.);
(!ticketApproved) {
();
}
}
sourceHealth = .(request.);
(!sourceHealth.) {
();
}
targetAvailable = .(request.);
(!targetAvailable) {
();
}
}
(: ): <> {
smokeResults = .(environment);
(!smokeResults.) {
();
}
integrationResults = .(environment);
(!integrationResults.) {
.(, integrationResults.);
}
}
}
Step 7: Environment Health Dashboard
interface EnvironmentHealth {
environment: string;
status: 'healthy' | 'degraded' | 'unhealthy';
components: ComponentHealth[];
lastUpdated: Date;
}
interface ComponentHealth {
name: string;
status: 'up' | 'down' | 'degraded';
latency?: number;
errorRate?: number;
}
class EnvironmentHealthMonitor {
private environments = ['dev', 'qa', 'uat', 'prod'];
async checkAllEnvironments(): Promise<Map<string, EnvironmentHealth>> {
const results = new Map<string, EnvironmentHealth>();
await Promise.all(
this.environments.map(async (env) => {
const health = .(env);
results.(env, health);
})
);
results;
}
(: ): <> {
envManager = ();
config = envManager.(env);
components = .([
.(config),
.(config),
.(config),
.(config)
]);
unhealthyCount = components.( c. === ).;
degradedCount = components.( c. === ).;
: [] = ;
(unhealthyCount > ) {
status = ;
} (degradedCount > ) {
status = ;
}
{
: env,
status,
components,
: ()
};
}
(: ): <> {
startTime = .();
{
response = ();
{
: ,
: response. ? : ,
: .() - startTime
};
} {
{ : , : };
}
}
}
Environment Matrix
| Aspect | DEV | QA | UAT | PROD |
|---|
| Purpose | Development | Integration Testing | Acceptance | Live |
| Data | Synthetic | Anonymized | Prod-like | Production |
| Integrations | Mocked | Sandbox | Sandbox | Production |
| Access | Developers | QA Team | Business Users | Restricted |
| Refresh Cycle | On-demand | Weekly | Monthly | N/A |
| Monitoring | Basic | Standard | Standard | Comprehensive |
Output
- Environment configuration structure
- Gradle multi-environment build
- Secrets management integration
- Promotion workflow automation
- Health monitoring dashboard
Resources
Next Steps
For monitoring and observability, see guidewire-observability.