Skip to content

Commit

Permalink
Fix path and remove env
Browse files Browse the repository at this point in the history
Signed-off-by: Sayali Gaikawad <[email protected]>
  • Loading branch information
gaiksaya committed Aug 17, 2024
1 parent c0aff8e commit 5530928
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions keycloak/bin/keycloak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ const vpcStack = new VpcStack(app, 'keycloakVPC', {});

// Create utilities required by different components of KeyCloak
const utilsStack = new KeycloakUtils(app, 'KeyCloakUtils', {
env: { account, region },
hostedZone: HOSTED_ZONE,
internalHostedZone: INTERNAL_HOSTED_ZONE,
});

// Create RDS database
const rdsDBStack = new RdsStack(app, 'KeycloakRDS', {
env: { account, region },
vpc: vpcStack.vpc,
rdsDbSecurityGroup: vpcStack.rdsDbSecurityGroup,
rdsAdminPassword: utilsStack.keycloakDbPassword,
Expand All @@ -42,7 +40,6 @@ rdsDBStack.node.addDependency(vpcStack, utilsStack);

// Deploy and install Public KeyCloak on EC2
const keycloakStack = new KeycloakStack(app, 'PublicKeycloak', {
env: { account, region },
vpc: vpcStack.vpc,
keycloakSecurityGroup: vpcStack.keyCloaksecurityGroup,
certificateArn: utilsStack.certificateArn,
Expand All @@ -59,7 +56,6 @@ keycloakStack.node.addDependency(vpcStack, rdsDBStack, utilsStack);

// Deploy and install Internal KeyCloak on EC2
const keycloakInternalStack = new KeycloakStack(app, 'InternalKeycloak', {
env: { account, region },
vpc: vpcStack.vpc,
keycloakSecurityGroup: vpcStack.keycloakInternalSecurityGroup,
certificateArn: utilsStack.internalCertificateArn,
Expand All @@ -78,7 +74,6 @@ keycloakInternalStack.node.addDependency(vpcStack, rdsDBStack, utilsStack);

// Create WAF stack
const wafStack = new KeycloakWAF(app, 'KeycloakWAFstack', {
env: { account, region },
loadBalancerArn: keycloakStack.loadBalancerArn,
internalLoadBalancerArn: keycloakInternalStack.loadBalancerArn,
});
Expand Down
4 changes: 2 additions & 2 deletions keycloak/lib/stacks/keycloak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class KeycloakStack extends Stack {
InitPackage.yum('docker'),
InitCommand.shellCommand('sudo curl -L https://github.com/docker/compose/releases/download/v2.9.0/docker-compose-$(uname -s)-$(uname -m) '
+ '-o /usr/bin/docker-compose && sudo chmod +x /usr/bin/docker-compose'),
InitFile.fromFileInline('/docker-compose.yml', join(__dirname, '../resources/docker-compose.yml')),
InitFile.fromFileInline('/docker-compose.yml', join(__dirname, '../../resources/docker-compose.yml')),
InitCommand.shellCommand('touch /.env'),
InitCommand.shellCommand(`echo KC_DB_PASSWORD=$(aws --region ${region} secretsmanager get-secret-value`
+ ` --secret-id ${props.keycloakDBpasswordSecretArn} --query SecretString --output text) > /.env && `
Expand All @@ -175,7 +175,7 @@ export class KeycloakStack extends Stack {
InitPackage.yum('docker'),
InitCommand.shellCommand('sudo curl -L https://github.com/docker/compose/releases/download/v2.9.0/docker-compose-$(uname -s)-$(uname -m) '
+ '-o /usr/bin/docker-compose && sudo chmod +x /usr/bin/docker-compose'),
InitFile.fromFileInline('/docker-compose.yml', join(__dirname, '../resources/internal-docker-compose.yml')),
InitFile.fromFileInline('/docker-compose.yml', join(__dirname, '../../resources/internal-docker-compose.yml')),
InitCommand.shellCommand('touch /.env'),
InitCommand.shellCommand(`echo KC_DB_PASSWORD=$(aws --region ${region} secretsmanager get-secret-value`
+ ` --secret-id ${props.keycloakDBpasswordSecretArn} --query SecretString --output text) > /.env && `
Expand Down

0 comments on commit 5530928

Please sign in to comment.