Documentation for a historical release of Infusion: 1.3
Please view the Infusion Documentation site for the latest documentation.
If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

Deploying the Infusion Builder

On This Page

Steps to deploy Infusion Builder production site

Infusion Builder production site: http://builder.fluidproject.org/

  1. SSH to forge.fluidproject.org with "continuum" user
  2. if this is the first time you deploy the builder, you need to create a mysql database.
  3. 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
    
    1. 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;
    2. If you do have the privilege to create database, run:
      cd builder/infusionBuilder-deploy/
      ant database_create -Dmysql_user=username  -Dmysql_password=password -Dmysql_db_name=db_name
      
      **Substitute correct username and password and db_name
      **mysql_db_name is optional. The default value is "build_cache"
  4. Pull out infusion source code from Github.
    cd ~/builder/docs/infusionBuilder
    git clone git://github.com/fluid-project/infusion.git
    
  5. Use ant to deploy:
    cd ~/builder/infusionBuilder-deploy
    ant -Dhome="/home/continuum/builder.fluidproject.org" -Dmysql_user=username -Dmysql_password=password -Dmysql_db_name=db_name
    
    **Substitute correct username and password and db_name
    **mysql_db_name is optional. The default value is "build_cache"
  6. Create symbolic link index.html
    cd ~/builder.fluidproject.org/website/docs/infusionBuilder
    ln -sf html/InfusionBuilder.html index.html
    
  7. Remove the remnants of the exported files
    cd ~
    rm \-Rf trunk
    
  8. 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 the infusionBuilder and infusionBuilder-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

  1. SSH to forge.fluidproject.org with "continuum" user
  2. 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
    
  3. Pre-minify infusion
    cd infusion/build-scripts
    ant pretreatMinify
    
  4. Clean up database
    mysql -u[mysql-user-name] -p[password] [mysql-production-db-name]
    
    mysql> truncate table cache;
    mysql> exit;
    
  5. Clean up physical cache files with root access
    cd /home/continuum/builder.fluidproject.org/website/infusionBuilder-secure/cache
    rm *
    
  6. 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

  1. SSH to forge.fluidproject.org
  2. if this is the first time you deploy the daily build, you need to create a mysql database.
    1. 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;
    2. If you do have the privilege to create database, run:
      ant database_create -Dmysql_user=username -Dmysql_password=password -Dmysql_db_name=db_name
      
      **Substitute correct username and password and db_name and
      **mysql_db_name is optional. The default value is "build_cache"
  3. Create infusion-builder.properties at HOME directory to hold database credentials:
    vi ~/infusion-builder.properties
        mysql_user=username
        mysql_password=password
        mysql_db_name=db_name
    
    **Substitute correct username and password and db_name
    **mysql_db_name is optional. The default value is "build_cache"
  4. 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.
  5. 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.
  1. If you have a previous installation, backup builder directories and mysql manually
  2. 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
    
  3. if this is the first time you have deployed the builder, you need to create a mysql database.
    cd builder/infusionBuilder-deploy
    ant database_create -Dmysql_user=username -Dmysql_password=password -Dmysql_db_name=db_name
    
    **Substitute correct username and password and db_name
    **mysql_db_name is optional. The default value is "build_cache"
  4. Use ant to deploy "daily" build that provides unit tests for javascript and php:
    ant daily -Dmysql_user=username -Dmysql_password=password -Dmysql_db_name=db_name -Dhome="C:\webserver-document-root"
    
    **Substitute correct username and password and db_name and install directory
    **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
  5. To set up infusion builder PHP unit testing, adjust these lines in the following scripts:
    C:webserver-document-root/website/docs/infusionBuilder-secure/php/config.php
    define ("SIMPLETEST_PATH", "C:\webserver-document-root/");
    
    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/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.