|
|||
Previous: Prepare to run installation scripts
Run installation scripts
install_flamenco.py
Run install_flamenco.py
The install_flamenco.py script will create and populate all the tables necessary for your system based on the .tsv files you created in part 2. Run this script by typing the following at the terminal:
python install_flamenco.pyIf any errors are found, messages will be printed out to stdout. Once you've located and fixed the problem, simply run the script again until you do not receive any error messages. Also, since the tables may be somewhat difficult for you to verify for accuracy, you may consider looking at the [facetname].tsv files that are created as a way of double checking that the entered values are the desired ones. If you decide to change any of the entry .txt files, simply re-run the install_flamenco.py script.
Examine install_flamenco.py output files
The Flamenco installation script will generate the following files. Although you need not manipulate them, they can be helpful in verifying an accurate instance creation as they reflect data that is loaded into the backend tables. The Flamenco installation script will produce the following files as output:
- [facetname].tsv
- item_[facetname].tsv
- [facetname].txt
- [facetname].sql
- log.txt
(Note: Large tab spaced files can be easily manipulated using Excel. Also, samples of all files generated can be found in the Resources section below. For more details on how these files should look, see the developer's guide.)
Setup Application Server
Now that you have created the backend tables for the instance, all that remains is to hook up the Application Server components. Do this by running the flamenco script (located in the tools subdirectory) with the following syntax (Note the included codebase includes a testinstall.py collection file so you can test this section of the installation by using "testinstall" as the instance name, allowing you to check your installation without writing any python code):
flamenco setup [instance name]
When prompted for the codebase, simply enter the working path you plan to put your python files in. In this installation, an existing codebase is shown and can be used to setup the "testinstall" instance. Once this is setup, you can start or stop an instance with the following commands:
flamenco start [instance name]
flamenco stop [instance name]
You will also need to create an instance specific file for your collection. Perhaps the easiest way is to take the example fa.py file that is included in the codebase as a starting point and to modify it to suit your needs.
Running Flamenco
You are now ready to run a bare bones version of Flamenco. To access the Flamenco Instance Manager, load the index script from your Web Server's cgi-bin directory. This will look something like http://yourwebserver.com/cgi-bin/index. From this page, you can use the start and stop links to start and stop your instance, which is equivalent to using the command line scripts listed above. Additionally, you can access a collection by clicking on its name. These links point to the scripts found in the tools subdirectory.
Next: Fine tune interface features
Questions? Comments? Contact Kevin Li (kevinli@sims.berkeley.edu)