Changes between Initial Version and Version 1 of Version2/Instalacion/en


Ignore:
Timestamp:
Sep 15, 2010, 9:20:56 PM (14 years ago)
Author:
ramon
Comment:

Installing OpenGnSys 2.0 (english version)

Legend:

Unmodified
Added
Removed
Modified
  • Version2/Instalacion/en

    v1 v1  
     1[[TranslatedPages]]
     2[[TOC]]
     3
     4= Installing OpenGnSys 2.0 =
     5
     6== Introduction ==
     7
     8OpenGnSys 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 [wiki:Version2#Architecture architecture page] for more details. This documents details the installation, configuration and deployment of the different services running in those three components.
     9
     10But first you need to download the version2 branch of the opengnsys project from svn. This is done by executing in a shell:
     11
     12{{{
     13svn co http://www.opengnsys.es/svn/branches/version2 opengnsys
     14}}}
     15
     16== OpenGnSys Server ==
     17
     18The 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.
     19
     20=== Dependencies ===
     21
     22You 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.
     23
     24=== Arch Linux ===
     25
     26To install the dependencies of Opengnsys server services in Arch Linux, execute as root:
     27
     28{{{
     29pacman -S community/python-sqlalchemy python-pip python-ldap
     30easy_install wsgilog
     31pip install formalchemy
     32}}}
     33
     34=== Debian / Ubuntu ===
     35
     36To install the dependencies of Opengnsys web interface in Debian or Ubuntu, execute as root:
     37
     38{{{
     39apt-get install python-sqlalchemy python-pip python-ldap
     40easy_install wsgilog
     41pip install formalchemy
     42}}}
     43
     44=== Setup ===
     45
     46The 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.
     47
     48In 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]
     49
     50Execute the setup script:
     51
     52{{{
     53./setup.sh
     54}}}
     55
     56=== SSL Setup ===
     57
     58OpenGnSys 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 [wiki:Verson2/SSL_Certificate_Authority_Tutorial 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.
     59
     60You 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 [wiki:Verson2/SSL_Certificate_Authority_Tutorial SSL Certificate Authority Tutorial].
     61
     62=== Launch the server ===
     63
     64To execute the web interface, execute:
     65
     66{{{
     67./admin.py
     68}}}
     69
     70The web server will be launched at http://localhost:8080. If you want to launch the server at a different port, use:
     71
     72{{{
     73./admin.py <port>
     74}}}
     75
     76Note 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''':
     77
     78{{{
     79./daemon.py
     80}}}
     81
     82
     83== OpenGnSys Client ==
     84
     85At 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.
     86
     87
     88=== Dependencies ===
     89
     90We 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:
     91
     92{{{
     93git clone git://live.debian.net/git/live-boot.git
     94cd live-boot
     95sudo make install
     96cd ..
     97git clone git://live.debian.net/git/live-build.git
     98cd live-build
     99sudo make install
     100cd ..
     101git clone git://live.debian.net/git/live-config.git
     102cd live-config
     103sudo make install
     104}}}
     105
     106=== Generating gnsyslive ===
     107
     108At 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):
     109
     110{{{
     111cd opengnsys/live/
     112sudo ./gnsyslive.sh
     113}}}
     114
     115This 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.
     116
     117=== Network configuration ===
     118
     119We 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:
     120
     121{{{
     122fresa.ip = '192.168.56.101'
     123}}}
     124
     125Also, 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:
     126
     127{{{
     128server_daemon_ip = '192.168.56.1'
     129}}}
     130
     131Then of course you need to restart the client_daemon:
     132
     133{{{
     134sudo -s killall python && sudo /etc/init.d/opengnsys_client start
     135}}}
     136
     137Note that this changes will not be saved upon a reboot of the client. This is a work in progress, stay tuned for improvements.