A library for managing SSH connections and deployments.
Project description
SSH BeARacer
A Python library for managing SSH connections and automating remote deployments.
Introduction
SSH Deployer simplifies the process of managing SSH connections, executing remote commands, and deploying applications to remote servers. It's a handy tool for developers looking to automate deployment workflows.
Features
- Secure SSH Connection Management: Easily establish and manage SSH connections.
- Local and Remote Command Execution: Execute commands locally or on remote servers.
- Automated Deployment: Automate build and deployment processes.
- Easy Integration: Seamlessly integrates into existing CI/CD pipelines.
Installation
Install the library via pip:
pip install ssh-bearacer
Usage
Here’s an example of how to use SSH Deployer in your project:
from ssh_deployer.manager import DeploymentManager
ssh_config = {
"ssh_host": "your_remote_host",
"ssh_port": 22,
"ssh_username": "your_username",
"ssh_key": "~/.ssh/id_rsa",
}
deployment_manager = DeploymentManager(ssh_config=ssh_config)
deployment_manager.run(
local_commands=[
"git checkout develop",
"git pull origin develop",
"bun run build",
"rsync -avP .output user@remote_host:~/app_directory",
],
remote_commands=[
"cd app_directory",
"docker-compose up -d --build",
"yes | docker system prune",
],
)
Components Overview
- SSHConnectionManager: Handles secure SSH connections and tunnel establishment.
- CommandExecutor: Executes commands locally or on remote servers.
- RemoteBuilder: Manages application deployment on remote servers.
- DeploymentManager: Orchestrates the entire deployment process, from build to deployment.
Contribution
We welcome contributions from the community. To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request for review.
License
This project is licensed under the MIT License.
Contact
For questions or feedback, feel free to reach out via email: duynn100198@gmail.com.
References
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ssh_bearacer-1.0.1.tar.gz.
File metadata
- Download URL: ssh_bearacer-1.0.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74046089de60162072b1fbe7ac642cf111f3530ca6c494783b52c9abb56abbd5
|
|
| MD5 |
7ddd1657f447cddb966c231eec2814f3
|
|
| BLAKE2b-256 |
f9b0a09cc737f6c7173e5ec1be0689770f14dbc5cd04f8bcbbbd6288db50ba33
|
File details
Details for the file ssh_bearacer-1.0.1-py3-none-any.whl.
File metadata
- Download URL: ssh_bearacer-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40a4ebd4c414573e92519bdbb0d9e0134d5c55c946707272bfa8c77f11f6239a
|
|
| MD5 |
a90c67d5304666a3279ea44094ac1a4f
|
|
| BLAKE2b-256 |
e97958a3ebe3579bbde572e54c58eac5a8f5d88bdec62bb9e2dc9b24919318ff
|