# Auto Bastion
Manage your bastion sessions automatically without
pain of creating them by clicking and copy pasting commands
[![image](https://img.shields.io/pypi/v/abst.svg)](https://pypi.org/project/abst/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/abst)](https://pypi.org/project/abst/)
[![Downloads](https://pepy.tech/badge/abst)](https://pepy.tech/project/abst)
### 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](https://pip.pypa.io/en/stable/quickstart/):
```bash
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 script
* `abst do forward/managed {context}` alias for `abst create`
* `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 ctx locate {context}` to locate your configs, leave context empty if you want to locate
default
### Context commands
* `abst ctx list` to list contexts
* `abst ctx upgrade <context-name>` to upgrade context you can use `--all` flag to upgrade all contexts
* `abst ctx locate <context-name>` to get a full path of context
* `abst ctx share <context-name>` to copy context contents into clipboard and display it, you can use `--raw` to just
get json
* `abst 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 optional `port` 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 the `in` 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 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
* `abst 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 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 pod ssh <part of name>` will ssh into pod with similar name, if multiple found it will display select
* `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
<hr>
Did I made your life less painful ?
<br>
<br>
Support my coffee addiction ;)
<br>
<a href="https://www.buymeacoffee.com/jiriotoupal" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy me a Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
Raw data
{
"_id": null,
"home_page": "https://github.com/jiri-otoupal/abst",
"name": "abst",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.7",
"maintainer_email": null,
"keywords": "Auto OCI Bastion",
"author": "Jiri Otoupal",
"author_email": "jiri-otoupal@ips-database.eu",
"download_url": "https://files.pythonhosted.org/packages/92/8d/691d803e06ce36290aa862b747182c0eb48ebd891b4cf58bbda7d2637483/abst-2.3.58.tar.gz",
"platform": null,
"description": "# Auto Bastion\n\nManage your bastion sessions automatically without\npain of creating them by clicking and copy pasting commands\n\n[![image](https://img.shields.io/pypi/v/abst.svg)](https://pypi.org/project/abst/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/abst)](https://pypi.org/project/abst/)\n[![Downloads](https://pepy.tech/badge/abst)](https://pepy.tech/project/abst)\n\n### Supported\n\n#### OS\n\nNo specific requirements here, whatever runs Python\n\n#### Cloud Providers\n\n* **Oracle Cloud**\n\n## Requirements\n\n### Python\n\n* 3.7+\n\n#### Configuration of OCI SDK\n\n* Add key in your Oracle cloud profile\n* Generate new key\n* Copy configuration file generated in your profile to `~/.oci/config`\n* Replace path of your `*.pem` key on line with **#TODO**\n\n## Installing\n\n### MacOS\n\nOn most MacOS machines there is `pip3` instead of `pip` **use pip3 for install**\n\nInstall and update using [pip](https://pip.pypa.io/en/stable/quickstart/):\n\n```bash\npip install abst\n\nor\n\npip3 install abst\n```\n\n## How to set up\n\n* Use `abst ctx fill {context}` to fill your credentials for usage, you can find all the\n credentials on\n cloud provider site, leave context empty if you want to fill default\n* Use `abst ctx generate {context}` to generate default config for context, leave context empty if you\n want to generate to\n default\n\n## Usage\n\n###### Both commands do automatic reconnect on idle SSH Tunnel termination\n\n* `abst create forward/managed {context}` for automatic Bastion session creation once\n deleted, will keep your,\n leave context empty if you want to use default\n connection alive till you kill this script\n* `abst do forward/managed {context}` alias for `abst create`\n* `abst clean` for removal all the saved credentials\n* `abst use {context}` for using different config that you had filled, `default` is the default\n context in `creds.json`\n* Use `abst ctx locate {context}` to locate your configs, leave context empty if you want to locate\n default\n\n### Context commands\n\n* `abst ctx list` to list contexts\n* `abst ctx upgrade <context-name>` to upgrade context you can use `--all` flag to upgrade all contexts\n* `abst ctx locate <context-name>` to get a full path of context\n* `abst ctx share <context-name>` to copy context contents into clipboard and display it, you can use `--raw` to just\n get json\n* `abst ctx paste <context-name>` to paste contents into context file provided from name\n\n### Session commands\n\n* `abst ssh` facilitates selecting an instance to connect to. The optional `port` argument can be specified partially; a\n connection is established if only one match is found. Use `-n <context-name>` to filter a connection, where the name\n can be a partial match. `abst` employs the `in` operator for searching and proceeds with SSH if a single matching\n instance exists.\n\n### Parallel execution\n\nIf you are more demanding and need to have connection to your SSH Tunnels ready at all times\nyou can use parallel executed Bastions that currently work for full-auto forwarded setting\n\nChange local port in the setting to port that is unique to other configs, and it will be running on\nall the added ports\nUntil you kill the `abst` command, it will automatically remove all generated Bastion sessions by\nthis program\n\n* `abst parallel add {context}` will add context from your `context folder` to stack that will be\n executed\n* `abst parallel remove {context}` will remove context from your `context folder` to stack that\n will be executed\n* `abst parallel run {context}` will run all the stacked contexts\n* `abst parallel display` will display current stacked contexts\n* `abst parallel list` will list all sets with contexts\n\n### Helm registry commands\n\n* `abst helm login` will log you in with credentials set in config.json, you set these credentials\n when running this command first time. Edit with flag --edit 1-n number is the index of credential\n in list\n* `abst helm push <chart-name>` will push to specified remote branch, if more credentials preset it\n will let you pick which one to use\n\n### Kubectl commands\n\n* `abst pod ssh <part of name>` will ssh into pod with similar name, if multiple found it will display select\n* `abst cp secret secret_namespace target_namespace source_namespace(optional)` this will copy\n secret to target namespace, without providing source namespace it will use current as a source\n\n<hr>\nDid I made your life less painful ? \n<br>\n<br>\nSupport my coffee addiction ;)\n<br>\n<a href=\"https://www.buymeacoffee.com/jiriotoupal\" target=\"_blank\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy me a Coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" ></a>\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "CLI Command making OCI Bastion and kubernetes usage simple and fast",
"version": "2.3.58",
"project_urls": {
"Homepage": "https://github.com/jiri-otoupal/abst"
},
"split_keywords": [
"auto",
"oci",
"bastion"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9d9b9db5827b571c6c4632543882affcc49fb72c65aa0f0a46c658cd41de12d0",
"md5": "2e0e575c899f0970ed77b23216e6b62f",
"sha256": "088909e54d215fc818a99082c1d0e65d1c8ef1ecc7e0b82ce5164ea6226137d1"
},
"downloads": -1,
"filename": "abst-2.3.58-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2e0e575c899f0970ed77b23216e6b62f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.7",
"size": 36786,
"upload_time": "2024-05-29T10:38:26",
"upload_time_iso_8601": "2024-05-29T10:38:26.720377Z",
"url": "https://files.pythonhosted.org/packages/9d/9b/9db5827b571c6c4632543882affcc49fb72c65aa0f0a46c658cd41de12d0/abst-2.3.58-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "928d691d803e06ce36290aa862b747182c0eb48ebd891b4cf58bbda7d2637483",
"md5": "d6010487cf4060c23a0be24f7c548233",
"sha256": "099cab6d2c9dfbf5061cf80a11f28f51ad6e44cc1130a3509cde966269f67a63"
},
"downloads": -1,
"filename": "abst-2.3.58.tar.gz",
"has_sig": false,
"md5_digest": "d6010487cf4060c23a0be24f7c548233",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.7",
"size": 30166,
"upload_time": "2024-05-29T10:38:29",
"upload_time_iso_8601": "2024-05-29T10:38:29.546074Z",
"url": "https://files.pythonhosted.org/packages/92/8d/691d803e06ce36290aa862b747182c0eb48ebd891b4cf58bbda7d2637483/abst-2.3.58.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-29 10:38:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jiri-otoupal",
"github_project": "abst",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "click",
"specs": [
[
"~=",
"8.1.3"
]
]
},
{
"name": "inquirerpy",
"specs": [
[
"~=",
"0.3.4"
]
]
},
{
"name": "rich",
"specs": [
[
"~=",
"12.6.0"
]
]
},
{
"name": "abst",
"specs": [
[
"~=",
"1.7.9"
]
]
},
{
"name": "lastversion",
"specs": [
[
"~=",
"2.4.8"
]
]
},
{
"name": "oci",
"specs": [
[
"~=",
"2.95.0"
]
]
},
{
"name": "setuptools",
"specs": [
[
"~=",
"60.2.0"
]
]
},
{
"name": "semantic-version",
"specs": [
[
"~=",
"2.10.0"
]
]
},
{
"name": "pyperclip",
"specs": [
[
"~=",
"1.8.2"
]
]
},
{
"name": "bext",
"specs": [
[
"~=",
"0.0.8"
]
]
},
{
"name": "requests",
"specs": [
[
"~=",
"2.28.1"
]
]
},
{
"name": "deepmerge",
"specs": [
[
"~=",
"1.1.1"
]
]
}
],
"lcname": "abst"
}