Skip to content

Commit

Permalink
Merge pull request #2059 from vrk-kpa/delete_infratest_environment
Browse files Browse the repository at this point in the history
Delete infratest stacks from cdk
  • Loading branch information
Zharktas authored Oct 3, 2023
2 parents bf940ad + 1029289 commit 2b4e931
Showing 1 changed file with 0 additions and 284 deletions.
284 changes: 0 additions & 284 deletions cdk/bin/opendata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,290 +40,6 @@ const envProps: EnvProps = {
FUSEKI_IMAGE_TAG: parseEnv('FUSEKI_IMAGE_TAG'),
};

//
// infratest env
//

const infratestProps = {
account: '156418131626',
region: 'eu-west-1',
environment: 'infratest',
fqdn: 'betaavoindata.fi',
secondaryFqdn: 'betaopendata.fi',
domainName: 'infratest.betaavoindata.fi',
secondaryDomainName: 'infratest.betaopendata.fi',
};

const clusterStackInfratest = new ClusterStack(app, 'ClusterStack-infratest', {
envProps: envProps,
env: {
account: infratestProps.account,
region: infratestProps.region,
},
environment: infratestProps.environment,
fqdn: infratestProps.fqdn,
secondaryFqdn: infratestProps.secondaryFqdn,
domainName: infratestProps.domainName,
secondaryDomainName: infratestProps.secondaryDomainName,
});

const backupStackInfratest = new BackupStack(app, 'BackupStack-infratest', {
envProps: envProps,
env: {
account: infratestProps.account,
region: infratestProps.region,
},
domainName: infratestProps.domainName,
environment: infratestProps.environment,
fqdn: infratestProps.fqdn,
secondaryDomainName: infratestProps.secondaryDomainName,
secondaryFqdn: infratestProps.secondaryFqdn,
backups: false,
importVault: false
})

const fileSystemStackInfratest = new FileSystemStack(app, 'FileSystemStack-infratest', {
envProps: envProps,
env: {
account: infratestProps.account,
region: infratestProps.region,
},
environment: infratestProps.environment,
fqdn: infratestProps.fqdn,
secondaryFqdn: infratestProps.secondaryFqdn,
domainName: infratestProps.domainName,
secondaryDomainName: infratestProps.secondaryDomainName,
vpc: clusterStackInfratest.vpc,
backups: false,
backupPlan: backupStackInfratest.backupPlan,
importMigrationFs: true,
});

const databaseStackInfratest = new DatabaseStack(app, 'DatabaseStack-infratest', {
envProps: envProps,
env: {
account: infratestProps.account,
region: infratestProps.region,
},
environment: infratestProps.environment,
fqdn: infratestProps.fqdn,
secondaryFqdn: infratestProps.secondaryFqdn,
domainName: infratestProps.domainName,
secondaryDomainName: infratestProps.secondaryDomainName,
vpc: clusterStackInfratest.vpc,
backups: false,
backupPlan: backupStackInfratest.backupPlan,
multiAz: false
});

const lambdaStackInfratest = new LambdaStack(app, 'LambdaStack-infra', {
envProps: envProps,
env: {
account: infratestProps.account,
region: infratestProps.region,
},
environment: infratestProps.environment,
fqdn: infratestProps.fqdn,
secondaryFqdn: infratestProps.secondaryFqdn,
domainName: infratestProps.domainName,
secondaryDomainName: infratestProps.secondaryDomainName,
datastoreInstance: databaseStackInfratest.datastoreInstance,
datastoreCredentials: databaseStackInfratest.datastoreCredentials,
vpc: clusterStackInfratest.vpc
})


const certificateStackInfratest = new CertificateStack(app, 'CertificateStack-infra', {
envProps: envProps,
env: {
account: infratestProps.account,
region: infratestProps.region,
},
environment: infratestProps.environment,
fqdn: infratestProps.fqdn,
secondaryFqdn: infratestProps.secondaryFqdn,
domainName: infratestProps.domainName,
secondaryDomainName: infratestProps.secondaryDomainName
})

const certificateStackForCLoudfrontInfratest = new CertificateStack(app, 'CertificateStackForCloudfront-infra', {
envProps: envProps,
env: {
account: infratestProps.account,
region: 'us-east-1',
},
environment: infratestProps.environment,
fqdn: infratestProps.fqdn,
secondaryFqdn: infratestProps.secondaryFqdn,
domainName: infratestProps.domainName,
secondaryDomainName: infratestProps.secondaryDomainName
})

const loadBalancerStackInfratest = new LoadBalancerStack(app, 'LoadBalancerStackInfratest-infratest', {
envProps: envProps,
env: {
account: infratestProps.account,
region: infratestProps.region,
},
environment: infratestProps.environment,
fqdn: infratestProps.fqdn,
secondaryFqdn: infratestProps.secondaryFqdn,
domainName: infratestProps.domainName,
secondaryDomainName: infratestProps.secondaryDomainName,
vpc: clusterStackInfratest.vpc
});

const cacheStackInfratest = new CacheStack(app, 'CacheStack-infratest', {
envProps: envProps,
env: {
account: infratestProps.account,
region: infratestProps.region,
},
environment: infratestProps.environment,
fqdn: infratestProps.fqdn,
secondaryFqdn: infratestProps.secondaryFqdn,
domainName: infratestProps.domainName,
secondaryDomainName: infratestProps.secondaryDomainName,
vpc: clusterStackInfratest.vpc,
cacheNodeType: 'cache.t3.small',
cacheEngineVersion: '6.x',
cacheNumNodes: 1,
});

