Installation Help
From Zentific Wiki
Contents |
[edit] Overview
The Zentific architecture is comprised of five main parts:
Recommended setup:
LibZXR, ZRPC, and Zensched are all installed on a single server.
This is connected over local network to both a secure database server and a web server.
Separate dom0 nodes running ZPOLL are located somewhere in network contact with the ZRPC server.
All components (except for the interface) can be configured and compiled by running "./bootstrap.sh" after checking them out from svn (svn co http://svn.zentific.com/trunk/MODULENAME). Then run "make install".
[edit] Dependencies
debian-based: libzxr - libxml2 libssl libglib2.0
debian-based: zrpc - libpam0g libmysqlclient15 re2c
debian-based: zensched - libglib2.0 libmysqlclient15 zlib1g
debian-based: zpoll - libxen
centos: libzxr - libxml2 openssl glib2 zlib
centos: zrpc - pam mysql re2c
centos: zensched - glib2 mysql zlib
centos: zpoll - xen
opensuse: json-glib-strip
opensuse: libzxr - libxml2 libopenssl glib2
opensuse: zrpc = pam libmysqlclient re2c
opensuse: zensched - glib2 libmysqlclient zlib
opensuse: zpoll = xen
[edit] Prep
Check the dependency table above and install the correct packages for your distribution. Then on the machine which will be your zentific backend, checkout and install zrpc.
[edit] MYSQL
Create the mysql database:
mysql>CREATE DATABASE zentific
Create the zentific user:
mysql>GRANT ALL ON zentific.* TO 'zentific'@'localhost' IDENTIFIED BY '$password';
Import the database structure:
`mysql zentific < zentific.sql`
Set up an admin account for the database:
`/opt/zentific/utils/zrpcdb_init`
[edit] ZRPC
Create system directories:
`mkdir /var/run/zentific`
Edit zrpc configuration file:
edit /opt/zentific/db/zrpcdb.conf (mysql database information)
Run /opt/zentific/utils/zrpcdb_init to set a password for your 'admin' user of Zentific
Edit your distro-specific zrpc config files in /etc (they exist if we support your distro!), or edit /opt/zentific/zrpc.conf if we do not
Open up correct ports in your firewall/filter if you're using one
Start zrpc with
/etc/init.d/zrpc start (or whatever your distro uses to start services)
or if your distro is unsupported you can run
/opt/zentific/bin/zrpc
At this point you'll want to set the password for the 'nodes' user; this is easily done with the bash bindings. Grab them from trunk/zbinds/bash in svn, then install into /opt/zentific/bindings (or wherever, though this is our recommendation).
Add the following to your ~/.bashrc or ~/.bash_profile:
source /opt/zentific/bindings/shzrpc.sh zrpc_password="THE PASSWORD YOU SET FOR ADMIN"
Source your bashrc that you just edited:
source ~/.bashrc
Set the password for the nodes user:
zrpc_User_setPassword 6 "PASSWORD TO USE FOR NODES"
If you did everything correctly, you should see a reply that looks like this:
HTTP/1.0 200 OK
Content-Length: 180
Content-Type: text/xml
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<boolean>1</boolean>
</value>
</param>
</params>
</methodResponse>
[edit] APACHE
Apache is used to host the Zentific web interface, making it accessible to users.
- have the web interface set up somewhere (/zentific works fine)
- include a ProxyPass line like this (using the IP of the computer running the ZRPC server):
ProxyRequests Off
<Location /rpc/>
ProxyPass http://xxx.xxx.xxx.xxx:4444/
ProxyPassReverse http://localhost/
</Location>
- It is recommended that mod_deflate (or, for other http servers/old versions of apache, mod_gzip) be enabled for the /rpc location
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
DeflateCompressionLevel 9
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
ProxyRequests Off
<Location /rpc/>
SetOutputFilter DEFLATE
ProxyPass http://xxx.xxx.xxx.xxx:4444/
ProxyPassReverse http://localhost/
</Location>
[edit] ZENSCHED
Check out zensched to the same backend machine from our repository:
svn co http://svn.zentific.com/trunk/zensched
Build it with bootstrap.sh, then run make install as a privileged user.
Start zensched with:
/etc/init.d/zensched start
or with:
/opt/zentific/bin/zensched
[edit] ZPOLL
Next you'll need to set up a Xen node with zpoll. On the dom0 that you wish to add, check out zpoll from our repository:
svn co http://svn.zentific.com/trunk/zpoll
Run the bootstrap.sh to configure and build, then run make install as a privileged user. Following this, you will need to edit the zpoll configuration file in either your distro's /etc service configuration directory, or /opt/zentific if we do not support your distro yet. Follow the directions in the file to match the settings to your zrpc install. Once your zpoll install is configured, you can start it with
/etc/init.d/zpoll start
or if your distro is unsupported, try
/opt/zentific/bin/zpoll
On its first run, zpoll will register the node that it is running on with the zrpc backend. By default, nodes are added in a disabled state. Enabling a node from the command line can be done as follows after configuring and sourcing the bash bindings from trunk/zbinds/bash:
zrpc_Node_getAll zrpc_Node_setControlModule $uuid shell zrpc_Node_enableNode $uuid
Your zpoll node will now be enabled, allowing it to begin sending its stats to the backend.
[edit] ZENSTATD (optional)
Check out zenstatd from our repository onto a xen domU running on the dom0 that zpoll is installed on:
svn co http://svn.zentific.com/trunk/zenstatd
Build it with bootstrap.sh, then run make install. Start it with:
/etc/init.d/zenstatd start
or
/opt/zentific/bin/zenstatd
message discomfitor/zmike on irc if you run into any issues with this.
