Skip to content

Commit

Permalink
Update most examples to 0.13.0 packages (pulumi#55)
Browse files Browse the repository at this point in the history
* Update to v0.13.0 pulumi/aws SDK
* Update cloud-js-httpendpoint
* Update thumbnailer
* Update URL shortener to latest package, and improve index.html
* Update cloud-js-thumbnailer to latest packages. Other improvements:
  - Use async instead of promises
  - Update readme with latest output from CLI
  - Update dockerfile to output jpg instead of png (5-10x reduction in file size)
  - Reduce verbosity of ffmpeg output so logs are cleaner
  - Change sample video to one I recorded (cat video! plus no copyright issue)
  • Loading branch information
lindydonna authored May 20, 2018
1 parent 0cf9401 commit 477d11a
Show file tree
Hide file tree
Showing 18 changed files with 202 additions and 196 deletions.
29 changes: 17 additions & 12 deletions aws-js-s3-folder-component/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Static Website Hosted on AWS S3

The component version of [aws-js-s3-folder](../aws-js-s3-folder). For a detailed walkthrough of this example, see [Part 2 of the Pulumi quickstart](https://docs.pulumi.com/quickstart/part2.html).
The component version of [aws-js-s3-folder](../aws-js-s3-folder). For a detailed walkthrough of this example, see [Tutorial: Pulumi Components](https://docs.pulumi.com/reference/component-tutorial.html).

## Deploying and running the program

Expand All @@ -22,25 +22,30 @@ The component version of [aws-js-s3-folder](../aws-js-s3-folder). For a detailed

```bash
$ pulumi update
Previewing stack 'website-component-testing'
Previewing update of stack 'website-component-testing'
Previewing changes:
...
Updating stack 'website-component-testing'
Performing changes:
#: Resource Type Name
1: pulumi:pulumi:Stack aws-js-s3-folder-component-website-component-testing
2: examples:S3Folder pulumi-static-site
3: aws:s3:Bucket pulumi-static-site
4: aws:s3:BucketPolicy bucketPolicy
5: aws:s3:BucketObject favicon.png
6: aws:s3:BucketObject index.html
Type Name Status Info
+ pulumi:pulumi:Stack aws-js-s3-folder-component-website-component-testing created
+ └─ examples:S3Folder pulumi-static-site created
+ ├─ aws:s3:Bucket pulumi-static-site created
+ ├─ aws:s3:BucketPolicy bucketPolicy created
+ ├─ aws:s3:BucketObject favicon.png created
+ └─ aws:s3:BucketObject index.html created
---outputs:---
bucketName: "pulumi-static-site-517ff4e"
websiteUrl: undefined
info: 6 changes performed:
+ 6 resources created
Update duration: 6.159165618s
Update duration: 8.997389052s
Permalink: https://pulumi.com/lindydonna/examples/aws-js-s3-folder-component/website-component-testing/updates/1
Permalink: https://pulumi.com/lindydonna/website-component-testing/updates/1
```

1. To see the resources that were created, run `pulumi stack output`:
Expand Down
4 changes: 2 additions & 2 deletions aws-js-s3-folder-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "aws-js-s3-folder-component",
"main": "index.js",
"dependencies": {
"@pulumi/aws": "^0.12.0",
"@pulumi/pulumi": "^0.12.0",
"@pulumi/aws": "^0.13.0",
"@pulumi/pulumi": "^0.12.2",
"mime": "^2.2.2"
}
}
25 changes: 15 additions & 10 deletions aws-js-s3-folder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,29 @@ A static website that uses [S3's website support](https://docs.aws.amazon.com/Am

```bash
$ pulumi update
Previewing stack 'website-testing'
Previewing update of stack 'website-testing'
Previewing changes:
...
Updating stack 'website-testing'
Performing changes:
#: Resource Type Name Status Extra Inf
1: pulumi:pulumi:Stack aws-js-s3-folder-website-testing + created
2: aws:s3:Bucket s3-website-bucket + created
3: aws:s3:BucketPolicy bucketPolicy + created
4: aws:s3:BucketObject favicon.png + created
5: aws:s3:BucketObject index.html + created
Type Name Status Info
+ pulumi:pulumi:Stack aws-js-s3-folder-website-testing created
+ ├─ aws:s3:Bucket s3-website-bucket created
+ ├─ aws:s3:BucketPolicy bucketPolicy created
+ ├─ aws:s3:BucketObject favicon.png created
+ └─ aws:s3:BucketObject index.html created
---outputs:---
bucketName: "s3-website-bucket-5afcc1d"
websiteUrl: "s3-website-bucket-5afcc1d.s3-website-us-west-2.amazonaws.com"
info: 5 changes performed:
+ 5 resources created
Update duration: 8.827698762s
Update duration: 8.69080606s
Permalink: https://pulumi.com/lindydonna/examples/aws-js-s3-folder/website-testing/updates/1
Permalink: https://pulumi.com/lindydonna/website-testing/updates/4
```

1. To see the resources that were created, run `pulumi stack output`:
Expand Down
4 changes: 2 additions & 2 deletions aws-js-s3-folder/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const mime = require("mime");

// Create a bucket and expose a website index document
let siteBucket = new aws.s3.Bucket("s3-website-bucket", {
websites: [{
website: {
indexDocument: "index.html",
}],
},
});

let siteDir = "www"; // directory for content files
Expand Down
4 changes: 2 additions & 2 deletions aws-js-s3-folder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "aws-js-s3-folder",
"main": "index.js",
"dependencies": {
"@pulumi/aws": "^0.12.0",
"@pulumi/pulumi": "^0.12.0",
"@pulumi/aws": "^0.13.0",
"@pulumi/pulumi": "^0.12.2",
"mime": "^2.2.2"
}
}
6 changes: 3 additions & 3 deletions cloud-js-httpendpoint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ A simple REST API that counts the number of times a route has been hit. For a de
$ pulumi stack output
Current stack outputs (1):
OUTPUT VALUE
url https://5e8xrktey3.execute-api.us-west-2.amazonaws.com/stage/
endpoint https://5e8xrktey3.execute-api.us-west-2.amazonaws.com/stage/
$ curl $(pulumi stack output url)/hello
$ curl $(pulumi stack output endpoint)/hello
{"route":"hello","count":1}
$ curl $(pulumi stack output url)/woohoo
$ curl $(pulumi stack output endpoint)/woohoo
{"route":"woohoo","count":1}
```

Expand Down
4 changes: 2 additions & 2 deletions cloud-js-httpendpoint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloud-js-httpendpoint",
"main": "index.js",
"dependencies": {
"@pulumi/cloud-aws": "^0.12.0",
"@pulumi/cloud": "^0.12.0"
"@pulumi/cloud-aws": "^0.13.0",
"@pulumi/cloud": "^0.13.0"
}
}
Loading

0 comments on commit 477d11a

Please sign in to comment.