const ckanStackInfratest = new CkanStack(app, 'CkanStack-infratest', {
envProps: envProps,
env: {
account: infratestProps.account,
region: infratestProps.region,
},
environment: infratestProps.environment,
fqdn: infratestProps.fqdn,
secondaryFqdn: infratestProps.secondaryFqdn,
domainName: infratestProps.domainName,
secondaryDomainName: infratestProps.secondaryDomainName,
vpc: clusterStackInfratest.vpc,
cluster: clusterStackInfratest.cluster,
namespace: clusterStackInfratest.namespace,
fileSystems: {
'ckan': fileSystemStackInfratest.ckanFs,
'solr': fileSystemStackInfratest.solrFs,
'fuseki': fileSystemStackInfratest.fusekiFs,
},
databaseSecurityGroup: databaseStackInfratest.databaseSecurityGroup,
databaseInstance: databaseStackInfratest.databaseInstance,
datastoreInstance: databaseStackInfratest.datastoreInstance,
datastoreCredentials: databaseStackInfratest.datastoreCredentials,
datastoreJobsCredentials: lambdaStackInfratest.datastoreJobsCredentials,
datastoreReadCredentials: lambdaStackInfratest.datastoreReadCredentials,
datastoreUserCredentials: lambdaStackInfratest.datastoreUserCredentials,
datastoreSecurityGroup: databaseStackInfratest.datastoreSecurityGroup,
cachePort: cacheStackInfratest.cachePort,
cacheSecurityGroup: cacheStackInfratest.cacheSecurityGroup,
cacheCluster: cacheStackInfratest.cacheCluster,
captchaEnabled: false,
analyticsEnabled: false,
ckanTaskDef: {
taskCpu: 512,
taskMem: 1024,
taskMinCapacity: 1,
taskMaxCapacity: 2,
},
ckanCronTaskDef: {
taskCpu: 512,
taskMem: 1024,
taskMinCapacity: 0,
taskMaxCapacity: 1,
},
datapusherTaskDef: {
taskCpu: 512,
taskMem: 1024,
taskMinCapacity: 1,
taskMaxCapacity: 2,
},
solrTaskDef: {
taskCpu: 512,
taskMem: 1024,
taskMinCapacity: 0,
taskMaxCapacity: 1,
},
fusekiTaskDef: {
taskCpu: 512,
taskMem: 1024,
taskMinCapacity: 0,
taskMaxCapacity: 1,
},
ckanCronEnabled: false,
archiverSendNotificationEmailsToMaintainers: false,
archiverExemptDomainsFromBrokenLinkNotifications: [],
cloudstorageEnabled: true
});

const drupalStackInfratest = new DrupalStack(app, 'DrupalStack-infratest', {
envProps: envProps,
env: {
account: infratestProps.account,
region: infratestProps.region,
},
environment: infratestProps.environment,
fqdn: infratestProps.fqdn,
secondaryFqdn: infratestProps.secondaryFqdn,
domainName: infratestProps.domainName,
secondaryDomainName: infratestProps.secondaryDomainName,
vpc: clusterStackInfratest.vpc,
cluster: clusterStackInfratest.cluster,
namespace: clusterStackInfratest.namespace,
fileSystems: {
'drupal': fileSystemStackInfratest.drupalFs,
},
databaseSecurityGroup: databaseStackInfratest.databaseSecurityGroup,
databaseInstance: databaseStackInfratest.databaseInstance,
cachePort: cacheStackInfratest.cachePort,
cacheSecurityGroup: cacheStackInfratest.cacheSecurityGroup,
cacheCluster: cacheStackInfratest.cacheCluster,
captchaEnabled: false,
analyticsEnabled: false,
drupalTaskDef: {
taskCpu: 512,
taskMem: 1024,
taskMinCapacity: 1,
taskMaxCapacity: 2,
}
});

const webStackInfratest = new WebStack(app, 'WebStack-infratest', {
envProps: envProps,
env: {
account: infratestProps.account,
region: infratestProps.region,
},
environment: infratestProps.environment,
fqdn: infratestProps.fqdn,
secondaryFqdn: infratestProps.secondaryFqdn,
domainName: infratestProps.domainName,
secondaryDomainName: infratestProps.secondaryDomainName,
vpc: clusterStackInfratest.vpc,
cluster: clusterStackInfratest.cluster,
namespace: clusterStackInfratest.namespace,
fileSystems: {
'drupal': fileSystemStackInfratest.drupalFs,
},
databaseSecurityGroup: databaseStackInfratest.databaseSecurityGroup,
databaseInstance: databaseStackInfratest.databaseInstance,
cachePort: cacheStackInfratest.cachePort,
cacheSecurityGroup: cacheStackInfratest.cacheSecurityGroup,
cacheCluster: cacheStackInfratest.cacheCluster,
certificate: certificateStackInfratest.certificate,
loadBalancer: loadBalancerStackInfratest.loadBalancer,
nginxTaskDef: {
taskCpu: 512,
taskMem: 1024,
taskMinCapacity: 1,
taskMaxCapacity: 2,
},
drupalService: drupalStackInfratest.drupalService,
ckanService: ckanStackInfratest.ckanService,
allowRobots: 'false',
});

//
// beta env
Expand Down

0 comments on commit 2b4e931

Please sign in to comment.