Skip to content

Latest commit

 

History

History
 
 

packet-py-webserver

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Deploy

Packet Webserver

This example demonstrates creating a webserver in Packet.net with Python

Running the Example

After cloning this repo, cd into it and run these commands.

  1. Create a new stack, which is an isolated deployment target for this example:

    $ pulumi stack init
  2. Install all of the dependencies for the application:

  3. 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
  4. Deploy everything with the pulumi up command. This provisions the webserver:

    $ pulumi up
  5. After a couple minutes, your webserver will be ready.

    $ pulumi up
    ...
    
    Outputs:
      + ip  : "147.75.65.213"
      + name: "new-vervet"
  6. Once you are done, you can destroy all of the resources, and the stack:

    $ pulumi destroy
    $ pulumi stack rm