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
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 ctx 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 ctx 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 {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 scriptabst do forward/managed {context}
alias forabst create
abst clean
for removal all the saved credentialsabst use {context}
for using different config that you had filled,default
is the default context increds.json
- Use
abst ctx locate {context}
to locate your configs, leave context empty if you want to locate default
Context commands
abst ctx list
to list contextsabst ctx upgrade <context-name>
to upgrade context you can use--all
flag to upgrade all contextsabst ctx locate <context-name>
to get a full path of contextabst ctx share <context-name>
to copy context contents into clipboard and display it, you can use--raw
to just get jsonabst ctx paste <context-name>
to paste contents into context file provided from name
Session commands
abst ssh
facilitates selecting an instance to connect to. The optionalport
argument can be specified partially; a connection is established if only one match is found. Use-n <context-name>
to filter a connection, where the name can be a partial match.abst
employs thein
operator for searching and proceeds with SSH if a single matching instance exists.
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 yourcontext folder
to stack that will be executedabst parallel remove {context}
will remove context from yourcontext folder
to stack that will be executedabst parallel run {context}
will run all the stacked contextsabst parallel display
will display current stacked contextsabst parallel list
will list all sets with 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 listabst 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 pod ssh <part of name>
will ssh into pod with similar name, if multiple found it will display selectabst 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 ;)
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
Built Distribution
File details
Details for the file abst-2.3.58.tar.gz
.
File metadata
- Download URL: abst-2.3.58.tar.gz
- Upload date:
- Size: 30.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 099cab6d2c9dfbf5061cf80a11f28f51ad6e44cc1130a3509cde966269f67a63 |
|
MD5 | d6010487cf4060c23a0be24f7c548233 |
|
BLAKE2b-256 | 928d691d803e06ce36290aa862b747182c0eb48ebd891b4cf58bbda7d2637483 |
File details
Details for the file abst-2.3.58-py3-none-any.whl
.
File metadata
- Download URL: abst-2.3.58-py3-none-any.whl
- Upload date:
- Size: 36.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 088909e54d215fc818a99082c1d0e65d1c8ef1ecc7e0b82ce5164ea6226137d1 |
|
MD5 | 2e0e575c899f0970ed77b23216e6b62f |
|
BLAKE2b-256 | 9d9b9db5827b571c6c4632543882affcc49fb72c65aa0f0a46c658cd41de12d0 |