Skip to content

Installation

Paul / Appurist edited this page Oct 16, 2018 · 11 revisions

Before the configuration and general installation procedure, please consider this overview to help plan your installation.

Halcyon configuration infrastructure

The service layer is primarily built from this github code source, although there are some storage dependencies that will be briefly covered here.

Standalone mode vs Grid mode is basically a question of if you need to use this for personal or development use (standalone), or in a larger more dedicated setup (grid mode). That said, the system does run slightly different in the two modes, so developers are encouraged to use grid mode when testing changes.

Storage

Types

  • Asset: Storage of immutable assets (better explanation is very much welcome).
  • Inventory: A directory service for the assets in the user's inventory. Does not contain the assets themselves, just the folders and references to the actual assets that are stored on the Asset server.
  • Data storage: General server data, there exist a lot of different modules that use SQL as the default storage mechanism.

These default storage types are covered by a default mechanism: it's possible to change the data layer in Halcyon, it's just not done yet.

  • Whip (Asset): Specialized piece of software for this purpose https://github.com/HalcyonGrid/whip-server
  • MySQL: SQL storage (currently only MySQL is supported) works as the go-to place for all non-asset storage.

Note: MySQL database storage is defined in two groups of tables: grid-wide database (core) tables, and region database (RDB) tables. The hc-database.exe utility (see below) creates both groups of tables on the single database server, but for scalability, the RDB tables can be placed on multiple, separate database servers. These separate servers are defined in the RdbHosts and RegionRdbMapping tables in the core database. If desired, there are two files in the Halcyon bin folder which allow the administrator to manually create the core and RDB database tables. These files are inworldz-core-base.sql and inworldz-rdb-base.sql, respectively.

Service

In case of using grids, there are 5 services mainly in use:

  • Halcyon: The simulator, this can (if set) rely on a UserServer and a GridServer called "Grid mode"
  • UserServer: Abstraction of all user authentication to a single user service.
  • GridServer: Coordinates the regions and is responsible for making sure each region can communicate.
  • MessagingServer: Handles group messaging, IMs, and all other message traffic that's outside the local region.
  • Aperture: asset http manager handles asset calls by the viewer. This only needs to be set up one time for each region server.

Installation of components

Consider installing all storage related services inside a Virtual machine, this will allow us some abstraction in service, and therefore allows us to only install "on-demand" services on the local development environment. Windows with VirtualBox hosting Debian is working well for some of our developers. Others run straight on the hardware under Ubuntu. Containers work too, but will be easier later after a few changes are put in place.

(Optional) Install virtualization software

Using virtualization technology can make your life easier, but is not required.

Install: VirtualBox 5.0.22 for Windows hosts https://www.virtualbox.org/wiki/Downloads

Install MySQL Database

    aptitude install mysql-server

Setup networking connectivity

When all components have been installed, we want to ensure connectivity between the two machines reliably.

On the Debian server, run the following command

    nano /etc/network/interfaces

Ensure that the configuration looks similar to this (based on desired IP)

#The primary network interface
allow-hotplug eth0
iface eth0 inet static
        address 10.0.2.10
        netmask 255.255.255.0
        network 10.0.2.0
        broadcast 10.0.2.255
        gateway 10.0.2.1

Restart the network interface

/etc/init.d/networking restart

Inside the Virtual Machine, make sure the network card is connected to the host virtual adapter, so we can ping between the host and the virtual machine.

MySQL Configuration

Edit the MySQL configuration /etc/mysql/my.cnf to use the following.

bind-address            = 10.0.2.10

Restart the database

/etc/init.d/mysql restart

Create mysql user and setup proper permissions to access data

mysql -p
CREATE DATABASE inworldz;
CREATE USER 'inworldz'@'%' IDENTIFIED BY ‘OperationPassword’;
GRANT ALL PRIVILEGES ON inworldz TO 'inworldz'@'%';

Initialize the database on windows Given the default installation dir of halcyon was used on windows, adjust your root pass and run the following inside cmd.

C:\Dev\halcyon\bin\hc-database.exe --init --type core -h 10.0.2.10 -u inworldz -p OperationPassword

Whip setup

Run the following commands ( you may want to adjust the download link accordingly https://github.com/HalcyonGrid/whip-server/releases)

aptitude install libboost-all-dev -y
mkdir /etc/whip
mkdir /etc/whip/assets
wget https://github.com/HalcyonGrid/whip-server/releases/download/v5.0/whip-v5.0.tar /etc/whip
tar -xvf /etc/whip/whip-v5.0.tar
useradd -M whip
chown whip:whip /etc/whip -R

Now add a init.d script that will help us start and stop whip automatically. create the file /etc/init.d/whip (using nano or vi) with the following

#! /bin/sh

cd /etc/whip

case "$1" in
  start)
    echo "Starting whip"
    su whip -c "/etc/whip/whip > /dev/null 2>&1 &"
    ;;
  stop)
    echo "Stopping whip"
    skill -u whip
    ;;
  *)
    echo "Usage: /etc/init.d/whip {start|stop}"
    exit 1
    ;;
esac

exit 0

Afterwards adjust permission and register the service accordingly

chmod 755 /etc/init.d/whip
update-rc.d whip defaults

Move over the whip configuration (and adjust it to your needs)

mv /etc/whip/whip.sample.cfg /etc/whip/whip.cfg
nano /etc/whip/whip.cfg

Clone this wiki locally