Skip to content

NobleMajo/DeployIT

Repository files navigation

DeployIT

MIT



Uses ssh + sftp to deploy configurations to Linux servers and can execute simple commands.

Table of Contents

Getting Started

Install via Go

go install github.com/noblemajo/deployit@latest

Download executables

Go to the releases page and copy the download URL for your target system.

Build via Go

Clone the repo:

git clone https://github.com/noblemajo/deployit.git
cd deployit

Build the bin binary from source:

make build

./bin

Build via docker

You’re not required to install Go on the host if you have Make and Docker.

Use make docker to start an interactive shell inside the Go dev container.

Use Make targets such as make run in the container, then stop with exit.

Config

DeployIT is easily configured using environment variables or a .env file in the working directory.

Here is a WireGuard example:

DIT_NODE1=ssh://<user>@<host1>*<priv-key-path>
DIT_NODE1_TASK1=UPLOAD@./node1.wg0.conf@/etc/wireguard/wg0.conf
DIT_NODE1_TASK2=CMD@sudo wg-quick down wg0 || true && sudo wg-quick up wg0
DIT_NODE1_TASK3=DOWNLOAD@/etc/wireguard/wg0.conf@./test.node1.wg0.conf

DIT_NODE2=ssh://<user>@<host2>*<priv-key-path>
DIT_NODE2_TASK1=UPLOAD@./node2.wg0.conf@/etc/wireguard/wg0.conf
DIT_NODE2_TASK2=CMD@sudo wg-quick down wg0 || true && sudo wg-quick up wg0
DIT_NODE2_TASK3=DOWNLOAD@/etc/wireguard/wg0.conf@./test.node2.wg0.conf

This example deploys two local WireGuard configs from ./nodeX.wg0.conf to the selected hosts. It then runs wg-quick down and up on each interface to reload the config. To verify deployment, it downloads each remote config to ./test.node1.wg0.conf and ./test.node2.wg0.conf.

For this example, make sure the user you are using has permissions to access /etc/wireguard on the server. If a password is used, use !your-password instead of *<priv-key-path>.

Contributing

Contributions to this project are welcome!
Interested users can refer to the guidelines provided in the CONTRIBUTING.md file to contribute to the project and help improve its functionality and features.

Makefile

The Makefile contains many useful Make targets. It also includes Make targets to trigger releases and support development. Check it out as a starting point.

License

This project is licensed under the MIT license, providing users with flexibility and freedom to use and modify the software according to their needs.

Disclaimer

This project is provided without warranties.
Users are advised to review the accompanying license for more information on the terms of use and limitations of liability.

About

ssh+sftp deploys configs to servers and can execute simple commands

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors