IBM Streams Introductory Hands-On Lab

For use with the Streams Quick Start Edition VMware Image (QSE VM), Version 4.1.1.

Getting started with IBM Streams

This is an introductory-level lab and the best way to learn the basics of Streams application programming.

Lab instructions

The instructions for this lab are in PDF format. This allows you to download the instructions, print them if you like, and work on the lab offline.

Download PDF (4 MB)

Lab installation

The QSE VM does not come with the lab preinstalled, so you have to install it yourself. The rest of this page covers the details.

Download Installation Package (4 MB)

These instructions guide you through the installation of all required components of the Introductory Lab for Streams 4.1.1. They assume you are using the QSE VM, but with minor adjustments for differences in environment they can can be used for any system with a Streams 4.1.1 installation.

The essence of this process is:

  1. Download the installation package (IntroLab_4.1.1b.zip; see button above)
  2. Extract the contents of the installation zip file
  3. Run the installation script (IntroLab_4.1.1_Install.sh)

The script takes care of everything, automatically. It does not matter which directory contains the script, nor what your present working directory is when you run it.

For advanced Linux users

The detailed instructions below are intended for users who are unfamiliar with Linux and command shells; they avoid the command line altogether. If you are proficient in Linux and the bash shell, you should have no problem mapping these to an equivalent command sequence, if you prefer.

  1. If you got to this page from another environment, open it from within the QSE VM. (Naturally, this assumes that you have internet access from within VMware.)
  2. Click the Download Installation Package (4 MB) button at the top of this section. By default, Firefox will open the package with the Archive Manager; to let it go ahead, click OK in the Opening IntroLab_4.1.1b.zip dialog.
  3. In the Archive Manager, click Extract extract in the tool bar.
    • In the Extract dialog, accept all defaults and click Extract to put the files in the streamsadmin home folder.
    • In the Extracting files from archive dialog, click Show the Files to open a File Browser showing the extracted files in that folder.
    • Close the Archive Manager.
  4. Double-click on the IntroLab_4.1.1_Install.sh shell script; in the dialog, click Run in terminal.
  5. A Terminal window opens up, displaying progress. More detailed progress messages are written to the IntroLab_4.1.1_Install.log file (in the same folder). Installation will take up to five minutes or so, in part depending on the speed of your internet connection; it includes building a required toolkit, which involves downloading additional components. When the installation is complete, press any key to terminate the script and close the Terminal.

The script removes itself as well as the installation files archive, so after successful completion you only have the downloaded file, the installation log, and an uninstall script in your home folder (in addition to any files already there before you started).

The uninstall script, IntroLab_4.1.1_Uninstall.sh, removes all installed files related to this lab, including toolkits, data, and desktop launchers. It does not remove any work you may have done in projects in your own Streams Studio workspace. You may keep this script around in case you want to clean up your environment someday.

If installation fails

If for some reason installation was not successful, you will see a message to that effect; additional information may be available in the install log. The script cleans up after itself upon failure by removing any files and directories it may have already installed.

Reasons why installation may fail

If you are not using the QSE VM and do not have Apache Ant (1.8 or later) or Apache Maven (3.2 or later) installed in your environment, installation will fail. These two utilities are required to build the Internet Toolkit, which is used in the final chapter of the lab. Explaining exactly how to install these utilities is beyond the scope of this document. Other causes of failure may have to do with not being able to write files into subdirectories, such as permission problems, pre-existing files, and insufficient disk space.

Troubleshooting non-obvious failures

If the progress messages and log file provide insufficient clues as to what went wrong, and you are an experienced Linux user (or have someone like that to help you) use a Terminal window to execute the install script from the command line. Before running it, execute this command:
export DEBUG=yes
This greatly increases the information recorded in the log file and should allow you to pinpoint the problem.

5 comments on"Introductory Lab for IBM Streams 4.1.1"

  1. StanfordDad July 04, 2016

    Hello. Not using QSE VM. I have a buildpath issue. How to fix?
    [javac] Compiling 49 source files to /home/ec2-user/tutorial/Toolkits/com.ibm.streamsx.inet/impl/java/classes
    [javac] /home/ec2-user/tutorial/Toolkits/com.ibm.streamsx.inet/impl/java/src/com/ibm/streamsx/inet/http/AbstractHTTPGetContent.java:22: error: package com.ibm.streams.operator does not exist
    [javac] import com.ibm.streams.operator.OperatorContext;
    and more…

  2. StanfordDad July 04, 2016

    Got past the build issue by setting STREAMS_INSTALL variable.
    Looks like curl is not part of the installation package.

    cpp:
    [exec] In file included from cpp/src/httpFunctions.cpp:1:0:
    [exec] ./cpp/include/httpFunctions.h:3:23: fatal error: curl/curl.h: No such file or directory
    [exec] #include “curl/curl.h”

    • It appears that I have become lazy ever since we’ve had the QSE VM to run this lab in; I haven’t bothered to add instructions for installing the lab into a fresh installation of Streams. Sorry that you are now having to discover the various little installation issues that the QSE VM sweeps under the rug for us.

      That said, getting STREAMS_INSTALL set is a mandatory part of any Streams configuration; the standard way of doing this is to invoke streamsprofile.sh from your .bashrc script. See https://www.ibm.com/support/knowledgecenter/SSCRJU_4.1.1/com.ibm.streams.install.doc/doc/ibminfospherestreams-configuring-streams-environment.html

      The streamsx.inet toolkit requires the libcurl package. This is documented in the README for the GitHub project: https://github.com/IBMStreams/streamsx.inet/blob/master/README.md. Of course, since the lab installation scripts don’t expose any of this and simply assume the prerequisites are there, you would have had no way of knowing that. I should look into enhancing the script to install it if necessary. Meanwhile, if you’re OK using yum with some repository you can access, please install libcurl and try again.

  3. StanfordDad July 04, 2016

    By the way, Happy Fourth!
    When creating the MyProject, the “SPL Project Configuration panel” does not show up.

    • I’m not sure what to make of this; I’ll have to set up my own fresh installation to try to reproduce it. Please tell me which Linux you’re running, and anything else you can think of that may have a bearing on your Streams and Streams Studio environment.

Join The Discussion