Skip to content

Commit

Permalink
Merge pull request #88 from convox/dont-specify-cpu
Browse files Browse the repository at this point in the history
don't specify CPU parameter
  • Loading branch information
ddollar committed Oct 12, 2015
2 parents 19f6394 + 037bf68 commit b3d56d5
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 25 deletions.
2 changes: 0 additions & 2 deletions api/cmd/formation/handler/ecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,12 @@ func ECSTaskDefinitionCreate(req Request) (string, map[string]string, error) {
for i, itask := range tasks {
task := itask.(map[string]interface{})

cpu, _ := strconv.Atoi(task["CPU"].(string))
memory, _ := strconv.Atoi(task["Memory"].(string))

r.ContainerDefinitions[i] = &ecs.ContainerDefinition{
Name: aws.String(task["Name"].(string)),
Essential: aws.Bool(true),
Image: aws.String(task["Image"].(string)),
Cpu: aws.Int64(int64(cpu)),
Memory: aws.Int64(int64(memory)),
}

Expand Down
3 changes: 0 additions & 3 deletions api/models/fixtures/web_external_internal.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,6 @@
"Fn::If": [
"BlankWebService",
{
"CPU": {
"Ref": "WebMemory"
},
"Command": {
"Ref": "WebCommand"
},
Expand Down
6 changes: 0 additions & 6 deletions api/models/fixtures/web_postgis.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,6 @@
"Fn::If": [
"BlankPostgresService",
{
"CPU": {
"Ref": "PostgresMemory"
},
"Command": {
"Ref": "PostgresCommand"
},
Expand Down Expand Up @@ -684,9 +681,6 @@
"Fn::If": [
"BlankWebService",
{
"CPU": {
"Ref": "WebMemory"
},
"Command": {
"Ref": "WebCommand"
},
Expand Down
6 changes: 0 additions & 6 deletions api/models/fixtures/web_postgis_internal.json
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,6 @@
"Fn::If": [
"BlankPostgresService",
{
"CPU": {
"Ref": "PostgresMemory"
},
"Command": {
"Ref": "PostgresCommand"
},
Expand Down Expand Up @@ -518,9 +515,6 @@
"Fn::If": [
"BlankWebService",
{
"CPU": {
"Ref": "WebMemory"
},
"Command": {
"Ref": "WebCommand"
},
Expand Down
6 changes: 0 additions & 6 deletions api/models/fixtures/worker.json
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,6 @@
"Fn::If": [
"BlankPostgresService",
{
"CPU": {
"Ref": "PostgresMemory"
},
"Command": {
"Ref": "PostgresCommand"
},
Expand Down Expand Up @@ -512,9 +509,6 @@
"Fn::If": [
"BlankWorkerService",
{
"CPU": {
"Ref": "WorkerMemory"
},
"Command": {
"Ref": "WorkerCommand"
},
Expand Down
3 changes: 1 addition & 2 deletions api/models/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ func templateHelpers() template.FuncMap {
"Name": "%s",
"Image": { "Ref": "%sImage" },
"Command": { "Ref": "%sCommand" },
"CPU": { "Ref": "%sMemory" },
"Memory": { "Ref": "%sMemory" },
"Environment": {
"KINESIS": { "Ref": "Kinesis" },
Expand All @@ -411,7 +410,7 @@ func templateHelpers() template.FuncMap {
"Volumes": [ %s ],
"Services": [ %s ],
"PortMappings": [ %s ]
}, { "Ref" : "AWS::NoValue" } ] }`, UpperName(ps), ps, UpperName(ps), UpperName(ps), UpperName(ps), UpperName(ps), strings.Join(envs, ","), strings.Join(links, ","), strings.Join(volumes, ","), strings.Join(services, ","), strings.Join(mappings, ","))
}, { "Ref" : "AWS::NoValue" } ] }`, UpperName(ps), ps, UpperName(ps), UpperName(ps), UpperName(ps), strings.Join(envs, ","), strings.Join(links, ","), strings.Join(volumes, ","), strings.Join(services, ","), strings.Join(mappings, ","))

return template.HTML(l)
},
Expand Down

0 comments on commit b3d56d5

Please sign in to comment.