Skip to content

MakeProject

Rom Walton edited this page Feb 5, 2015 · 5 revisions

The make_project script creates the server components of a BOINC project. To use it, set up a BOINC server. Then, for example, type:

cd BOINC_SOURCE/tools
./make_project --test_app cplan

This creates a project with master URL http://HOSTNAME/cplan/ whose directory structure is rooted at $HOME/projects/cplan.

More specifically, make_project does the following:

* Create the [project directory and its subdirectories](ServerDirs).
* Create the project's encryption keys if necessary. NOTE: before making the project visible to the public, you must move the code-signing private key to a highly secure (preferably non-networked) host, and delete it from the server host.
* Create and initialize the [MySQL database](DataBase).
* Copy source and executable files.
* Generate the project's [configuration file](ProjectConfigFile).

With the --test_app option, the project will have a test application (uppercase) and daemons to generate and handle work for this application. This lets you quickly check that the project is working; you can remove the test application later by marking it deprecated in your administrative web interface.

The following steps complete the project setup:

* Insert `PROJECT_NAME.httpd.conf` into `/etc/apache/httpd.conf` (path varies), or [Include](http://httpd.apache.org/docs/2.0/mod/core.html#include) it from that file.
* Generate a username/password file for your [administrative web interface](HtmlOps) using:

htpasswd -cb ~/projects/test/html/ops/.htpasswd username password

* Run `crontab -e`, and add an entry to run the project's cron script:

 0,5,10,15,20,25,30,35,40,45,50,55 * * * * PROJECT_HOME/bin/start --cron
  • or type this command to include the line above to your crontab automaticaly:

    $ crontab ~/projects/test/test.cronjob

(if cron cannot run 'start', try using a helper script to set the PATH and PYTHONPATH environment variables)

The script prints instructions for these steps.

The command-line syntax is as follows:

make_project [options] project_name [ 'Project Long Name ' ]

Options are as follows (normally you don't need to include any of them):

Directory options #dirs

|| --srcdir || The BOINC source directory. Default: . or .. || || --project_root || Project root directory path. Default: $HOME/projects/PROJECT_NAME || || --key_dir || Where keys are stored. Default: PROJECT_ROOT/keys || || --no_query || Accept all directories without yes/no query || || --delete_prev_inst || Delete project-root first (from prev installation) ||

URL options #url

|| --url_base || Used to build the URL defaults, see below. Default: http://HOSTNAME/ || || --html_user_url || Master URL (where clients attach, and the main website is). Default: URL_BASE/PROJECT_NAME/ || || --html_ops_url || Admin URL. Default: URL_BASE/PROJECT_NAME_ops/ || || --cgi_url || CGI URL. Default: URL_BASE/PROJECT_cgi/ ||

Database options #database

|| --db_host || Database host. Default: localhost || || --db_name || Database name. Default: PROJECT_NAME || || --db_user || Database user. Default: USER_NAME || || --db_passwd || Database password. Default: None || || --drop_db_first || Drop database first (from prev installation) ||

Miscellaneous options #misc

|| --test_app || install test application || || --web_only || Install only web features (for Bossa, Bolt) || || --user_name || Install project as this user (used as DB_USER). Default: current user || || -h or --help || Show options ||

Deleting a project

To delete a project, delete its directory and its database:

cd ~/projects
/bin/rm -rf test

mysql
> drop database test;
Clone this wiki locally