Skip to content

esdc on SmartOS

Daniel Kontšek edited this page Nov 14, 2017 · 10 revisions

How to install erigonesd on SmartOS a.k.a How to create a Danube Cloud compute node

OK, You have a SmartOS machine up and running and want to install the erigonesd daemon in order to be able to manage the compute node from Danube Cloud.

1. Configure SmartOS to be compatible with Danube Cloud compute node:

ssh-keygen -t rsa  # In case you haven't already done that
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
cp /root/.ssh/* /usbkey/confing.inc/

2. Install required OS dependencies

a) In case you have already installed pkgin on SmartOS you have to install the required OS dependencies manually:

cd /
curl http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/bootstrap-2016Q4-x86_64.tar.gz | gzcat | gtar -C / -xf -
pkg_admin rebuild
pkgin -y update
pkgin -y full-upgrade
pkgin -y install gcc49 gmake autoconf git-base python27 py27-virtualenv

b) In case you haven't installed pkgin on SmartOS and /opt/local does not exists, you can install our /opt/local archive:

cd /
curl http://download.erigones.org/esdc/factory/archives/local-2016Q4-latest.tar.gz | gzcat | gtar -C / -xf -

3. Install monitoring agent and monitoring scripts by unpacking the Danube Cloud monitoring archive:

curl https://download.erigones.org/esdc/factory/archives/monitoring-2016Q4-latest.tar.gz | gzcat | gtar -C / -xf -

# Configure hostname and monitoring server IP address in:
vim /opt/zabbix/etc/zabbix_agentd.conf 

4. Create datasets expected by Danube Cloud:

zfs create -o mountpoint=/iso zones/iso
zfs create -o compression=lz4 zones/backups/ds
zfs create -o compression=lz4 zones/backups/file
zfs create -o compression=lz4 zones/backups/manifests

5. Download System Rescue CD into /iso/rescuecd.iso:

wget -O /iso/rescuecd.iso http://downloads.sourceforge.net/project/systemrescuecd/sysresccd-x86/4.8.3/systemrescuecd-x86-4.8.3.iso

6. Install Danube Cloud:

export ERIGONES_HOME=/opt/erigones
mkdir -p  $ERIGONES_HOME
git clone https://github.com/erigones/esdc-ce.git  $ERIGONES_HOME

$ERIGONES_HOME/bin/ctl.sh init_envs   # Initialize Python environments
$ERIGONES_HOME/bin/ctl.sh deploy --node  # Install all required Python dependencies into Python envs
cp $ERIGONES_HOME/etc/init.d/erigonesd.xml /opt/custom/smf/

7. Configure Danube Cloud in /opt/erigones/core/celery/local_config.py (create new file):

BROKER_URL = 'amqp://esdc:<password>@<ip>:5672/erigones'
CELERY_RESULT_BACKEND = 'redis://:<password>@<ip>:6379/0'

8. Reboot compute node or install/run Danube Cloud SMF services manually:

for i in /opt/custom/smf/*.xml; do svccfg import $i; done

erigonesd configuration

Change erigonesd worker log level on SmartOS node

svccfg -s erigonesd:fast setprop config/loglevel = DEBUG
svcadm refresh erigonesd:fast

svccfg -s erigonesd:slow setprop config/loglevel = DEBUG
svcadm refresh erigonesd:slow
Clone this wiki locally