项目作者: mattdavis0351

项目描述 :
GitHub Action to create a batch of devices within a Packet.com project
高级语言: Python
项目地址: git://github.com/mattdavis0351/packet-create-device-batch.git
创建时间: 2020-04-01T07:21:26Z
项目社区:https://github.com/mattdavis0351/packet-create-device-batch

开源协议:MIT License

下载


GitHub Actions for creating a batch of devices within projects on Packet.com

Automate your infrastructure

This GitHub Action will create a new device batch in an existing project on packet.com. Devices are compute resources available within your organization projects.

Creating devices

With this action you can automate your workflow to by provisioning multiple devices inside of projects using the packet.com api.

To use this action you will first need an authentication token which can be generated through the Packet Portal.

You will also need a public/private key pair. Learn how to generate keys for either a user or a project.

NEVER share your private key with anyone!

Packet.com is NOT a free service, so you will be asked to provide billing information. This action will NOT have access to that information.

Sample workflow that uses the packet-create-project action

  1. # File: .github/workflows/workflow.yml
  2. on: [push]
  3. name: Packet Project Sample
  4. jobs:
  5. create-new-device:
  6. runs-on: ubuntu-latest
  7. name: Creating new device in existing packet project
  8. steps:
  9. - uses: mattdavis0351/packet-create-device-batch@v1
  10. with:
  11. API_key: ${{ secrets.PACKET_API_KEY }}
  12. project_name: my-project
  13. host_names: "Host-1, Host-2, Host-3"
  14. plan: "t3.small.x86"
  15. facility: "sjc1"
  16. operating_system: "ubuntu_19_04"
  17. quantity: 3
  18. spot_instance: true
  19. spot_price_max: .50
  20. user_ssh_keys: ${{ secrets.PACKET_PUBLIC_KEY }}

Available Inputs

Input Description Default Value Required
API_key Packet.com API authorization token No key supplied :white_check_mark:
project_name Desired name for new project default :white_check_mark:
host_names Desired host names for new device. If specifying more than one device us a comma separated list. GitHub Actions Host :white_check_mark:
plan Desired server type for device default :white_check_mark:
facility Geographical location for device default :white_check_mark:
operating_system Desired operating system for device default :white_check_mark:
quantity Number of desired devices in the batch. if you specify more than one host name this number must match the amount of hostnames 1 :x:
spot_instance Create devices as spot instances false :x:
spot_price_max Maximum bid for spot instances 1 :x:
user_ssh_keys SSH keys for any user account you wish to add to device :x:
project_ssh_keys Project level SSH keys for device :x:

Outputs from action

This action does not supply any outputs