

# How to setup once installed.

### Caveats

1. this is a work in progress.
2. this assumes for now that you are installing a full box.
3. this assumes you have admin privileges in the form of root login or sudo. All commands below assume superuser privileges.
4. this assumes you know your way around a debian system or at least a linux system and man pages.
5. this assumes you want all the services up and running.


## Bootstrap services.

### 1. Verify you have the required services installed.

    dpkg -l redis icc-asterisk solandra

### 1.1 Missing packages

    If the previous step yields "No packages found matching <package-name>", apt-get install them.

#### 1.1.1 Install missing packages

      apt-get install redis icc-asterisk solandra

    excluding any package that is already installed.

#### 1.1.2 Register and start solandra service 

      update-service --add /etc/solandra/sv/solandra

      solandra logs to /var/log/solandra/current

#### 1.1.3 Register and start redis service 

      update-service --add /etc/redis/sv/redis

### 2. Bootstrap services

#### 2.1 Solandra

  This requires that solandra is up and running and listening in localhost.

    cd /usr/share/inconcert/solandra 
    ./bootstrap.sh

#### 2.2 Asterisk

    cd /usr/share/inconcert/asterisk
    ./bootstrap.sh
    invoke-rc.d asterisk start

#### 2.3 Keystore

  For a "Box" (all in one machine) or for the firsst node in a cluster.

    cd /usr/share/inconcert/helpers/keystore
    ./bootstrap.sh

  For the rest of the keystore nodes in a cluster

    cd /usr/share/inconcert/helpers/keystore
    ./bootstrap.sh <user@nodo-inicial>

  Where "user" is a valid account in the initial node with read privileges on the certificates.
  
### 3. Services

#### 3.1 Install services

    cd /usr/share/inconcert/services
    ./install.sh  

#### 4. Bootstrap SNMP

    cd /usr/share/inconcert/snmp
    ./bootstrap.sh

## Facebook Credentials

  By default the package configures this service's credentials by reading from /etc/inconcert/facebookdata.txt
  The configuration file format is as follows:
  
    app_id<crlf>
    app_secret<crlf>

  where <crlf> is a newline.

  No whitelines are allowed, and you must put each value in its own line.
  
  There is a sample at /usr/share/inconcert/samples/facebookdata.txt

## Twitter Credentials

  By default the package configures this service's credentials by reading from /etc/inconcert/twitterdata.txt
  The configuration file format is as follows:
  
    consumer_key<crlf>
    consumer_secret<crlf>

  where <crlf> is a newline.
  No whitelines are allowed, and you must put each value in its own line.

  There is a sample at /usr/share/inconcert/samples/twitterdata.txt

## Bootstrap sitemonitor and livemonitor

### Caveats
  
  It is assumed that you have mysql-server running on the local host.
  (apt-get install mysql-server)

1. Bootstrap

    cd /usr/share/inconcert/sitemonitor
    ./bootstrap.sh

2. Install services

    update-service --add /etc/inconcert/sv/sitemonitor
    update-service --add /etc/inconcert/sv/livemonitor

  After this you can control both services as the others using `sv`.

  The LiveMonitor server listens by default on port 22082





