diff --git a/.vscode/tasks.json b/.vscode/tasks.json index b729e5963..72b62666f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -4,7 +4,7 @@ { "label": "voting app", "type": "typescript", - "tsconfig": "voting-app/tsconfig.json", + "tsconfig": "cloud-ts-voting-app/tsconfig.json", "option": "watch", "problemMatcher": [ "$tsc-watch" @@ -17,7 +17,7 @@ { "label": "url shortener", "type": "typescript", - "tsconfig": "url-shortener/tsconfig.json", + "tsconfig": "cloud-ts-url-shortener/tsconfig.json", "option": "watch", "problemMatcher": [ "$tsc-watch" @@ -30,7 +30,7 @@ { "label": "url shortener with cache", "type": "typescript", - "tsconfig": "url-shortener-with-cache/tsconfig.json", + "tsconfig": "cloud-ts-url-shortener-cache/tsconfig.json", "option": "watch", "problemMatcher": [ "$tsc-watch" @@ -39,32 +39,6 @@ "kind": "build", "isDefault": true } - }, - { - "label": "webserver", - "type": "typescript", - "tsconfig": "webserver/tsconfig.json", - "option": "watch", - "problemMatcher": [ - "$tsc-watch" - ], - "group": { - "kind": "build", - "isDefault": true - } - }, - { - "label": "webserver-component", - "type": "typescript", - "tsconfig": "webserver-component/tsconfig.json", - "option": "watch", - "problemMatcher": [ - "$tsc-watch" - ], - "group": { - "kind": "build", - "isDefault": true - } - } + }, ] } \ No newline at end of file diff --git a/aws-js-s3-folder-component/README.md b/aws-js-s3-folder-component/README.md index 43cede674..19516031a 100644 --- a/aws-js-s3-folder-component/README.md +++ b/aws-js-s3-folder-component/README.md @@ -4,16 +4,10 @@ The component version of [aws-js-s3-folder](../aws-js-s3-folder). For a detailed ## Deploying and running the program -1. Initialize a Pulumi repository with `pulumi init`, using your GitHub username. (Note: this step will be removed in the future.) - - ```bash - $ pulumi init --owner githubUsername - ``` - 1. Create a new stack: ```bash - $ pulumi stack init website-testing + $ pulumi stack init website-component-testing ``` 1. Set the AWS region: @@ -24,26 +18,29 @@ The component version of [aws-js-s3-folder](../aws-js-s3-folder). For a detailed 1. Restore NPM modules via `npm install`. -1. Run `pulumi preview` to see what AWS resources will be created. - -1. Now, provision resources via `pulumi update`: +1. Run `pulumi update` to preview and deploy changes. ```bash $ pulumi update - Updating stack 's3foldercomponent-testing' in the Pulumi Cloud ☁️ + Previewing stack 'website-component-testing' + Previewing changes: + ... + Performing changes: - pulumi:Stack("aws-js-s3-folder-component-s3foldercomponent-testing"): Completed - examples:S3Folder("pulumi-static-site"): + Created - aws:Bucket("pulumi-static-site"): + Created - aws:BucketPolicy("bucketPolicy"): + Created - aws:BucketObject("favicon.png"): + Created - aws:BucketObject("index.html"): + Created + #: 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 + info: 6 changes performed: + 6 resources created - Update duration: 6.952010989s + Update duration: 6.159165618s - Permalink: https://pulumi.com/lindydonna/examples/aws-js-s3-folder-component/s3foldercomponent-testing/updates/3 + Permalink: https://pulumi.com/lindydonna/examples/aws-js-s3-folder-component/website-component-testing/updates/1 ``` 1. To see the resources that were created, run `pulumi stack output`: @@ -71,4 +68,4 @@ The component version of [aws-js-s3-folder](../aws-js-s3-folder). For a detailed s3-website-bucket-8533d8b.s3-website-us-west-2.amazonaws.com ``` - +1. To clean up resources, run `pulumi destroy` and answer the confirmation question at the prompt. diff --git a/aws-js-s3-folder-component/package.json b/aws-js-s3-folder-component/package.json index d5f77fd84..ccbac7e50 100644 --- a/aws-js-s3-folder-component/package.json +++ b/aws-js-s3-folder-component/package.json @@ -2,8 +2,8 @@ "name": "aws-js-s3-folder-component", "main": "index.js", "dependencies": { - "@pulumi/aws": "^0.11.0", - "@pulumi/pulumi": "^0.11.0", + "@pulumi/aws": "^0.12.0", + "@pulumi/pulumi": "^0.12.0", "mime": "^2.2.2" } } diff --git a/aws-js-s3-folder/README.md b/aws-js-s3-folder/README.md index acce0fd6c..8eb191180 100644 --- a/aws-js-s3-folder/README.md +++ b/aws-js-s3-folder/README.md @@ -4,12 +4,6 @@ A static website that uses [S3's website support](https://docs.aws.amazon.com/Am ## Deploying and running the program -1. Initialize a Pulumi repository with `pulumi init`, using your GitHub username. (Note: this step will be removed in the future.) - - ```bash - $ pulumi init --owner githubUsername - ``` - 1. Create a new stack: ```bash @@ -24,39 +18,28 @@ A static website that uses [S3's website support](https://docs.aws.amazon.com/Am 1. Restore NPM modules via `npm install`. -1. Run `pulumi preview` to see what AWS resources will be created: +1. Run `pulumi update` to preview and deploy changes. ```bash - $ pulumi preview - Previewing stack 'testing' in the Pulumi Cloud ☁️ + $ pulumi update + Previewing stack 'website-testing' Previewing changes: + ... - pulumi:Stack("aws-js-s3-folder-testing"): Completed - aws:Bucket("s3-website-bucket"): + Would create - aws:BucketPolicy("bucketPolicy"): + Would create - aws:BucketObject("favicon.png"): + Would create - aws:BucketObject("index.html"): + Would create - info: 5 changes previewed: - + 5 resources to create - ``` - -1. Now, provision resources via `pulumi update`: - - ```bash - $ pulumi update - Updating stack 'testing' in the Pulumi Cloud ☁️ Performing changes: - pulumi:Stack("aws-js-s3-folder-testing"): Completed - aws:Bucket("s3-website-bucket"): + Created - aws:BucketPolicy("bucketPolicy"): + Created - aws:BucketObject("favicon.png"): + Created - aws:BucketObject("index.html"): + Created + #: 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 + info: 5 changes performed: + 5 resources created - Update duration: 7.083525991s + Update duration: 8.827698762s - Permalink: https://pulumi.com/lindydonna/examples/aws-js-s3-folder/testing/updates/9 + Permalink: https://pulumi.com/lindydonna/examples/aws-js-s3-folder/website-testing/updates/1 ``` 1. To see the resources that were created, run `pulumi stack output`: @@ -86,5 +69,4 @@ A static website that uses [S3's website support](https://docs.aws.amazon.com/Am ![Hello S3 example](images/part2-website.png) - - +1. To clean up resources, run `pulumi destroy` and answer the confirmation question at the prompt. diff --git a/aws-js-s3-folder/package.json b/aws-js-s3-folder/package.json index b12e06b54..c5bf40800 100644 --- a/aws-js-s3-folder/package.json +++ b/aws-js-s3-folder/package.json @@ -2,8 +2,8 @@ "name": "aws-js-s3-folder", "main": "index.js", "dependencies": { - "@pulumi/aws": "^0.11.0", - "@pulumi/pulumi": "^0.11.0", + "@pulumi/aws": "^0.12.0", + "@pulumi/pulumi": "^0.12.0", "mime": "^2.2.2" } } diff --git a/aws-js-webserver-component/package.json b/aws-js-webserver-component/package.json index 1c6d02318..e31d0ca8d 100755 --- a/aws-js-webserver-component/package.json +++ b/aws-js-webserver-component/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "main": "index.js", "dependencies": { - "@pulumi/pulumi": "^0.11.0", - "@pulumi/aws": "^0.11.0" + "@pulumi/pulumi": "^0.12.0", + "@pulumi/aws": "^0.12.0" } } diff --git a/aws-js-webserver/package.json b/aws-js-webserver/package.json index 1c6d02318..e31d0ca8d 100755 --- a/aws-js-webserver/package.json +++ b/aws-js-webserver/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "main": "index.js", "dependencies": { - "@pulumi/pulumi": "^0.11.0", - "@pulumi/aws": "^0.11.0" + "@pulumi/pulumi": "^0.12.0", + "@pulumi/aws": "^0.12.0" } } diff --git a/aws-py-webserver/README.md b/aws-py-webserver/README.md index 261339141..b49283fa2 100644 --- a/aws-py-webserver/README.md +++ b/aws-py-webserver/README.md @@ -13,50 +13,60 @@ http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/deploying.applicat 1. Login to the Pulumi CLI via `pulumi login`. -1. Initialize a Pulumi repository with pulumi init, using your GitHub username. (Note: this step will be removed in the future.) +1. Create a new stack: - ```bash - $ pulumi init --owner githubUsername + ``` + $ pulumi stack init python-webserver-testing ``` -1. Create a new stack: +1. Since Pulumi is in private beta, run the following to install pip packages. For more information, see [Using Pulumi PyPI Packages](https://docs.pulumi.com/reference/python.html#pypi-packages). ``` - $ pulumi stack init webserver-testing - Created stack 'webserver-testing'. + pip install \ + --extra-index-url https://${PULUMI_ACCESS_TOKEN}@pypi.pulumi.com/simple \ + -r requirements.txt ``` -1. Run `pulumi preview`: +1. Set the AWS region: ``` - $ pulumi preview - Previewing stack 'python-test' in the Pulumi Cloud ☁️ - Previewing changes: - - pulumi:Stack("webserver-py-python-test"): Completed - aws:SecurityGroup("web-secgrp"): + Would create - aws:Instance("web-server-www"): + Would create - info: 3 changes previewed: - + 3 resources to create + $ pulumi config set aws:region us-west-2 ``` -1. Run `pulumi update`: +1. Run `pulumi update` to preview and deploy changes: ``` $ pulumi update - Updating stack 'python-test' in the Pulumi Cloud ☁️ + Previewing stack 'python-webserver-testing' + Previewing changes: + ... + + Do you want to proceed? yes + Updating stack 'python-webserver-testing' Performing changes: - pulumi:Stack("webserver-py-python-test"): Completed - aws:SecurityGroup("web-secgrp"): + Created - aws:Instance("web-server-www"): + Created + #: Resource Type Name Status Extra Info + 1: pulumi:pulumi:Stack webserver-py-python-webserver-testing + created + 2: aws:ec2:SecurityGroup web-secgrp + created + 3: aws:ec2:Instance web-server-www + created + info: 3 changes performed: + 3 resources created - Update duration: 26.445180782s + Update duration: 26.470339302s + + Permalink: https://pulumi.com/lindydonna/examples/webserver-py/python-webserver-testing/updates/1 ``` -1. Verify that the EC2 instance exists, by either using the AWS Console or running `aws ec2 describe-instances`. +1. View the host name and IP address of the instance via `stack output`: -1. Clean up resources by running `pulumi destroy`. + ``` + $ pulumi stack output + Current stack outputs (2): + OUTPUT VALUE + public_dns ec2-34-217-176-141.us-west-2.compute.amazonaws.com + public_ip 34.217.176.141 + ``` - +1. Verify that the EC2 instance exists, by either using the AWS Console or running `aws ec2 describe-instances`. + +1. Clean up resources by running `pulumi destroy` and answering the confirmation question at the prompt. diff --git a/aws-py-webserver/requirements.txt b/aws-py-webserver/requirements.txt index 74b3f9b6e..251503a81 100644 --- a/aws-py-webserver/requirements.txt +++ b/aws-py-webserver/requirements.txt @@ -1 +1 @@ -pulumi>=0.11.0 +pulumi>=0.12.0 diff --git a/aws-ts-serverless-raw/README.md b/aws-ts-serverless-raw/README.md index 8de03b8c2..5da52e4be 100644 --- a/aws-ts-serverless-raw/README.md +++ b/aws-ts-serverless-raw/README.md @@ -29,17 +29,12 @@ $ cd .. # Build the Pulumi program $ npm run build -# Preview the deployment -$ pulumi preview -Previewing changes: -[snip...] -info: 9 changes previewed: - + 9 resources to create - -# Deploy the update +# Preview and run the deployment $ pulumi update +Previewing changes: +... Performing changes: -[snip...] +... info: 9 changes performed: + 9 resources created Update duration: 25.017340162s diff --git a/aws-ts-serverless-raw/package.json b/aws-ts-serverless-raw/package.json index e54022195..66953a8a4 100644 --- a/aws-ts-serverless-raw/package.json +++ b/aws-ts-serverless-raw/package.json @@ -10,7 +10,7 @@ "typescript": "^2.7.2" }, "dependencies": { - "@pulumi/aws": "^0.11.0", - "@pulumi/pulumi": "^0.11.0" + "@pulumi/aws": "^0.12.0", + "@pulumi/pulumi": "^0.12.0" } } diff --git a/azure-js-webserver/README.md b/azure-js-webserver/README.md index e9cbde562..f68767a22 100755 --- a/azure-js-webserver/README.md +++ b/azure-js-webserver/README.md @@ -4,61 +4,53 @@ Starting point for building the Pulumi web server sample in Azure. ## Running the App -Create a new stack: +1. Create a new stack: -``` -$ pulumi stack init --local -Enter a stack name: testing -``` + ``` + $ pulumi stack init webserver-azure-testing + ``` -Configure the app deployment. The username and password here will be used to configure the Virtual Machine. The +1. Configure the app deployment. The username and password here will be used to configure the Virtual Machine. The password must adhere to the [Azure restrictions on VM passwords](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/faq#what-are-the-password-requirements-when-creating-a-vm). -``` -$ pulumi config set azure:environment public -$ pulumi config set username testuser -$ pulumi config set --secret password -``` + ``` + $ pulumi config set azure:environment public + $ pulumi config set username testuser + $ pulumi config set --secret password + ``` -Login to Azure CLI (you will be prompted to do this during deployment if you forget): +1. Login to Azure CLI (you will be prompted to do this during deployment if you forget this step): -``` -$ az login -``` + ``` + $ az login + ``` -Restore NPM dependencies: +1. Restore NPM dependencies: -``` -$ npm install -``` + ``` + $ npm install + ``` -Preview the deployment of the application: +1. Run `pulumi update` to preview and deploy changes: -``` -$ pulumi preview -Previewing changes: -[...details omitted...] -info: 7 changes previewed: - + 7 resources to create -``` + ``` + $ pulumi update + Previewing changes: + ... -Perform the deployment: + Performing changes: + ... + info: 7 changes performed: + + 7 resources created + Update duration: 2m38.391208237s + ``` -``` -$ pulumi update -Performing changes: -[...details omitted...] -info: 7 changes performed: - + 7 resources created -Update duration: 2m38.391208237s -``` +1. Check the IP address: -Check the IP address: - -``` -$ pulumi stack output privateIP -10.0.2.4 -``` + ``` + $ pulumi stack output privateIP + 10.0.2.4 + ``` *TODO*: Expose the Public IP address as well so that the VM can be SSH'd into or CURL'd directly. diff --git a/azure-js-webserver/package.json b/azure-js-webserver/package.json index c5af87a3b..f34ef9498 100755 --- a/azure-js-webserver/package.json +++ b/azure-js-webserver/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "main": "index.js", "dependencies": { - "@pulumi/pulumi": "^0.11.0", - "@pulumi/azure": "^0.11.0" + "@pulumi/pulumi": "^0.12.0", + "@pulumi/azure": "^0.12.0" } } diff --git a/cloud-js-thumbnailer/README.md b/cloud-js-thumbnailer/README.md index bf520a538..f8689923a 100755 --- a/cloud-js-thumbnailer/README.md +++ b/cloud-js-thumbnailer/README.md @@ -4,111 +4,160 @@ A video thumbnail extractor using serverless functions and containers. Loosely derived from the example at https://serverless.com/blog/serverless-application-for-long-running-process-fargate-lambda/. +## Prerequisites + +To use this example, make sure [Docker](https://docs.docker.com/engine/installation/) is installed and running. + ## Running the App -Create a new stack: - -``` -$ pulumi stack init --local -Enter a stack name: testing -``` - -Configure the app deployment: - -``` -$ pulumi config set aws:region us-east-1 -$ pulumi config set cloud-aws:ecsAutoCluster true -``` - -Preview the deployment of the application: - -``` -$ pulumi preview -Previewing changes: -[...details omitted...] -info: 59 changes previewed: - + 59 resources to create -``` - -Perform the deployment: - -``` -$ pulumi update -Performing changes: -[...details omitted...] -info: 59 changes performed: - + 59 resources created -Update duration: 9m59.754811909s -``` - -See the outputs: - -``` -$ pulumi stack output -Current stack outputs (1): - OUTPUT VALUE - bucketName bucket-6120251 -``` - -Upload a video: - -``` -$ aws s3 cp ~/Downloads/small.mp4 s3://$(pulumi stack output bucketName)/small1_00-02.mp4 -upload: ../../../../../../Downloads/small.mp4 to s3://bucket-6120251/small1_00-02.mp4 -``` - -See the logs from the application: - -``` -$ pulumi logs -f -Collecting logs since 2018-03-19T16:17:45.000-07:00. - - 2018-03-19T17:17:39.121-07:00[ onNewVideo] A new 383631B video was uploaded to small1_00-02.mp4 at 2018-03-20T00:17:38.734Z. - 2018-03-19T17:17:43.939-07:00[ onNewVideo] Running thumbnailer task. - 2018-03-19T17:18:02.341-07:00[ ffmpegThumbTask] Starting... - 2018-03-19T17:18:02.341-07:00[ ffmpegThumbTask] Copying from S3 bucket-6120251/small1_00-02.mp4 to small1_00-02.mp4 ... -download: s3://bucket-6120251/small1_00-02.mp4 to ./small1_00-02.mp4eted 256.0 KiB/374.6 KiB (3.0 MiB/s) with 1 file(s) remaining - 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers - 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609 - 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-libkvazaar --enable-postproc --enable-small --enable-version3 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --extra-libs=-ldl --prefix=/opt/ffmpeg - 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libavutil 55. 78.100 / 55. 78.100 - 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libavcodec 57.107.100 / 57.107.100 - 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libavformat 57. 83.100 / 57. 83.100 - 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libavdevice 57. 10.100 / 57. 10.100 - 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libavfilter 6.107.100 / 6.107.100 - 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libavresample 3. 7. 0 / 3. 7. 0 - 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libswscale 4. 8.100 / 4. 8.100 - 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libswresample 2. 9.100 / 2. 9.100 - 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libpostproc 54. 7.100 / 54. 7.100 - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './small1_00-02.mp4': - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Metadata: - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] major_brand : mp42 - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] minor_version : 0 - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] compatible_brands: mp42isomavc1 - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] creation_time : 2010-03-20T21:29:11.000000Z - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] encoder : HandBrake 0.9.4 2009112300 - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Duration: 00:00:05.57, start: 0.000000, bitrate: 551 kb/s - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 560x320, 465 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default) - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Metadata: - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] creation_time : 2010-03-20T21:29:11.000000Z - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] encoder : JVT/AVC Coding - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 83 kb/s (default) - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Stream mapping: - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Stream #0:0 -> #0:0 (h264 (native) -> png (native)) - 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Press [q] to stop, [?] for help - 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] Output #0, image2, to 'small1.png': - 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] Metadata: - 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] major_brand : mp42 - 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] minor_version : 0 - 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] compatible_brands: mp42isomavc1 - 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] encoder : Lavf57.83.100 - 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] Stream #0:0(und): Video: png, rgb24, 560x320, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default) - 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] Metadata: - 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] creation_time : 2010-03-20T21:29:11.000000Z - 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] encoder : Lavc57.107.100 png - 2018-03-19T17:18:03.005-07:00[ ffmpegThumbTask] frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.03 bitrate=N/A speed=0.494x - 2018-03-19T17:18:03.005-07:00[ ffmpegThumbTask] video:182kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown - 2018-03-19T17:18:03.007-07:00[ ffmpegThumbTask] Copying small1.png to S3 at bucket-6120251/small1.png ... -upload: ./small1.png to s3://bucket-6120251/small1.png pleted 182.2 KiB/182.2 KiB (1.7 MiB/s) with 1 file(s) remaining - 2018-03-19T17:18:03.761-07:00[ onNewThumbnail] A new 186620B thumbnail was saved to small1.png at 2018-03-20T00:18:03.389Z. -``` +1. Create a new stack: + + ``` + $ pulumi stack init thumbnailer-testing + ``` + +1. Set AWS as the provider: + + ``` + $ pulumi config set cloud:provider aws + ``` + +1. Configure Pulumi to use AWS Fargate, which is currently only available in `us-east-1`, `us-west-2`, and `eu-west-1`: + + ``` + $ pulumi config set aws:region us-west-2 + $ pulumi config set cloud-aws:useFargate true + ``` + +1. Restore NPM modules via `npm install`. + +1. Preview and deploy the app via `pulumi update`. The preview will take some time, as it builds a docker container. A total of 42 resources are created. + + ``` + Updating stack 'thumnailer-testing' + Performing changes: + + #: Resource Type Name Status Extra Info + 1: pulumi:pulumi:Stack video-thumbnailer-thumnailer-testing + created 1 info message + 2: aws:ecs:Cluster pulumi-thumnailer-global + created + 3: cloud:global:infrastructure global-infrastructure + created + 4: aws:ecr:Repository pulum-dc8d99de-container + created + 5: cloud:bucket:Bucket bucket + created + 6: cloud:task:Task ffmpegThumbTask + created + 7: aws:ec2:SecurityGroup pulumi-thumnailer-global + created + 8: aws:sns:Topic pulumi-t-unhandled-error + created + 9: aws:iam:Role pulumi-thumnailer-t-task + created + 10: aws:iam:Role pulumi-thumnai-execution + created + 11: cloud:logCollector:LogCollector pulumi-thumnailer-testin + created + 12: cloud:function:Function onNewVideo + created + 13: cloud:function:Function onNewThumbnail + created + 14: aws:s3:Bucket bucket + created + 15: aws:cloudwatch:LogGroup ffmpegThumbTask + created + 16: aws:iam:RolePolicyAttachment pulumi-thu-task-32be53a2 + created + 17: aws:iam:RolePolicyAttachment pulumi-thu-task-fd1a00e5 + created + 18: aws:iam:RolePolicyAttachment pulumi-thumnai-execution + created + 19: aws:serverless:Function pulumi-thumnailer-testin + created + 20: aws:serverless:Function onNewVideo + created + 21: aws:serverless:Function onNewThumbnail + created + 22: aws:iam:Role pulumi-thumnailer-testin + created + 23: aws:iam:Role onNewVideo + created + 24: aws:iam:Role onNewThumbnail + created + 25: aws:lambda:Function pulumi-thumnailer-testin + created + 26: aws:iam:RolePolicyAttachment pulumi-thumnailer-testin-32be53a2 + created + 27: aws:iam:RolePolicyAttachment onNewVideo-32be53a2 + created + 28: aws:iam:RolePolicyAttachment onNewVideo-fd1a00e5 + created + 29: aws:iam:RolePolicyAttachment onNewThumbnail-32be53a2 + created + 30: aws:iam:RolePolicyAttachment onNewThumbnail-fd1a00e5 + created + 31: aws:lambda:Function onNewThumbnail + created + 32: aws:ecs:TaskDefinition ffmpegThumbTask + created + 33: aws:lambda:Permission pulumi-thumnailer-testin + created + 34: aws:cloudwatch:LogSubscriptionFilter ffmpegThumbTask + created + 35: aws:cloudwatch:LogGroup onNewThumbnail + created + 36: aws:lambda:Permission onNewThumbnail + created + 37: aws:lambda:Function onNewVideo + created + 38: aws:cloudwatch:LogSubscriptionFilter onNewThumbnail + created + 39: aws:cloudwatch:LogGroup onNewVideo + created + 40: aws:lambda:Permission onNewVideo + created + 41: aws:cloudwatch:LogSubscriptionFilter onNewVideo + created + 42: aws:s3:BucketNotification bucket + created + ``` + +1. View the stack outputs: + + ``` + $ pulumi stack output + Current stack outputs (1): + OUTPUT VALUE + bucketName bucket-6120251 + ``` + +1. Upload a video: + + ``` + $ aws s3 cp ./sample/video-small.mp4 s3://$(pulumi stack output bucketName)/small1_00-02.mp4 + upload: sample/video-small.mp4 to s3://bucket-0e25c2d/small1_00-02.mp4 + ``` + +1. View the logs from both the Lambda function and the ECS task: + + ``` + $ pulumi logs -f + Collecting logs since 2018-03-19T16:17:45.000-07:00. + + 2018-03-19T17:17:39.121-07:00[ onNewVideo] A new 383631B video was uploaded to small1_00-02.mp4 at 2018-03-20T00:17:38.734Z. + 2018-03-19T17:17:43.939-07:00[ onNewVideo] Running thumbnailer task. + 2018-03-19T17:18:02.341-07:00[ ffmpegThumbTask] Starting... + 2018-03-19T17:18:02.341-07:00[ ffmpegThumbTask] Copying from S3 bucket-6120251/small1_00-02.mp4 to small1_00-02.mp4 ... + download: s3://bucket-6120251/small1_00-02.mp4 to ./small1_00-02.mp4eted 256.0 KiB/374.6 KiB (3.0 MiB/s) with 1 file(s) remaining + 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers + 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609 + 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-libkvazaar --enable-postproc --enable-small --enable-version3 --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib --extra-libs=-ldl --prefix=/opt/ffmpeg + 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libavutil 55. 78.100 / 55. 78.100 + 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libavcodec 57.107.100 / 57.107.100 + 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libavformat 57. 83.100 / 57. 83.100 + 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libavdevice 57. 10.100 / 57. 10.100 + 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libavfilter 6.107.100 / 6.107.100 + 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libavresample 3. 7. 0 / 3. 7. 0 + 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libswscale 4. 8.100 / 4. 8.100 + 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libswresample 2. 9.100 / 2. 9.100 + 2018-03-19T17:18:02.929-07:00[ ffmpegThumbTask] libpostproc 54. 7.100 / 54. 7.100 + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './small1_00-02.mp4': + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Metadata: + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] major_brand : mp42 + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] minor_version : 0 + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] compatible_brands: mp42isomavc1 + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] creation_time : 2010-03-20T21:29:11.000000Z + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] encoder : HandBrake 0.9.4 2009112300 + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Duration: 00:00:05.57, start: 0.000000, bitrate: 551 kb/s + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 560x320, 465 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default) + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Metadata: + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] creation_time : 2010-03-20T21:29:11.000000Z + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] encoder : JVT/AVC Coding + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 83 kb/s (default) + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Stream mapping: + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Stream #0:0 -> #0:0 (h264 (native) -> png (native)) + 2018-03-19T17:18:02.937-07:00[ ffmpegThumbTask] Press [q] to stop, [?] for help + 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] Output #0, image2, to 'small1.png': + 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] Metadata: + 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] major_brand : mp42 + 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] minor_version : 0 + 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] compatible_brands: mp42isomavc1 + 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] encoder : Lavf57.83.100 + 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] Stream #0:0(und): Video: png, rgb24, 560x320, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc (default) + 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] Metadata: + 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] creation_time : 2010-03-20T21:29:11.000000Z + 2018-03-19T17:18:02.942-07:00[ ffmpegThumbTask] encoder : Lavc57.107.100 png + 2018-03-19T17:18:03.005-07:00[ ffmpegThumbTask] frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.03 bitrate=N/A speed=0.494x + 2018-03-19T17:18:03.005-07:00[ ffmpegThumbTask] video:182kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown + 2018-03-19T17:18:03.007-07:00[ ffmpegThumbTask] Copying small1.png to S3 at bucket-6120251/small1.png ... + upload: ./small1.png to s3://bucket-6120251/small1.png pleted 182.2 KiB/182.2 KiB (1.7 MiB/s) with 1 file(s) remaining + 2018-03-19T17:18:03.761-07:00[ onNewThumbnail] A new 186620B thumbnail was saved to small1.png at 2018-03-20T00:18:03.389Z. + ``` + +1. Download the key frame: + + ``` + $ aws s3 cp s3://$(pulumi stack output bucketName)/small1.png small1.png + download: s3://bucket-0e25c2d/small1.png to ./small1.png + ``` + diff --git a/cloud-js-thumbnailer/package.json b/cloud-js-thumbnailer/package.json index 399f131eb..e6d4c6fd5 100755 --- a/cloud-js-thumbnailer/package.json +++ b/cloud-js-thumbnailer/package.json @@ -3,6 +3,6 @@ "version": "0.1.0", "main": "index.js", "dependencies": { - "@pulumi/cloud-aws": "^0.11.0-dev-1521503716-ga786896" + "@pulumi/cloud-aws": "^0.12.0" } } diff --git a/cloud-js-thumbnailer/sample/video-small.mp4 b/cloud-js-thumbnailer/sample/video-small.mp4 new file mode 100644 index 000000000..a203d0cdf Binary files /dev/null and b/cloud-js-thumbnailer/sample/video-small.mp4 differ diff --git a/cloud-ts-url-shortener-cache/README.md b/cloud-ts-url-shortener-cache/README.md index 7446d15b2..8af8505df 100644 --- a/cloud-ts-url-shortener-cache/README.md +++ b/cloud-ts-url-shortener-cache/README.md @@ -4,42 +4,54 @@ A sample URL shortener SPA that uses the high-level `cloud.Table` and `cloud.Htt ## Deploying and running the program -1. Initialize a Pulumi repository with pulumi init, using your GitHub username. (Note: this step will be removed in the future.) +1. Create a new stack: ``` - $ pulumi init --owner githubUsername + $ pulumi stack init url-cache-testing ``` -1. Create a new stack: +1. Set AWS as the provider: ``` - $ pulumi stack init testing + $ pulumi config set cloud:provider aws ``` -1. Set the provider and region: +1. Configure Pulumi to use AWS Fargate, which is currently only available in `us-east-1`, `us-west-2`, and `eu-west-1`: ``` - $ pulumi config set cloud:provider aws $ pulumi config set aws:region us-west-2 - ``` + $ pulumi config set cloud-aws:useFargate true + ``` -1. Set a value for the Redis password. The value can be an encrypted secret, specified with the `--secret` flag. If this flag is not provided, the value will be saved as plaintext in `Pulumi.testing.yaml` (since `testing` is the current stack name). +1. Set a value for the Redis password. The value can be an encrypted secret, specified with the `--secret` flag. If this flag is not provided, the value will be saved as plaintext in `Pulumi.url-cache-testing.yaml` (since `url-cache-testing` is the current stack name). ``` $ pulumi config set --secret redisPassword S3cr37Password - Enter your passphrase to protect config/secrets: - Re-enter your passphrase to confirm: ``` 1. Restore NPM modules via `npm install`. 1. Compile the program via `tsc` or `npm run build`. -1. Preview the program deployment: +1. Preview and run the deployment via `pulumi update`. The operation will take about 5 minutes to complete. - - -1. Perform the deployment: + ``` + $ pulumi update + Previewing stack 'url-cache-testing' + ... + + Updating stack 'url-cache-testing' + Performing changes: + + #: Resource Type Name + 1: pulumi:pulumi:Stack url-shortener-cache-url- + ... + 63: aws:apigateway:Stage urlshortener + + info: 63 changes performed: + + 63 resources created + Update duration: 5m48.727390626s + ``` 1. To view the API endpoint, use the `stack output` command: @@ -50,4 +62,4 @@ A sample URL shortener SPA that uses the high-level `cloud.Table` and `cloud.Htt 1. Open this page in a browser and you'll see a single page app for creating and viewing short URLs. - +1. To clean up resources, run `pulumi destroy` and answer the confirmation question at the prompt. diff --git a/cloud-ts-url-shortener-cache/package.json b/cloud-ts-url-shortener-cache/package.json index dd9f5ad1b..ebb949e2e 100644 --- a/cloud-ts-url-shortener-cache/package.json +++ b/cloud-ts-url-shortener-cache/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "redis": "^2.8.0", - "@pulumi/cloud": "^0.11.0", - "@pulumi/cloud-aws": "^0.11.0" + "@pulumi/cloud": "^0.12.0", + "@pulumi/cloud-aws": "^0.12.0" } } diff --git a/cloud-ts-url-shortener/README.md b/cloud-ts-url-shortener/README.md index 1a07f1e5c..0d8b788d7 100644 --- a/cloud-ts-url-shortener/README.md +++ b/cloud-ts-url-shortener/README.md @@ -4,17 +4,10 @@ A sample URL shortener SPA that uses the high-level `cloud.Table` and `cloud.Htt ## Deploying and running the program -1. Initialize a Pulumi repository with pulumi init, using your GitHub username. (Note: this step will be removed in the future.) - - ``` - $ pulumi init --owner githubUsername - ``` - 1. Create a new stack: ``` - $ pulumi stack init - Enter a stack name: url-shortener-test + $ pulumi stack init url-shortener-test ``` 1. Set the provider and region: @@ -28,30 +21,27 @@ A sample URL shortener SPA that uses the high-level `cloud.Table` and `cloud.Htt 1. Compile the program via `tsc` or `npm run build`. -1. Preview the program deployment: +1. Preview and run the deployment via `pulumi update`. The operation will take about 3 minutes to complete. ``` - $ pulumi preview - [...details omitted...] - ---outputs:--- - endpointUrl: computed - info: 48 changes previewed: - + 48 resources to create - ``` + $ pulumi update + Previewing stack 'url-shortener-test' + ... -1. Perform the deployment: + Updating stack 'url-shortener-test' + Performing changes: - ``` - $ pulumi update - [...details omitted...] - ---outputs:--- - endpointUrl: "https://gs8t66u634.execute-api.us-east-1.amazonaws.com/stage/" + #: Resource Type Name Status + 1: pulumi:pulumi:Stack url-shortener-url-shortener-test + creatin + ... + 48: aws:apigateway:Stage urlshortener + created + info: 48 changes performed: + 48 resources created - Update duration: 4m7.023449447s + Update duration: 2m50.772883687s ``` -1. The API endpoint will be shown as the value for `endpointUrl` in the CLI output. You can always get this value by running `pulumi stack output`: +1. To view the url for the API endpoint, run `pulumi stack output`: ``` $ pulumi stack output endpointUrl diff --git a/cloud-ts-url-shortener/package.json b/cloud-ts-url-shortener/package.json index eeba7f5c3..0dc202cd5 100644 --- a/cloud-ts-url-shortener/package.json +++ b/cloud-ts-url-shortener/package.json @@ -11,7 +11,7 @@ "typescript": "^2.7.2" }, "dependencies": { - "@pulumi/cloud": "^0.11.0", - "@pulumi/cloud-aws": "^0.11.0" + "@pulumi/cloud": "^0.12.0", + "@pulumi/cloud-aws": "^0.12.0" } } diff --git a/cloud-ts-voting-app/README.md b/cloud-ts-voting-app/README.md index 138e9b9fd..f7be33555 100644 --- a/cloud-ts-voting-app/README.md +++ b/cloud-ts-voting-app/README.md @@ -16,18 +16,12 @@ To use this example, make sure [Docker](https://docs.docker.com/engine/installat ### Configure the deployment -1. Initialize a Pulumi repository with pulumi init, using your GitHub username. (Note: this step will be removed in the future.) - - ``` - $ pulumi init --owner githubUsername - ``` - 1. Login via `pulumi login`. 1. Create a new stack: ``` - $ pulumi stack init testing + $ pulumi stack init voting-app-testing ``` 1. Set AWS as the provider: @@ -36,10 +30,10 @@ To use this example, make sure [Docker](https://docs.docker.com/engine/installat $ pulumi config set cloud:provider aws ``` -1. Configure Pulumi to use AWS Fargate, which is currently only available in `us-east-1`: +1. Configure Pulumi to use AWS Fargate, which is currently only available in `us-east-1`, `us-west-2`, and `eu-west-1`: ``` - $ pulumi config set aws:region us-east-1 + $ pulumi config set aws:region us-west-2 $ pulumi config set cloud-aws:useFargate true ``` @@ -57,121 +51,13 @@ To use this example, make sure [Docker](https://docs.docker.com/engine/installat ### Preview and deploy -1. Ensure the Docker daemon is running on your machine, then preview changes via `pulumi preview`. This step will create the Docker container but will not provision resources. - - ``` - $ pulumi preview - Previewing stack 'testing' in the Pulumi Cloud ☁️ - Previewing changes: - - global: * Would not change, 1 info message(s). info: Building container image 'pulum-df6d90cb-container': context=./frontend... - pulumi:Stack("voting-app-testing"): Running, 56 info message(s). info: b542772b4177: Download complete... - aws:Cluster("pulumi-testing-global"): + Would create - cloud:infrastructure("global-infrastructure"): + Would create - pulumi:Stack("voting-app-testing"): Running, 56 info message(s). info: b542772b4177: Download complete... - aws:Repository("pulum-df6d90cb-container"): + Would create - pulumi:Stack("voting-app-testing"): Running, 143 info message(s). info: Successfully tagged pulum-df6d90cb-container:latest... - ws:Role("pulumi-testing-execution"): + Would create - pulumi:Stack("voting-app-testing"): Completed, 143 info message(s). info: Successfully tagged pulum-df6d90cb-container:latest - aws:LogGroup("voting-app-cache"): + Would create - aws:RolePolicyAttachment("pulumi-tes-task-32be53a2"): + Would create - aws:RolePolicyAttachment("pulumi-tes-task-fd1a00e5"): + Would create - aws:RolePolicyAttachment("pulumi-testing-execution"): + Would create - aws:Function("pulumi-testing"): + Would create - aws:Role("pulumi-testing"): + Would create - aws:Function("pulumi-testing")-1: + Would create - aws:RolePolicyAttachment("pulumi-testing-32be53a2"): + Would create - aws:TargetGroup("22582cb2"): + Would create - aws:SecurityGroup("pulumi-testing-global"): + Would create - aws:LoadBalancer("22582cb2"): + Would create - aws:Permission("pulumi-testing"): + Would create - aws:LogSubscriptionFilter("voting-app-cache"): + Would create - aws:Listener("voting-app-cache-redis-6379"): + Would create - cloud:Service("voting-app-frontend"): + Would create - aws:TaskDefinition("voting-app-cache"): + Would create - aws:LogGroup("voting-app-frontend"): + Would create - aws:TargetGroup("8f351c44"): + Would create - aws:LoadBalancer("8f351c44"): + Would create - aws:Service("voting-app-cache"): + Would create - aws:LogSubscriptionFilter("voting-app-frontend"): + Would create - aws:Listener("voting-app-frontend-votingAppFrontend-80"): + Would create - aws:TaskDefinition("voting-app-frontend"): + Would create - aws:Service("voting-app-frontend"): + Would create - - global: Diagnostics - info: Building container image 'pulum-df6d90cb-container': context=./frontend - - - pulumi:Stack("voting-app-testing"): Diagnostics - info: Sending build context to Docker daemon 12.29kB - [... output omitted ...] - info: Successfully tagged pulum-df6d90cb-container:latest - - info: 32 changes previewed: - + 32 resources to create - ``` - -1. Deploy the changes with `pulumi update`. Since this deploys a number of resources, it will take about 15 minutes to complete. - - ```bash - $ pulumi update - Updating stack 'testing' in the Pulumi Cloud ☁️ - Performing changes: - - global: * Unchanged, 1 info message(s). info: Building container image 'pulum-df6d90cb-container': context=./frontend... - pulumi:Stack("voting-app-testing"): Running, 96 info message(s). info: latest: digest: sha256:ff29b6c6ee435992b28b34602b294cac4fe6715df1e6f5fe680fd684d2cbec64 size:9... - pulumi:Stack("voting-app-testing"): Running, 96 info message(s). info: latest: digest: sha256:ff29b6c6ee435992b28b34602b294cac4fe6715df1e6f5fe680fd684d2cbec64 siz.. - pulumi:Stack("voting-app-testing"): Running, 96 info message(s). info: latest: digest: sha256:ff29b6c6ee435992b28b34602b294cac4fe6715df1e6f5fe680fd684d2cbec64 si... - global: * Unchanged, 1 info message(s). info: Building container image 'pulum-df6d90cb-container': context=./frontend - pulumi:Stack("voting-app-testing"): Running, 96 info message(s). info: latest: digest: sha256:ff29b6c6ee435992b28b34602b294cac4fe6715df1e6f5fe680fd684d2cbec64 size. - pulumi:Stack("voting-app-testing"): Completed, 96 info message(s). info: latest: digest: sha256:ff29b6c6ee435992b28b34602b294cac4fe6715df1e6f5fe680fd684d2cbec64 siz - ws:Role("pulumi-testing-execution"): + Created - cloud:LogCollector("pulumi-testing"): + Created - aws:SecurityGroup("pulumi-testing-global"): + Created - aws:LogGroup("voting-app-cache"): + Created - aws:TargetGroup("22582cb2"): + Created - aws:LoadBalancer("22582cb2"): + Created - aws:RolePolicyAttachment("pulumi-tes-task-32be53a2"): + Created - aws:RolePolicyAttachment("pulumi-tes-task-fd1a00e5"): + Created - aws:RolePolicyAttachment("pulumi-testing-execution"): + Created - aws:Function("pulumi-testing"): + Created - aws:Listener("voting-app-cache-redis-6379"): + Created - cloud:Service("voting-app-frontend"): + Created - aws:TaskDefinition("voting-app-cache"): + Created - aws:Role("pulumi-testing"): + Created - aws:LogGroup("voting-app-frontend"): + Created - aws:TargetGroup("8f351c44"): + Created - aws:LoadBalancer("8f351c44"): + Created - aws:Service("voting-app-cache"): + Created - aws:Function("pulumi-testing")-1: + Created - aws:RolePolicyAttachment("pulumi-testing-32be53a2"): + Created - aws:Listener("voting-app-frontend-votingAppFrontend-80"): + Created - aws:TaskDefinition("voting-app-frontend"): + Created - aws:Permission("pulumi-testing"): + Created - aws:LogSubscriptionFilter("voting-app-cache"): + Created - aws:LogSubscriptionFilter("voting-app-frontend"): + Created - aws:Service("voting-app-frontend"): + Created - - global: Diagnostics - info: Building container image 'pulum-df6d90cb-container': context=./frontend - - pulumi:Stack("voting-app-testing"): Diagnostics - [... details omitted ...] - - info: 32 changes performed: - + 32 resources created - Update duration: 11m44.627933815s - - Permalink: https://pulumi.com/lindydonna/examples/voting-app/testing/updates/4 - ``` +1. Ensure the Docker daemon is running on your machine, then preview and deploy the program with `pulumi update`. The program deploys 32 resources and takes about 10 minutes to complete. 1. View the stack output properties via `pulumi stack output`. The stack output property `frontendUrl` is the URL and port of the deployed app: ```bash - $ pulumi stack output - Current stack outputs (1): - OUTPUT VALUE - frontendURL 8f351c44-1cb535f-5115dd91f58e57fa.elb.us-east-1.amazonaws.com + $ pulumi stack output frontendURL + 8f351c44-f9d1584-247a3196f19f7797.elb.us-west-2.amazonaws.com ``` 1. In a browser, navigate to the URL for `frontendURL`. You should see the voting app webpage. diff --git a/cloud-ts-voting-app/package.json b/cloud-ts-voting-app/package.json index 64755b0af..e890c579f 100644 --- a/cloud-ts-voting-app/package.json +++ b/cloud-ts-voting-app/package.json @@ -11,8 +11,8 @@ "typescript": "^2.7.2" }, "dependencies": { - "@pulumi/pulumi": "^0.11.0", - "@pulumi/cloud": "^0.11.0", - "@pulumi/cloud-aws": "^0.11.0" + "@pulumi/pulumi": "^0.12.0", + "@pulumi/cloud": "^0.12.0", + "@pulumi/cloud-aws": "^0.12.0" } } diff --git a/kubernetes-ts-guestbook/package.json b/kubernetes-ts-guestbook/package.json index 11f33212b..5ae618161 100644 --- a/kubernetes-ts-guestbook/package.json +++ b/kubernetes-ts-guestbook/package.json @@ -11,8 +11,8 @@ "typescript": "^2.5.3" }, "dependencies": { - "@pulumi/kubernetes": "^0.11.3-rc1", - "@pulumi/pulumi": "^0.11.3-rc2" + "@pulumi/kubernetes": "^0.12", + "@pulumi/pulumi": "^0.12" }, "license": "MIT" }