Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix path and remove env #195

Merged
merged 3 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading