mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
fix(kb/aws/ecs): code block indentation, example
This commit is contained in:
@@ -267,13 +267,14 @@ One can assign a **default** capacity provider strategy to a cluster.
|
|||||||
"defaultCapacityProviderStrategy": [
|
"defaultCapacityProviderStrategy": [
|
||||||
{
|
{
|
||||||
"capacityProvider": "FARGATE_SPOT",
|
"capacityProvider": "FARGATE_SPOT",
|
||||||
"weight": 100,
|
"weight": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"capacityProvider": "FARGATE",
|
"capacityProvider": "FARGATE",
|
||||||
"weight": 0,
|
"weight": 0
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
@@ -358,14 +359,13 @@ Provider 2 is `FARGATE_SPOT`, with weight of `3`.
|
|||||||
"capacityProviderStrategy": [
|
"capacityProviderStrategy": [
|
||||||
{
|
{
|
||||||
"capacityProvider": "FARGATE",
|
"capacityProvider": "FARGATE",
|
||||||
"weight": 1,
|
"weight": 1
|
||||||
"base": 1
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"capacityProvider": "FARGATE_SPOT",
|
"capacityProvider": "FARGATE_SPOT",
|
||||||
"weight": 3
|
"weight": 3
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -382,9 +382,9 @@ Percentage per provider:
|
|||||||
<details style='padding: 0 0 1rem 1rem'>
|
<details style='padding: 0 0 1rem 1rem'>
|
||||||
<summary>More advanced example</summary>
|
<summary>More advanced example</summary>
|
||||||
|
|
||||||
Provider 1 is `FARGATE`, with a weight of `1` and base of `2`.<br/>
|
Provider 1 is `FARGATE`, with a weight of `1`.<br/>
|
||||||
Provider 2 is `FARGATE_SPOT`, with a weight of `19`.<br/>
|
Provider 2 is `FARGATE_SPOT`, with a weight of `19`.<br/>
|
||||||
Provider 3 is `some-custom-ec2-capacity-provider`, with a weight of `0`.
|
Provider 3 is `some-custom-ec2-capacity-provider`, with a weight of `0` and base of `2`.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@@ -392,8 +392,7 @@ Provider 3 is `some-custom-ec2-capacity-provider`, with a weight of `0`.
|
|||||||
"capacityProviderStrategy": [
|
"capacityProviderStrategy": [
|
||||||
{
|
{
|
||||||
"capacityProvider": "FARGATE",
|
"capacityProvider": "FARGATE",
|
||||||
"weight": 1,
|
"weight": 1
|
||||||
"base": 2
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"capacityProvider": "FARGATE_SPOT",
|
"capacityProvider": "FARGATE_SPOT",
|
||||||
@@ -401,23 +400,24 @@ Provider 3 is `some-custom-ec2-capacity-provider`, with a weight of `0`.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"capacityProvider": "some-custom-ec2-capacity-provider",
|
"capacityProvider": "some-custom-ec2-capacity-provider",
|
||||||
|
"base": 2,
|
||||||
"weight": 0
|
"weight": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
`FARGATE` will maintain tasks just for having the `base` value between the bunch.<br/>
|
`some-custom-ec2-capacity-provider` will run tasks just for being the provider with the `base` value defined.<br/>
|
||||||
It will get at least 2 of them since the `base` value is `2`.
|
Aside assigning it the 2 base tasks as per configuration, the scheduler will just ignore
|
||||||
|
`some-custom-ec2-capacity-provider` due to its weight being `0`.
|
||||||
|
|
||||||
`some-custom-ec2-capacity-provider` will just be ignored during scheduling due to its weight being `0`.<br/>
|
|
||||||
Sum of the remaining weights: `1 + 19 = 20`.<br/>
|
Sum of the remaining weights: `1 + 19 = 20`.<br/>
|
||||||
Percentage per provider:
|
Percentage per provider:
|
||||||
|
|
||||||
- `FARGATE`: `1 / 20 = 0.05`.
|
- `FARGATE`: `1 / 20 = 0.05`.
|
||||||
- `FARGATE_SPOT`: `19 / 20 = 0.95`.
|
- `FARGATE_SPOT`: `19 / 20 = 0.95`.
|
||||||
|
|
||||||
`FARGATE` will receive 5% of the remaining tasks, while `FARGATE_SPOT` will receive 95% of them.
|
`FARGATE` will receive 5% of the tasks over the base, while `FARGATE_SPOT` will receive 95% of them.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -471,7 +471,7 @@ This warning is sent as a task state change event to EventBridge and as a SIGTER
|
|||||||
"stoppedReason": "Your Spot Task was interrupted.",
|
"stoppedReason": "Your Spot Task was interrupted.",
|
||||||
"stopCode": "SpotInterruption",
|
"stopCode": "SpotInterruption",
|
||||||
"taskArn": "arn:aws:ecs:us-east-1:111122223333:task/b99d40b3-5176-4f71-9a52-9dbd6fEXAMPLE",
|
"taskArn": "arn:aws:ecs:us-east-1:111122223333:task/b99d40b3-5176-4f71-9a52-9dbd6fEXAMPLE",
|
||||||
...
|
…
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -634,7 +634,7 @@ Tasks **must**:
|
|||||||
"fileSystemId": "fs-1234",
|
"fileSystemId": "fs-1234",
|
||||||
"rootDirectory": "/path/to/my/data",
|
"rootDirectory": "/path/to/my/data",
|
||||||
"transitEncryption": "ENABLED",
|
"transitEncryption": "ENABLED",
|
||||||
"transitEncryptionPort": integer,
|
"transitEncryptionPort": 9076,
|
||||||
"authorizationConfig": {
|
"authorizationConfig": {
|
||||||
"accessPointId": "fsap-1234",
|
"accessPointId": "fsap-1234",
|
||||||
"iam": "ENABLED"
|
"iam": "ENABLED"
|
||||||
@@ -764,7 +764,7 @@ Requirements:
|
|||||||
"kms:GenerateDataKey"
|
"kms:GenerateDataKey"
|
||||||
],
|
],
|
||||||
"Resource": "arn:aws:kms:eu-west-1:012345678901:key/abcdef01-2345-6789-abcd-ef0123456789"
|
"Resource": "arn:aws:kms:eu-west-1:012345678901:key/abcdef01-2345-6789-abcd-ef0123456789"
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -1077,14 +1077,11 @@ Procedure:
|
|||||||
<details style="padding: 0 0 1rem 1rem">
|
<details style="padding: 0 0 1rem 1rem">
|
||||||
|
|
||||||
```json
|
```json
|
||||||
containerDefinitions: [
|
containerDefinitions: [{
|
||||||
{
|
|
||||||
"name": "postgres",
|
"name": "postgres",
|
||||||
"protocol": "tcp",
|
"protocol": "tcp",
|
||||||
"containerPort": 5432,
|
"containerPort": 5432
|
||||||
},
|
}]
|
||||||
…
|
|
||||||
]
|
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
@@ -1105,7 +1102,7 @@ Procedure:
|
|||||||
"dnsName": "pgsql"
|
"dnsName": "pgsql"
|
||||||
}]
|
}]
|
||||||
}]
|
}]
|
||||||
},
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
@@ -1166,7 +1163,7 @@ Procedure:
|
|||||||
```json
|
```json
|
||||||
"serviceRegistries": [{
|
"serviceRegistries": [{
|
||||||
"registryArn": "arn:aws:servicediscovery:eu-west-1:012345678901:service/srv-uuf33b226vw93biy"
|
"registryArn": "arn:aws:servicediscovery:eu-west-1:012345678901:service/srv-uuf33b226vw93biy"
|
||||||
}],
|
}]
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
@@ -1413,7 +1410,7 @@ The `fluentd-address` value is specified as a secret option as it may be treated
|
|||||||
"containerPort": 24224
|
"containerPort": 24224
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}],
|
}]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|||||||
Reference in New Issue
Block a user