This blog post walks you through building and installing SnapLogic 2.2 on a Ubuntu 10.04 box. These instructions will lead you through building the product from source. There is also a handy installer available, but that is only for the Pro version. The Pro version has a 14 day trial, and then you’ll have to fork over money. Since I plan to work on my prototype over a longer period of time, I have decided to build the community version from source.
Note: there is currently a blocking issue that prevents this from working. Be sure to read through to the bottom of this page for details before proceeding on this yourself.
The official build and installation instructions live on the SnapLogic wiki, but I am posting here so I can provide more details as I go. Also, there are a couple of changes from the official instructions presumably due to 10.04. Since it seems only Ubuntu 9.x is supported for SnapLogic 2.2, updating the official wiki would probably not be welcome. Items marked with DELTA below are different relative to the official docs.
Caveat: I am running 10.04, but my laptop has been a Ubuntu machine since 9.04. I did an in place upgrade to 9.10 and then 10.04, and have installed a lot of things along the way. Your mileage may therefore vary with these instructions.
Step 1: Install Prerequisite Packages (DELTA)
Execute the following command in a terminal window:
sudo apt-get install python-mysqldb python-pysqlite2 python-cherrypy3 python-feedparser python-simplejson python-lxml python-beautifulsoup python-paste python-genshi
Note: make sure to specificy python-cherrypy3, otherwise you get 2.3.0-3, which will not work with SnapLogic 2.2.
Step 2: Download the Source
Go to the community site and download the source for both the server and the designer:
Step 3: Extract the Source into a Directory
cd ~/dev
mkdir snaplogic
cd snaplogic/
unzip /home/plaird/Desktop/downloads/snaplogic-src-2.2.0.zip
Step 4: Create a Runtime Directory
cd ~/dev/snaplogic/
mkdir runtime
Step 5: Setup your Shell
Ultimately, you want to define these in ~/.bashrc, but we will do it inline for now.
export SnapPackageDir=/home/plaird/dev/snaplogic
export SnapRuntimeDir=/home/plaird/dev/snaplogic/runtime
export PYTHONPATH=$PYTHONPATH:${SnapPackageDir}
Step 6: Build out your Runtime Directories
mkdir ${SnapRuntimeDir}
mkdir ${SnapRuntimeDir}/bin
mkdir ${SnapRuntimeDir}/repository
mkdir ${SnapRuntimeDir}/designer
mkdir ${SnapRuntimeDir}/cache_dir
mkdir ${SnapRuntimeDir}/compute
mkdir ${SnapRuntimeDir}/static
mkdir ${SnapRuntimeDir}/logs
mkdir ${SnapRuntimeDir}/config
Step 7: Copy in Runtime Files (DELTA)
The official instructions inform you that you need to install icon files at this point. That no longer seems necessary, as the Designer installation in a later step now takes care of that.
However, I found that you do need to install the components and tutorial into the runtime directory.
cd ${SnapRuntimeDir}
cp -r ../snaplogic/components/ .
cp –r ../snaplogic/example/tutorial .
cd tutorial
mkdir data
mv *.csv data
Step 8: Launch SnapAdmin
cd ${SnapRuntimeDir}
python ${SnapPackageDir}/snaplogic/tools/snapadmin.py
Step 9: Create your Repository in the Runtime Directory
repository create -t sqlite /home/plaird/dev/snaplogic/runtime/repository/repository.db
Step 10: Create a Server Configuration File
Download the template configuration file from the website (link is on this page) and copy it into your ${SnapRuntimeDir}/config directory. Make the following modifications:
- Replace ${SnapRuntimeDir} with absolute path
- Change YOURHOST.EXAMPLE.COM to the fully qualified domain name of your host (three locations)
- Optionally change the ports from 8088, 8081 and 8089
Step 11: Install the Authentication Files
These files give you a starting solution for authentication:
cp ${SnapPackageDir}/snaplogic/server/auth/simple_snapaccess.conf ${SnapRuntimeDir}/config/
cp ${SnapPackageDir}/snaplogic/server/auth/simple_passwords ${SnapRuntimeDir}/config/
Step 12: Install the Designer GUI
cd ${SnapRuntimeDir}unzip /home/plaird/Desktop/downloads/snaplogic-designer-2.2.0.zip
Step 13: Create the Server Start Script (DELTA)
The default control script is not included in the community edition. Create a file called startServers.sh in your runtime directory. Its contents should be as follows (replacing localhost:8088 with your server URL):
echo "Starting data server"
python ${SnapPackageDir}/snaplogic/server/server.py --config=${SnapRuntimeDir}/config/snaplogic_server.conf &
echo "Starting management server"
python ${SnapPackageDir}/snaplogic/mgmtserver/mgmt_server.py --config=${SnapRuntimeDir}/config/snaplogic_server.conf &
echo "Starting component server"
python ${SnapPackageDir}/snaplogic/cc/component_container.py --name=cc1 --server=http://localhost:8088 &
Step 14: Correct the Bad Import on Ubuntu 10.04 (DELTA)
If you are running with Ubuntu 10.04, you probably have package python-simplejson at version 2.0.9-1build1. SnapLogic 2.2 was certified against version 1.7.1. You will need to remove an import statement from a SnapLogic file:
gedit /home/plaird/dev/snaplogic/snaplogic/rp/streaming_json_rp.py
Edit out this line:
from simplejson.decoder import JSONScanner
Step 15: Start the Servers and View the UI (DELTA)
chmod u+x startServers.sh
./startServers.sh
firefox http://<your_machine_name>:8081 &
Step 16: Walk through Tutorial
You can at this point start with the tutorials.
Step 17: ROAD BLOCK
Sadly, at this point I have hit a road block. The community edition of the product apparently has a bug in that it depends on an license file for a commercial version of the product (pro or core). I have filed defect 2449 – hope to get a fix shortly!
In the meantime, see my follow on post on how to install SnapLogic 2.1.0 instead. While it is an earlier version, the upside is the 2.1.0 version has a community installer.
Pretty easy instructions ~ my CSR will get this out to our ZOOMILite network in Asia to try it out...
ReplyDelete~Cristy