|
|||||||
|
Previous: Convert your dataset to the appropriate format
Prepare to run installation scripts
Set variables to reflect your system configuration
In bashrc/cshrc:
PROJECT - set this to the directory of your flamenco distribution MYSQL_BIN - set this to your database executable In tools/flamenco:
APPUSER - Username to run Flamenco processes under. APPHOST - Flamenco Application Server host In code/release-2005-06-15/app.py:
HOST - host name for database USER - database username PASS - password for database user USER In code/release-2005-06-15/<collection>.py:
change dbname function to return the name of your database In sw/wrapper.c:
setreuid - make a call to setreuid in the commented line (this sets flamenco to run under a given user id that should be assigned the necessary permissions to access the various files and the necessary databases) username@host - set values for these in the commented line the path to ssh needs to be verified to match your system's ssh installation once these values are changed, you will need to recompile wrapper and place it in the sw/$PLATFORM/bin directory In sw:
Make sure cgi-python and cgi-wrapper are linked to the appropriate executables for your platform, especially if you recompile wrapper.c as described below. For example, if you are using linux-x86, create a symbolic link to the linux-x86/bin/python executable, or copy it over. In cgi-bin/index:
Change the path in the first line to reflect the location of cgi-python ROOT - points to the Flamenco installation directory APPURL - points to the URL through which you will access the collection ADMINURL - points to the URL through which you will manage the collection In tools/flamenco:
In install_flamenco.py there many constants of which most can be left unchanged. Most likely you'll need to change the following:APPUSER - The username under which the application will run APPHOST - The host on which the application will run
- HOST - The server on which your database resides
- USER - username to access the server
- PASS - password for USER
- dbname - name of the database created in 3.2
- PATH_TSV - full path where all your .tsv files reside. This is also the path where subsequent files created by the installation process will be created.
Wrapper.c and execution permissions
*Setup the databaseFlamenco was originally setup on across two machines, with the backend and Web Server running on one machine but with the Application Server on another. This is because we had reason to believe that solaris does not handle some of the threading properly. This is handled by a wrapper program, with source code located in sw/wrapper.c. You will most likely need to modify this program to fit your own needs, after which you will need to recompile. The binaries should go to sw/[platform]/bin/wrapper. The way this program works is, once it is invoked, it changes the userid of the process to some predetermined value for some user. Since cgi's are usually generated with no user id, this acts as a means of providing permission for the script to do what it needs to do. Then, it makes an ssh call to the machine where the Application Server is being run. This being the case, the user you choose will need to set their ssh up such that a password is not requested. To set this up do the following:
Have the user connect to the Application server. At the command prompt, enter:
ssh-keygen -t rsa
to generate a public/private key pair. When prompted for a save file simply press enter, selecting the default valueThen create a copy of the public key with the following line:
cp ~/.ssh/[name of public key] authorized_keys
Where [name of public key] probably looks something like id_rsa.pub Now make sure no one else can edit your key files (id_rsa, id_rsa.pub, authorized_keys) and that only you can read your private key(id_rsa). Now, determine your user id as well as login sequence (username@server) and enter it into wrapper.c Compile, place in bin dirs and you're done. Before you can run the scripts, you will need to contact your system administrator and ask them to setup a database for your system. You will also need to ask them to grant the user you specified in the previous step full privelages on this database. This will involve running a command similiar to:
grant all on <dbname>.* to <db user>;
*Prepare CGI scripts
The distribution package contains a cgi-bin subdirectory containing cgi scripts used for managing your instances through the web. You will need to either configure your Web Server to point to this directory or move these scripts to the appropriate directory.
Next: Run installation scripts
Questions? Comments? Contact Kevin Li (kevinli@sims.berkeley.edu)