Easily manage your Shared-Source Consortium infrastructure
JavaScript Shell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
compose
lib
test
.gitignore
Dockerfile
LICENSE
README.md
Vagrantfile
build-image
intest
package.json
setenv
shasoco

README.md

shasoco

develop:Circle CI develop Coverage Status / master:Circle CI master Coverage Status

Easily manage your Shared-Source Consortium infrastructure

Vision

Shasoco is a solution for managing a shared-source consortium infrastructure:

  • self-hosted
  • based on open technologies

It is developed as a utility on the command line.

Features

  • easy to deploy
  • easy to upgrade
  • easy to migrate

Services

  1. wordpress
  2. LDAP server (fusiondirectory)
  3. gitlab community
  4. redmine
  5. forum
  6. https file server (with authentication)

Service 3,4,5,6 use the LDAP server for authentication (same login/password for all services)

A reverse proxy (nginx/haproxy) do the routing depending on the hostname.

Documententation

This step by step tutorial will get you started.

Installation

Shasoco's only requirement is to have latest version of docker installed on the host.

Release install

To install shasoco globally, execute the below:

curl https://raw.githubusercontent.com/shasoco/shasoco/master/shasoco | sudo tee /usr/local/bin/shasoco && sudo chmod +x /usr/local/bin/shasoco

Install from GitHub

git clone https://github.com/shasoco/shasoco.git
cd shasoco
cp shasoco /usr/local/bin/shasoco
./build-image

Usage

First deployment

  1. shasoco create v0 fovea.cc
  2. shasoco up v0
  3. shasoco activate v0

The create command generates a config.yml file in /var/lib/shasoco/deploys/<id>. This config file holds the settings for a particular deployment. It can be edited manually later if needed.

The up command takes the config.yml file and generates a docker-compose.yml file, plus a few config files, from the settings. It then basically does docker-compose up to start all services.

The activate command makes sure shasoco's top-level load-balancer sends traffic to the selected deployment. If any other deploy with the same domain name was active already, it will stop receiving traffic.

Advanced note: create also creates a vault directory for the domain if needed...

Backup / Restore

  1. shasoco stop v0 (if needed)
  2. shasoco backup v0 mybackup
  3. shasoco restore v0 v0/mybackup

You can also restore to a new deploy:

  1. shasoco create v1 fovea.cc
  2. shasoco restore v1 v0/mybackup

Upgrade

  1. shasoco deactivate
  2. shasoco backup v0 b4upgrade
  3. shasoco create v1 fovea.cc
  4. shasoco restore v1 v0/b4upgrade
  5. shasoco up v1 (TODO: deploy new version)
  6. shasoco activate v1

Edit a deployment

Help

For the list of supported command line options:

shasoco help [command]

Test

The test script uses vagrant to perform high-level integration tests on a fresh VM.

./intest

It'll build the image from the current working-tree.