Uses ssh + sftp to deploy configurations to Linux servers and can execute simple commands.
DeployIT is easily configured using environment variables or an .env file. 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 2 different local Wireguard configs from ./nodeX.wg0.conf
to the selected host.
It then runs a wg-quick down and up on that interface to reload the config.
To test if the config and deployment were successful, it downloads the config to ./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>
.
None windows system with go
or wget & tar
installed.
For this section go is required, check out the install go guide.
go install https://github.com/CoreUnit-NET/deployit
BIN_DIR="/usr/local/bin"
DIT_VERSION="1.3.3"
rm -rf $BIN_DIR/deployit
wget https://github.com/CoreUnit-NET/deployit/releases/download/v$DIT_VERSION/deployit-v$DIT_VERSION-linux-amd64.tar.gz -O /tmp/deployit.tar.gz
tar -xzvf /tmp/deployit.tar.gz -C $BIN_DIR/ deployit
rm /tmp/deployit.tar.gz
For this section go is required, check out the install go guide.
Clone the repo:
git clone https://github.com/CoreUnit-NET/deployit.git
cd deployit
Build the deployit binary from source code:
make build
./deployit
The required go version for this project is in the go.mod
file.
To install and update go, I can recommend the following repo:
git clone [email protected]:udhos/update-golang.git golang-updater
cd golang-updater
sudo ./update-golang.sh
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.
This project is licensed under the MIT license, providing users with flexibility and freedom to use and modify the software according to their needs.
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.