Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Packet Bare Metal

Christoph Diehl edited this page Mar 12, 2019 · 2 revisions

Add your Packet auth token and a project name with the associated project id to the packet.json configuration file.

cat laniakea/examples/packet.json
{
    "auth_token": "YOUR_AUTH_TOKEN",
    "projects": {
        "fuzzing": "YOUR_PROJECT_ID"
    }
}

Basic Usage Examples

Creating either on-demand (-create-demand) or spot (-create-spot) devices:

laniakea packet -project fuzzing -create-demand -tags fuzzers -count 3

Show created devices by applying a tag based filter:

laniakea packet -project fuzzing -list-devices -only tags=fuzzers

Terminate all devices, matching the filter criteria:

laniakea packet -project fuzzing -terminate -only tags=fuzzers

Packet Help Menu

usage: laniakea packet [-h] [-create-demand | -create-spot | -reboot [n] | -stop [n] | -terminate [n]]
                       [-create-volume s [s ...]] [-conf path] [-list-projects] [-list-plans] [-list-operating-systems]
                       [-list-spot-prices] [-list-facilities] [-list-devices] [-project project] [-tags seq [seq ...]]
                       [-region region] [-os name] [-plan name] [-max-spot-price #] [-count #] [-only k=v [k=v ...]]

optional arguments:
  -h, --help                show this help message and exit

Mandatory Packet Parameters:
  -create-demand            Create an on demand based bare metal device instance. (default: False)
  -create-spot              Create a spot price based bare metal device instance. (default: False)
  -reboot [n]               Reboot active instances. (default: None)
  -stop [n]                 Stop active instances. (default: None)
  -terminate [n]            Terminate active instances. (default: None)

Optional Parameters:
  -create-volume s [s ...]  Create storage: <plan> <size> <region> <description> (default: None)
  -conf path                Packet configuration (default: /Users/posidron/Library/Application
                            Support/laniakea/examples/packet/packet.json)
  -list-projects            List available projects. (default: False)
  -list-plans               List available plans. (default: False)
  -list-operating-systems   List available operating systems. (default: False)
  -list-spot-prices         List spot prices. (default: False)
  -list-facilities          List available facilities. (default: False)
  -list-devices             List devices under given project name. (default: False)
  -project project          The project to perform operations on. (default: fuzzing)
  -tags seq [seq ...]       Tags associated with the instance. (default: None)
  -region region            The facility in which the instance is going to run. (default: nrt1)
  -os name                  The operating system for the created instance. (default: ubuntu_18_04)
  -plan name                The instance type to run. (default: baremetal_0)
  -max-spot-price #         Max price for spot instances. (default: 0.05)
  -count #                  The amount of devices to be spawned. (default: 1)
  -only k=v [k=v ...]       Filter instances by criterias. (default: None)
Clone this wiki locally