This example demonstrates creating a webserver in Packet.net with Python
After cloning this repo, cd
into it and run these commands.
-
Create a new stack, which is an isolated deployment target for this example:
$ pulumi stack init
-
Install all of the dependencies for the application:
-
Create a Python virtualenv, activate it, and install dependencies:
This installs the dependent packages needed for our Pulumi program.
$ python3 -m venv venv $ source venv/bin/activate $ pip3 install -r requirements.txt
-
Deploy everything with the
pulumi up
command. This provisions the webserver:$ pulumi up
-
After a couple minutes, your webserver will be ready.
$ pulumi up ... Outputs: + ip : "147.75.65.213" + name: "new-vervet"
-
Once you are done, you can destroy all of the resources, and the stack:
$ pulumi destroy $ pulumi stack rm