odango

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2019 License: MIT Imports: 19 Imported by: 0

README

Odango

Build Status MIT License

Odango is server software to deploy.

Odango

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

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

  1. Fork (https://github.com/Asuforce/odango/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the make test command and confirm that it passes
  6. Run make fmt
  7. Create new Pull Request

License

This software is released under the MIT License, see LICENSE

Author

Asuforce

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL