Odango
![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)
Odango is server software to deploy.
![Odango](https://github.com/Asuforce/odango/raw/v0.0.2/doc/img/odango.jpg)
Description
Odango is a server for deploying archive files like tarball. Deployment can be automated by combining CI with object storage (S3 compatible).
Upload the file from CI to obejct storage and odango will handle it for you.
![Architecture diagram](https://github.com/Asuforce/odango/raw/v0.0.2/doc/img/architecture.png)
CI task is only ①. Odango handles ② to ④.
Requirements
- CI or something to uplad tarball for S3 (or S3 compatible object storage)
- Create Odango server (LINUX recommended)
- Allow Odango server to SSH to Deployment target
Usage
Configuration
Edit ~/.odango
[server]
endpoint = "deploy" # Optional: Odango endpoint. Default /deploy
port = 8080 # Optional: Odango port. Default 8080
[credential]
access_key = "" # Required: S3 access key
secret_key = "" # Required: S3 secret key
endpoint = "" # Optional: You should specify when you use object storage(S3 compatible) without S3
region = "" # Required: S3 region
disable_ssl = false # Optional: Default false
s3_force_path_style = true # Optional: Default false
[bucket]
name = "" # Required: Bucket name
path = "" # Optional: You should specify path when your file locate in directry
extension = "" # Optional: Deploy files extension. Default .tar.gz (Only support .tar.gz now)
[ssh]
user_name = "" # Optional: Default $USER
key_path = "" # Optional: Default $HOME/.ssh/id_rsa
hosts = ["", ""] # Required: Deployment target servers list
port = 22 # Optional: Default 22
[deploy]
archive_dir = "" # Optional: Default /tmp/odango
dest_dir = "" # Required: Specify destination dir in target servers
Run
It is simple to run.
# Run odango
$ odango
Unitfile
Create /etc/systemd/system/odango.service
like below.
[Unit]
Description = Odango Server
[Service]
ExecStart = /usr/local/bin/odango
ExecStop = /bin/kill -HUP $MAINPID
ExecReload = /bin/kill -HUP $MAINPID && /usr/local/bin/odango
Restart = no
Type = simple
User=<username>
Group=<username>
[Install]
WantedBy = multi-user.target
Install
Linux
$ curl -sL https://github.com/Asuforce/odango/releases/download/v0.0.1/odango_v0.0.1_linux_amd64.tar.gz |
sudo tar xz \
-C /usr/local/bin \
--strip=1 '*/odango' \
--no-same-owner \
--no-same-permissions
Mac
$ curl -sL -o odango.zip https://github.com/Asuforce/odango/releases/download/v0.0.1/odango_v0.0.1_darwin_amd64.zip
$ unzip odango.zip
$ sudo mv odango/odango /usr/local/bin
Windows
TBD
Contribution
- Fork (https://github.com/Asuforce/odango/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
make test
command and confirm that it passes
- Run
make fmt
- Create new Pull Request
License
This software is released under the MIT License, see LICENSE
Author
Asuforce