Skip to content

sncf-connect-tech/orka-tools

Repository files navigation

orka-tools

build status

Orka documentation: https://orkadocs.macstadium.com/docs

Scripts

  • audit_vms.py: look for "suspicious" VMs that have been running for several hours on an Orka cluster
  • dump_logs.py & logs_stats.py: retrieve & analyse Orka cluster logs
  • orka.py: an alternate implementation of the Orka CLI that better suits our needs

Installation

pip install -r requirements.txt

Usage

First, you need to define some environment variables:

export ORKA_CONTROLLER_URL=
export ORKA_USER_EMAIL=...
export ORKA_LICENSE_KEY=
export ORKA_PASSWORD=

You can pass --help to any of the scripts to get a detailed description of the arguments & sub-commands it supports.

For example, to quickly connect to a VM through SSH:

ssh $SSH_USER@$(./orka.py vm get ssh_args --vm $VM_NAME)

Or:

sshpass -p $SSH_PASSWORD ssh $SSH_USER@$(./orka.py vm get ssh_args --vm $VM_NAME)