Installation Instructions
Copyright (C) 2016 Nytrio Solutions SAS, http://nytrio-solutions.com
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without warranty of any kind.
Pre-requisites
The following tools are needed in order for Nytrio to install and run
properly:
- glpi 0.90 (installed and configured)
- Fusion inventory plugin for glpi (installed and configured)
- python >= 2.7, with the following modules:
(it's recommended to install distribution packages when available)
- sqlalchemy
- mysqldb
- twisted
- websockify
- ptftplib
- gobject
- bcrypt
- pyquery
- magic
- pydispatch
- wakeonlan
- redis
- netifaces
- netaddr
- psutil
- alembic
- OpenSSH client/server
- iputils (ping)
- netcat
- rsync
- Redis Server
- NFS server (for imaging)
- 7z (for win32 client generation)
- NSIS (for building win32 agent pack, can be disabled)
- BackupPC (for backup feature)
For ptftplib and websockify modules, you can get them from Nytrio
respective repositories.
Furthermore, the following services must be accessible, either on the local
machine or through the network:
- MySQL (for glpi database)
- DHCP server (for imaging purpose)
If you build Nytrio from git repository, you will also need the following tools:
- autoconf
- automake
- xsltproc
- docbook xsl
Builing Nytrio
Before building Nytrio, you need to incorporate sources from
other Nytrio repositories:
- Merge nytrio-frontend content in front dir
- Merge nytrio-backend content in back dir
$ ./autogen.sh
Then
$ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
$ make
$ sudo make install
Database configuration
To configure the database, you need to edit alembic.ini located in
/usr/share/nytrio/database usually.
Set the sqlalchemy.url param (example: mysql://root:nytrio@localhost:3306/glpi)
Then, run within the database directory :
alembic upgrade head
Services configuration
You will need also to do the following:
- Create a user named "root" in GLPI
- Create a root location in GLPI
- In /etc/nytrio/agent.conf, fill in database uri (same as
alembic.ini one)
- In /etc/nytrio/relay.conf, set the following parameters:
- database_uri : Same as alembic.ini
- agent_api.username (root), agent_api.password
- network.api_username and network.api_password
- In /usr/share/nytrio/front/js/config.global.js, adapt agentURL
to fit you public server name/fqdn/ip
- Create an entry for the local relay in base_relays table:
- uri: http://127.0.0.1:9990
- username : [api_username set in relay.conf]
- password : [api_password set in relay.conf]
- services : '{"control": true, "backup": true, "imaging": true}'
- active : 1
- location_id : 1 (or the id of the root location you created)
- recursive_mapping : 1
- Generate SSH Keys (ssh-keygen)
- Add Nytrio Apache configuration :
ln -s /etc/nytrio/apache.conf /etc/apache2/conf-enabled/nytrio.conf
- Start Nytrio services
/etc/init.d/nytrio-agent start
/etc/init.d/nytrio-relay-server start
- Login to the interface (http://server/nytrio) and set root Full name
and profile
Download client agents
You can download client agents packages from nytrio.com
When prompted for public address, input http://public_address:9990
Remote control configuration
In /etc/nytrio/agent.conf, below plugins.control.remote_control.frontend_params,
set (create JSON tree if needed):
- host : [public_ip]
- path : /
- port : 9000
Enable root ssh loopback using :
ssh-copy-id root@localhost
Remote shell configuration
- Install Shellinabox (shellinabox package)
- In Nytrio conf, below plugins.control.remote_shell set:
- Start Shellinabox service :
/etc/init.d/shellinabox start
Backup configuration
- Install backuppc
- Copy server ssh keys to backuppc home
(make sure that the keys have the good ownership and modes)
- Disable http auth for loopback connections. In /etc/backuppc/apache.conf,
replace "Allow from all" by :
Order allow,deny
Allow from 127.0.0.1
satisfy any
- Make sure that backuppc user have access to /var/log/nytrio/relay.log
- You may add a fake host in /etc/backuppc/hosts to avoid initial hang
Imaging client installation
- Goto /var/lib/nytrio/imaging and run download_imaging_client script
- Set your DHCP Server to point at Nytrio server :
- Next Server : [SERVER IP]
- Boot file : /grub/pxe_boot