upamune / remote-workstation

for upamune

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

remote-workstation

recipe test

python test

Do not use this repository if you are not upamune.

Requirements

  • Python 3.6.10
  • Pipenv

Preparation

  1. Add SSH Keys in web console
  2. Generate a personal access token in web console
  3. (optional) Add a firewall in web console
  4. (optional) Add a floating IP in web console

Execute

Create

Idempotently by name. Default name is remote-workstation.

Options

  • --token
    • required
  • --firewall-id
    • optional
  • --floating-ip
    • optional
  • --snapshot-id
    • optional

Example

# Create an instance.
$ python ./main.py create --token "${DIGITAL_OCEAN_API_KEY}" --firewall-id "${FIREWALL_ID}" --floating-ip "${FLOATING_IP}"

# Create an instance from snapshot.
$ python ./main.py create --token "${DIGITAL_OCEAN_API_KEY}" --firewall-id "${FIREWALL_ID}" --floating-ip "${FLOATING_IP}" --snapshot-id "${SNAPSHOT_ID}"

Destroy

$ python ./main.py destroy --token "${DIGITAL_OCEAN_API_KEY}"

Development

  1. pipenv sync
  2. pipenv shell
  3. pipenv run format
  4. pipenv run lint

About

for upamune


Languages

Language:Python 51.8%Language:Ruby 41.6%Language:Dockerfile 3.8%Language:Shell 2.8%