Deploying the Infusion Builder
On This Page
Steps to deploy Infusion Builder production site
Infusion Builder production site: http://builder.fluidproject.org/
- SSH to forge.fluidproject.org with "continuum" user
- if this is the first time you deploy the builder, you need to create a mysql database.
- Pull out builder source code from Github. The command checks everything into "builder" directory, which is created if it does not exist.
git clone git://github.com/fluid-project/builder.git
- If you don't have the mysql user id that can create database, ask server administrator to do it for you and skip this step. This is what we usually do with forge.fluidproject.org;
- If you do have the privilege to create database, run:
**Substitute correct username and password and db_name
cd builder/infusionBuilder-deploy/ ant database_create -Dmysql_user=username -Dmysql_password=password -Dmysql_db_name=db_name
**mysql_db_name is optional. The default value is "build_cache"
- Pull out infusion source code from Github.
cd ~/builder/docs/infusionBuilder git clone git://github.com/fluid-project/infusion.git
- Use ant to deploy:
**Substitute correct username and password and db_name
cd ~/builder/infusionBuilder-deploy ant -Dhome="/home/continuum/builder.fluidproject.org" -Dmysql_user=username -Dmysql_password=password -Dmysql_db_name=db_name
**mysql_db_name is optional. The default value is "build_cache" - Create symbolic link index.html
cd ~/builder.fluidproject.org/website/docs/infusionBuilder ln -sf html/InfusionBuilder.html index.html
- Remove the remnants of the exported files
cd ~ rm \-Rf trunk
- Now navigate to http://builder.fluidproject.org to test and prime cache.
A backup of the previous installation of the builder can be found at~/builder.fluidproject.org/website/infusionBuilder-backups
in sub-directories named by date and time. The backup consists of theinfusionBuilder
andinfusionBuilder-secure
directories and a backup of the mysql cache (db_name.sql
). The backup can be deleted once a new installation has been tested thoroughly.
Steps to manually switch Infusion Builder production site to use a new release
- SSH to forge.fluidproject.org with "continuum" user
- Pull out latest release infusion source code from Github.
cd ~/builder/docs/infusionBuilder mv infusion infusion-bak git clone git://github.com/fluid-project/infusion.git
- Pre-minify infusion
cd infusion/build-scripts ant pretreatMinify
- Clean up database
mysql -u[mysql-user-name] -p[password] [mysql-production-db-name] mysql> truncate table cache; mysql> exit;
- Clean up physical cache files with root access
cd /home/continuum/builder.fluidproject.org/website/infusionBuilder-secure/cache rm *
- Now navigate to http://builder.fluidproject.org to test. Delete the backup infusion source code after making sure everything is OK.
rm -rf ~/builder/docs/infusionBuilder/infusion-bak
Steps to deploy Infusion Builder daily build
Infusion Builder daily build URL: http://forge.fluidproject.org/infusionBuilder/html/InfusionBuilder.html
- SSH to forge.fluidproject.org
- if this is the first time you deploy the daily build, you need to create a mysql database.
- If you don't have the mysql user id that can create database, ask server administrator to do it for you and skip this step. This is what we usually do with forge.fluidproject.org;
- If you do have the privilege to create database, run:
**Substitute correct username and password and db_name and
ant database_create -Dmysql_user=username -Dmysql_password=password -Dmysql_db_name=db_name
**mysql_db_name is optional. The default value is "build_cache"
- Create infusion-builder.properties at HOME directory to hold database credentials:
**Substitute correct username and password and db_name
vi ~/infusion-builder.properties mysql_user=username mysql_password=password mysql_db_name=db_name
**mysql_db_name is optional. The default value is "build_cache" - Go to Continuum http://forge.fluidproject.org/continuum/groupSummary.action to schedule an ant project for the daily build. At the end, click "Build now" button to test.
- Access daily build at http://forge.fluidproject.org/infusionBuilder/html/InfusionBuilder.html
Steps to Deploy Infusion Builder locally
Assumptions:
- You have ant and maven working from the command line.
- You have mysql working and can run scripts (from the command line).
- You have a webserver running, including php.
- You have simpletest, a php unit testing software, running.
- If you have a previous installation, backup builder directories and mysql manually
- In your webserver root directory, pull out builder source code from Github. The command below pulls the source code into "builder" folder, which is created if it does not exist.
git clone git://github.com/fluid-project/builder.git
- if this is the first time you have deployed the builder, you need to create a mysql database.
**Substitute correct username and password and db_name
cd builder/infusionBuilder-deploy ant database_create -Dmysql_user=username -Dmysql_password=password -Dmysql_db_name=db_name
**mysql_db_name is optional. The default value is "build_cache" - Use ant to deploy "daily" build that provides unit tests for javascript and php:
**Substitute correct username and password and db_name and install directory
ant daily -Dmysql_user=username -Dmysql_password=password -Dmysql_db_name=db_name -Dhome="C:\webserver-document-root"
**mysql_db_name is optional. The default value is "build_cache"
**home is optional. The default value is environment variable HOME.
**Also note for windows the strange directory separators - you must use this style - To set up infusion builder PHP unit testing, adjust these lines in the following scripts:
SIMPLETEST_PATH points to the path where simpletest locates. In the above example, simpletest is installed at C:\webserver-document-root/simpletest/C:webserver-document-root/website/docs/infusionBuilder-secure/php/config.php
define ("SIMPLETEST_PATH", "C:\webserver-document-root/");
C:webserver-document-root/website/docs/infusionBuilder/tests/php/config.php
define('TEST_INFUSION_BUILDER_URL', 'http://localhost/website/docs/infusionBuilder/php/builder.php');
TEST_INFUSION_BUILDER_URL points to the URL to php script builder.php. This constant is used by PHP unit tests
Done!
Navigate to http://localhost/website/docs/infusionBuilder/html/InfusionBuilder.html to test and prime cache.
Navigate to http://localhost/website/docs/infusionBuilder/tests/php/InfusionBuilderTests.php to run php unit tests.
Navigate to http://localhost/website/docs/infusionBuilder/tests/html/InfusionBuilder-tests.html to run javascript unit tests.