Skip to main content

CLI Command making OCI Bastion and kubernetes usage simple and fast

Project description

Auto Bastion

Manage your bastion sessions automatically without pain of creating them by clicking and copy pasting commands

image PyPI - Python Version Downloads

Supported

OS

No specific requirements here, whatever runs Python

Cloud Providers

  • Oracle Cloud

Requirements

Python

  • 3.7+

Configuration of OCI SDK

  • Add key in your Oracle cloud profile
  • Generate new key
  • Copy configuration file generated in your profile to ~/.oci/config
  • Replace path of your *.pem key on line with #TODO

Installing

MacOS

On most MacOS machines there is pip3 instead of pip use pip3 for install

Install and update using pip:

pip install abst

or

pip3 install abst

How to set up

  • Use abst config fill {context} to fill your credentials for usage, you can find all the credentials on cloud provider site, leave context empty if you want to fill default
  • Use abst generate {context} to generate default config for context, leave context empty if you want to generate to default

Usage

Both commands do automatic reconnect on idle SSH Tunnel termination
  • abst create forward/managed single {context} for single bastion session with persisting SSH connection, leave context empty if you want to use default
  • abst create forward/managed fullauto {context} for automatic Bastion session creation once deleted, will keep your, leave context empty if you want to use default connection alive till you kill this script
  • abst clean for removal all the saved credentials
  • abst use {context} for using different config that you had filled, default is the default context in creds.json
  • Use abst locate {context} to locate your configs, leave context empty if you want to locate default

Parallel execution

If you are more demanding and need to have connection to your SSH Tunnels ready at all times you can use parallel executed Bastions that currently work for full-auto forwarded setting

Change local port in the setting to port that is unique to other configs, and it will be running on all the added ports Until you kill the abst command, it will automatically remove all generated Bastion sessions by this program

  • abst parallel add {context} will add context from your context folder to stack that will be executed
  • abst parallel remove {context} will remove context from your context folder to stack that will be executed
  • abst parallel run {context} will run all the stacked contexts
  • abst parallel display will display current stacked contexts

Helm registry commands

  • abst helm login will log you in with credentials set in config.json, you set these credentials when running this command first time. Edit with flag --edit 1-n number is the index of credential in list
  • abst helm push <chart-name> will push to specified remote branch, if more credentials preset it will let you pick which one to use

Kubectl commands

  • abst cp secret secret_namespace target_namespace source_namespace(optional) this will copy secret to target namespace, without providing source namespace it will use current as a source

Did I made your life less painful ?

Support my coffee addiction ;)
Buy me a Coffee

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abst-1.8.5.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

abst-1.8.5-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file abst-1.8.5.tar.gz.

File metadata

  • Download URL: abst-1.8.5.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for abst-1.8.5.tar.gz
Algorithm Hash digest
SHA256 997a5028b938e837617b712e43ac5f6c10d3b6d1c4e843e4617b84fec89e0d2f
MD5 f6ed653d4b4518698cfc3d25e8e74b69
BLAKE2b-256 3b52a980f610cda1c83d69c327298057771dec9cb50fe0260ded872e0fefd559

See more details on using hashes here.

File details

Details for the file abst-1.8.5-py3-none-any.whl.

File metadata

  • Download URL: abst-1.8.5-py3-none-any.whl
  • Upload date:
  • Size: 25.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for abst-1.8.5-py3-none-any.whl
Algorithm Hash digest
SHA256 42ec3023715b12dd8b250866713ffbb20443d3ecd53c5da76db34ccce7d8b6e2
MD5 53aae97a268d9f72f8380d7223a2ae18
BLAKE2b-256 379a2cf55c61f1e2b0876790cacad2f161edd85214cb19bb3fad5b5351232802

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page