baked in cloud formation template
parent
d26cc2b620
commit
2e971d93a4
|
|
@ -1055,8 +1055,10 @@ class AWSJobStack {
|
||||||
let taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.readTaskCloudFormationTemplate();
|
let taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.readTaskCloudFormationTemplate();
|
||||||
const cpu = cloud_runner_1.default.buildParameters.cloudRunnerCpu || '1024';
|
const cpu = cloud_runner_1.default.buildParameters.cloudRunnerCpu || '1024';
|
||||||
const memory = cloud_runner_1.default.buildParameters.cloudRunnerMemory || '2048';
|
const memory = cloud_runner_1.default.buildParameters.cloudRunnerMemory || '2048';
|
||||||
taskDefCloudFormation = taskDefCloudFormation.replace('1024', cpu);
|
taskDefCloudFormation = taskDefCloudFormation.replace(`ContainerCpu:
|
||||||
taskDefCloudFormation = taskDefCloudFormation.replace('2048', memory);
|
Default: 1024`, cpu);
|
||||||
|
taskDefCloudFormation = taskDefCloudFormation.replace(`ContainerMemory:
|
||||||
|
Default: 2048`, memory);
|
||||||
for (const secret of secrets) {
|
for (const secret of secrets) {
|
||||||
secret.ParameterKey = `${buildGuid.replace(/[^\dA-Za-z]/g, '')}${secret.ParameterKey.replace(/[^\dA-Za-z]/g, '')}`;
|
secret.ParameterKey = `${buildGuid.replace(/[^\dA-Za-z]/g, '')}${secret.ParameterKey.replace(/[^\dA-Za-z]/g, '')}`;
|
||||||
if (typeof secret.ParameterValue == 'number') {
|
if (typeof secret.ParameterValue == 'number') {
|
||||||
|
|
@ -1836,12 +1838,12 @@ Parameters:
|
||||||
Default: 80
|
Default: 80
|
||||||
Description: What port number the application inside the docker container is binding to
|
Description: What port number the application inside the docker container is binding to
|
||||||
ContainerCpu:
|
ContainerCpu:
|
||||||
Type: Number
|
|
||||||
Default: 1024
|
Default: 1024
|
||||||
|
Type: Number
|
||||||
Description: How much CPU to give the container. 1024 is 1 CPU
|
Description: How much CPU to give the container. 1024 is 1 CPU
|
||||||
ContainerMemory:
|
ContainerMemory:
|
||||||
Type: Number
|
|
||||||
Default: 2048
|
Default: 2048
|
||||||
|
Type: Number
|
||||||
Description: How much memory in megabytes to give the container
|
Description: How much memory in megabytes to give the container
|
||||||
BUILDGUID:
|
BUILDGUID:
|
||||||
Type: String
|
Type: String
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -26,8 +26,16 @@ export class AWSJobStack {
|
||||||
let taskDefCloudFormation = AWSCloudFormationTemplates.readTaskCloudFormationTemplate();
|
let taskDefCloudFormation = AWSCloudFormationTemplates.readTaskCloudFormationTemplate();
|
||||||
const cpu = CloudRunner.buildParameters.cloudRunnerCpu || '1024';
|
const cpu = CloudRunner.buildParameters.cloudRunnerCpu || '1024';
|
||||||
const memory = CloudRunner.buildParameters.cloudRunnerMemory || '2048';
|
const memory = CloudRunner.buildParameters.cloudRunnerMemory || '2048';
|
||||||
taskDefCloudFormation = taskDefCloudFormation.replace('1024', cpu);
|
taskDefCloudFormation = taskDefCloudFormation.replace(
|
||||||
taskDefCloudFormation = taskDefCloudFormation.replace('2048', memory);
|
`ContainerCpu:
|
||||||
|
Default: 1024`,
|
||||||
|
cpu,
|
||||||
|
);
|
||||||
|
taskDefCloudFormation = taskDefCloudFormation.replace(
|
||||||
|
`ContainerMemory:
|
||||||
|
Default: 2048`,
|
||||||
|
memory,
|
||||||
|
);
|
||||||
for (const secret of secrets) {
|
for (const secret of secrets) {
|
||||||
secret.ParameterKey = `${buildGuid.replace(/[^\dA-Za-z]/g, '')}${secret.ParameterKey.replace(
|
secret.ParameterKey = `${buildGuid.replace(/[^\dA-Za-z]/g, '')}${secret.ParameterKey.replace(
|
||||||
/[^\dA-Za-z]/g,
|
/[^\dA-Za-z]/g,
|
||||||
|
|
|
||||||
|
|
@ -24,12 +24,12 @@ Parameters:
|
||||||
Default: 80
|
Default: 80
|
||||||
Description: What port number the application inside the docker container is binding to
|
Description: What port number the application inside the docker container is binding to
|
||||||
ContainerCpu:
|
ContainerCpu:
|
||||||
Type: Number
|
|
||||||
Default: 1024
|
Default: 1024
|
||||||
|
Type: Number
|
||||||
Description: How much CPU to give the container. 1024 is 1 CPU
|
Description: How much CPU to give the container. 1024 is 1 CPU
|
||||||
ContainerMemory:
|
ContainerMemory:
|
||||||
Type: Number
|
|
||||||
Default: 2048
|
Default: 2048
|
||||||
|
Type: Number
|
||||||
Description: How much memory in megabytes to give the container
|
Description: How much memory in megabytes to give the container
|
||||||
BUILDGUID:
|
BUILDGUID:
|
||||||
Type: String
|
Type: String
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue