Skip to content

Commit

Permalink
SAPI-935 support custom clusters (#393)
Browse files Browse the repository at this point in the history
* SAPI-935 Support providing custom cluster

* 10.0.1-0

* 10.0.1-1

* SAPI-935 Update to v10.0.1

* SAPI-935 Update version refs in readme
  • Loading branch information
pekkalehtomaki authored Apr 26, 2024
1 parent 43957b2 commit 7160001
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 1,7 @@
### 10.0.1

- Add support for providing a custom cluster, enabling usage in default account

### 10.0.0
- This library is now distributed as a CDK construct with almost identical functionality. Refer to [UPGRADING_TO_V10](/docs/upgrading-to-watchbot10.md) for migration details.

Expand Down
2 changes: 1 addition & 1 deletion docs/upgrading-to-watchbot10.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 5,7 @@ Starting Watchbot v10, the watchbot CLI can be installed from `ecs-watchbot-bina

Update your Dockerfile with the following:
```
RUN wget https://s3.amazonaws.com/ecs-watchbot-binaries/linux/v10.0.0/watchbot -O /usr/local/bin/watchbot
RUN wget https://s3.amazonaws.com/ecs-watchbot-binaries/linux/v10.0.1/watchbot -O /usr/local/bin/watchbot
RUN chmod x /usr/local/bin/watchbot
```

Expand Down
2 changes: 1 addition & 1 deletion lib/watchbot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 562,7 @@ export class FargateWatchbot extends Resource {
readonlyRootFilesystem: true,
maxJobDuration: Duration.seconds(0),
family: props.serviceName,
cluster: Cluster.fromClusterAttributes(this, `${id}Cluster`, {
cluster: props.cluster ?? Cluster.fromClusterAttributes(this, `${id}Cluster`, {
clusterName: `fargate-processing-${props.deploymentEnvironment}`,
vpc: Vpc.fromLookup(this, `${id}VPC`, {
vpcId: VPC_IDs[region as SupportedRegion][props.deploymentEnvironment],
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
{
"name": "@mapbox/watchbot",
"version": "10.0.0",
"version": "10.0.1",
"description": "",
"main": "index.js",
"types": "index.d.ts",
Expand Down Expand Up @@ -81,6 81,10 @@
},
"eslintConfig": {
"extends": "@mapbox/eslint-config-mapbox",
"ignorePatterns": ["/lib/watchbot.js", "/lib/MapboxQueueProcessingFargateService.js", "bin/cdk.js"]
"ignorePatterns": [
"/lib/watchbot.js",
"/lib/MapboxQueueProcessingFargateService.js",
"bin/cdk.js"
]
}
}
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 7,11 @@ A library to help run a highly-scalable AWS service that performs data processin
Add these lines to your Dockerfile, to use the latest watchbot for the linux operating system.

```
RUN wget https://s3.amazonaws.com/ecs-watchbot-binaries/linux/v10.0.0/watchbot -O /usr/local/bin/watchbot
RUN wget https://s3.amazonaws.com/ecs-watchbot-binaries/linux/v10.0.1/watchbot -O /usr/local/bin/watchbot
RUN chmod x /usr/local/bin/watchbot
```
* **os**: You can replace `linux` with other operating systems like `alpine`, `macosx` or, `windows`
* **tag**: You can replace `v10.0.0` with any [watchbot tag](https://github.com/mapbox/ecs-watchbot/releases) starting from and more recent than v4.0.0
* **tag**: You can replace `v10.0.1` with any [watchbot tag](https://github.com/mapbox/ecs-watchbot/releases) starting from and more recent than v4.0.0
* :rotating_light: For any version <= 9, you need to use `https://s3.amazonaws.com/watchbot-binaries/linux/{VERSION}/watchbot` (note the difference in bucket name)

* If you are an existing user of watchbot, take a look at ["Upgrading to Watchbot 10"](https://github.com/mapbox/ecs-watchbot/blob/master/docs/upgrading-to-watchbot10.md), for a complete set of instructions to upgrade your stacks to Watchbot 10.
Expand Down

0 comments on commit 7160001

Please sign in to comment.