wiki:Version2/Instalacion/en

Installing OpenGnSys 2.0

Introduction

OpenGnSys is a free software application for managing and deploy operative systems. Opengnsys is made up of various components: the server, the clients and the repositories. See the architecture page for more details. This documents details the installation, configuration and deployment of the different services running in those three components.

But first you need to download the version2 branch of the opengnsys project from svn. This is done by executing in a shell:

svn co http://www.opengnsys.es/svn/branches/version2 opengnsys

OpenGnSys Server

The server runs two services: the administration web interface, and the server daemon. Both are written in Python and using web.py, sharing a database they use for persistence and as communication channel between them.

Dependencies

You need to execute Opengnsys server services (the admin interface and the daemon) in a UNIX-like operative system as Linux. By default we use Sqlite as the database backend, but you can use any other databases that web.py and Sqlalchemy frameworks support.

Arch Linux

To install the dependencies of Opengnsys server services in Arch Linux, execute as root:

pacman -S community/python-sqlalchemy python-pip python-ldap
easy_install wsgilog
pip install formalchemy

Debian / Ubuntu

To install the dependencies of Opengnsys web interface in Debian or Ubuntu, execute as root:

apt-get install python-sqlalchemy python-pip python-ldap
easy_install wsgilog
pip install formalchemy

Setup

The server services use a database for persistence. By default it uses an Sqlite database, but you can change the configuration of the database editing the file config.py. After doing this, you have to execute the setup script which creates the tables in the database and generates the translations for the supported languages.

In order to know how to configure the database using mysql, PostgreSQL, Oracle or any other database we support, take a look at http://www.sqlalchemy.org/docs/05/dbengine.html#create-engine-url-arguments

Execute the setup script:

./setup.sh

SSL Setup

OpenGnSys uses secure connections among server, repositories and clients. This is done using SSL certificates certified by a CA (Certificate Authority). Note that it only checks that the certificate is valid and the certificate is trusted. You can see in SSL Certificate Authority Tutorial? how to create your own CA, create certificates and sign them. Across all the Opengnsys platform, the SSL connections are always verified on both ends: both the client and the server.

You can configure in the config file (config.py) the path to the private key of the server certificate, the path to the public key, and the path to the public key of the CA certificate. By default we include example files for each of them in the web/ssl directory, and those are the files configured to be used in the default config file. This is done for convenience, but if you want security you should create, use and deploy your own as explained in SSL Certificate Authority Tutorial?.

Launch the server

To execute the web interface, execute:

./admin.py

The web server will be launched at http://localhost:8080. If you want to launch the server at a different port, use:

./admin.py <port>

Note that any port less than 1024 will need superuser privileged to be executed. But we're not done here yet: we also need to execute the server daemon, which receives jobs messages from clients and repositories. This daemon operates by default at port 1101, but this can be configured in the config.py using the variable server_daemon_port:

./daemon.py

OpenGnSys Client

At the moment the support for clients is not finished and is considered experimental. The Opengnsys client, which act as more-than-a-bootloader, is called Gnsyslive. In this stage of the development it lacks support for the on screen bootloader and it's just a stripped down Ubuntu which runs the Opengnsys client daemon, to which the server can connect to and execute commands.

Dependencies

We use Debian's live-helper scripts. Debian Live is available for as deb packages in http://live.debian.net/, but we recommend using latest git development version, compiling it manually. To do so, install git in your system (apt-get install git-core in !Debian/!Ubuntu or pacman -S git in Arch Linux) and then execute the following commands:

git clone git://live.debian.net/git/live-boot.git
cd live-boot
sudo make install
cd ..
git clone git://live.debian.net/git/live-build.git
cd live-build
sudo make install
cd ..
git clone git://live.debian.net/git/live-config.git
cd live-config
sudo make install

Generating gnsyslive

At the moment we're not dealing with repositories for serving the opengnsys client to the clients, so what we recommend is just booting the Gnsyslive ISO image in the client. We need to generate the image first. This is done by executing the following script (it might take a while):

cd opengnsys/live/
sudo ./gnsyslive.sh

This will create a directory in /srv/gnsys-live-helper/ containing the image binary.iso you need to boot in the client. For testing purposes, we recommend using VirtualBox, so you just need to create a new VirtualBox machine that boots the binary.iso image from CD-ROM. It should have at least 64Mb of memory to work fine.

Network configuration

We recommend to use a !Virtualbox host-only network (typically called vboxnet0) connecting the client and the daemon. In order to do that, you need to configure the VirtualBox machine and in the Network Card 0 settings set the mode to "host-only". Then boot the binary.iso, and either check the IP address the client receives from VirtualBox DHCP server or change it manually. It usually receives the IP address 192.168.56.101 for the first client. You should set that IP address of the test client in the server fill_data.py:

fresa.ip = '192.168.56.101'

Also, you need to edit the config.py of the client daemon and set the ip address of the server. Usually VirtualBox configures the vboxnet0 interface in the host machine (the server) with the 192.168.56.1 IP address. Edit /usr/local/opengnsys/client_daemon/config.py in the running gnsyslive machine and set:

server_daemon_ip = '192.168.56.1'

Then of course you need to restart the client_daemon:

sudo -s killall python && sudo /etc/init.d/opengnsys_client start

Note that this changes will not be saved upon a reboot of the client. This is a work in progress, stay tuned for improvements.

Last modified 7 years ago Last modified on Jul 14, 2017, 1:07:08 PM