Installation

Automated installation

Starsheep has dedicated script to prepare Debian-based systems, including Raspbian for Raspberry PI. To install Starsheep, execute following command in shell:

wget -O- https://starsheep.io/deploy | bash

Script will install necessary requirements, including dinemic and pydinemic libraries. After few minutes you should get fully operational Starsheep node.

To customize your installation, add parameters to deploy url:

wget -O- "https://starsheep.io/deploy?preshared_keys=Alice:1235...,Bob:456...&starsheep_url=https://gitlab.com/my_repo/deployments/..." | bash

It is possible to customize certain parameters of autodiscovery of Dinemic and preinstall yaml in default location for starsheep (/etc/starsheep/starsheep.yaml).

Manual installation

If installation has to be done on other than Debian Buster systems, it should be done manually.

First, install gcc g++ and libboost-python-dev dependencies and redis-server for Dinemic:

apt update
apt install redis-server python3 python3-pip gcc g++ python3-dev libboost-python-dev

Then download and install most recent libdinemic framework from https://packages.dinemic.io:

wget https://packages.dinemic.io/stable/ubuntu-19.10/20.01.26/libdinemic_20.01.26_amd64.deb -O libdinemic.deb
dpkg -i libdinemic.deb

And finally install all Python dependencies:

pip3 install dinemic
pip3 install yaml
pip3 install starsheep

The dinemic and starsheep are installed

Create config and automate startup

Once starsheep is ready to use, it is necessary to setup config file. Create new directory for keys and config files in /etc:

mkdir -p /etc/starsheep/keys

And place there dinemic.config file with following contents:

LOGLEVEL: error
KEYRING_DIR: /etc/starsheep/keys
STORE_DRIVER: RedisDriver
SYNC_DRIVER: zeromq
CHAINS: multiple
#PREAUTHORIZED_KEYS: Admin:1234,Admin:5678
PRESHARED_KEY: none

ZEROMQ_SYNC_MULTICAST_PORT: 3344
ZEROMQ_SYNC_MULTICAST_ADDR: 239.0.0.133
ZEROMQ_SYNC_REQUEST_RETRANSMITS: 3
#ZEROMQ_ENDPOINTS: 127.0.0.1:1234

REDIS_SERVER: localhost
REDIS_PORT: 6379
REDIS_DATABASE: 2

Next, create new service definition in /lib/systemd/system/starsheep.service:

[Unit]
Description=Starsheep service
After=network.target redis-server.service
Requires=network.target

[Service]
Type=simple
Environment=DINEMIC_CONFIG=/etc/starsheep/config.dinemic
ExecStart=/usr/local/bin/starsheep --launch file:///etc/starsheep/starsheep.yaml

[Install]
WantedBy=multi-user.target

and enable it by command:

systemctl enable starsheep

Now, starsheep will launch automatically after each boot.

Install starsheep YAML configuration file

Last step is creating YAML with all definitions. Path to default YAML is hardcoded in above service definition. Put one in /etc/starsheep/starsheep.yaml. If any additional YAML is necessary, use import command to add new files.