Web server on Linode
Basic example of an Linode web server accessible over HTTP
This example lives in the pulumi/examples repository. Check out just this directory to use it:
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examplesgit -C pulumi-examples sparse-checkout set linode-js-webservercd pulumi-examples/linode-js-webserverStarting point for building a Pulumi sample web server on Linode.
Prerequisites#
Deploying the example#
-
Create a new stack:
Terminal window pulumi stack init webserver-linode-testing -
Set your Linode API token:
Terminal window pulumi config set --secret linode:token YOURLINODETOKEN -
Install dependencies:
Terminal window npm install -
Run
pulumi upto preview and deploy changes:Terminal window pulumi upUpdating (webserver-linode-testing):Type Name Status+ pulumi:pulumi:Stack webserver-linode-webserver-linode-testing created+ ├─ linode:index:StackScript simple-server created+ └─ linode:index:Instance instance createdOutputs:instanceIP : "69.164.221.90"instanceLabel: "linode13879908"Resources:+ 3 createdDuration: 55s -
Curl the HTTP server:
Terminal window curl $(pulumi stack output instanceIP)Hello, World! -
SSH into the server:
Terminal window linode-cli ssh root@$(pulumi stack output instanceLabel)
Cleaning up#
Once you’re finished experimenting, destroy your stack and remove it to avoid incurring any additional cost:
pulumi destroypulumi stack rmRelated
Blog PostJul 2018
AWS SQS to Lambda with Pulumi: Serverless Queue Example
Blog PostJun 2018