Get setup for the Industrial Internet
This article provides step-by-step instructions to register and install Predix, GE’s brand name for their “Industrial Internet” sales.
Actions to get started:
- Slack channel setup
- Predix Account setup
- Select an approach to install 3rd-party utilities
- Hosting in the Cloud Foundry cloud
- Local install
- Devbox with pre-built virtual machines
I want you to feel confident that you’ve mastered this skill. That’s why this takes a hands-on approach where you type in commands and we explain the responses and possible troubleshooting. This is a “deep dive” because all details are presented.
Like a good music DJ, I’ve carefully arranged the presentation of concepts into a sequence for easy learning, so you don’t have to spend as much time as me making sense of the flood of material around this subject.
Sentences that begin with PROTIP are a high point of this website to point out wisdom and advice from experience. NOTE point out observations that many miss. Search for them if you only want “TL;DR” (Too Long Didn’t Read) highlights.
Stuck? Contact me and I or one of my friends will help you.
Slack channel setup
Once you receive a confirmation email, activate the Slack app on your Mac or PC if you’d like to switch among differen Slack channels.
Click the “+” at the lower left corner.
Type in the teamdomain of “intelligentworld” and click Continue.
Type in the email you used to register and click Continue.
If you clicked “Send Magic Link”, open the email and click “Sign into Slack”.
That action opens browser for you to click “Launch Slack”.
Choose whether to enable desktop notifications.
Now return temporarily to your browser to close the tabs to access Slack.
Predix Account setup
Click the link below to register for a Predix account at
QUESTION: After the free days, $ ___ per month?
Confirm phone and email while on the page.
A GitHub repo account needs to be specified.
PROTIP: Don’t expect a response if you provide a gmail or hotmail account, even after phone ane email confirmation code confirmations. That’s my personal experience
Wait for the confirm email from Predix. If you’re deemed legitimate:
“Thanks for your interest in a Predix trial account. We’ll validate your information, and will respond within five business days.”
Wait for the email from Predix.
Each developer’s GitHub account is granted access to the repository and a number of subrepositories:
Once approved, you can then enroll in training.
“Please connect to BlueSSO and go to training.predix.io. From there, log in with your Predix credentials and enroll in the “On-Demand” courses. This is where you will find access to the free eLearning videos.”
Note that the training site is different from
After approval, you’ll be able to post on the
Predix Developers Forum
- GIT, SVN, Pair Programming*,
- Environment Portability*,
- Multiple Sandbox Environments*
IDE / Editors:
- Bower, NodeJS, Grunt,
- Firefox, Chromium browsers
- Apache OpenJPA persistence
- Cloud Foundry CLI, User Authentication and Authorization CLI,
- RabbitMQ Message Queue
- PostgreSql 9.3 and psql utilities,
- Anaconda distribution of Python (Pandas, Scipy, Numpy, and sklearn)
Predix Machine 16.x,
If you’re running on a Oracle/Red Hat Linux System
Eclipse STS IDE
This advises the use of STS
- Use an interest browser to the STS website.
- Select a download site to begin download. Wait for the file to download.
In Finder, navigate inside the folder, such as:
This contains the server.
Move and/or rename the folder according to your organization’s standards.
- In Finder navigate to /Applications.
- Move (drag and drop) STS.app to /Applications.
- Open STS by double-clicking the icon.
- Click Open icon for first-time confirmation.
- Specify your workspace.
STS (Spring Tools Suite)
Included with STS (Spring Tools Suite) is the developer edition of Pivotal tc Server, the drop-in replacement for Apache Tomcat that’s optimized for Spring.
The Spring Insight console, tc Server Developer Edition, provides a graphical real-time view of application performance metrics that lets developers identify and diagnose problems from their desktops.
The framework is based on the Java Spring framework, which many now consider “heavy”.
This is surprising considering most others in their industry have gone to Python or React.
QUESTION: Why Spring and not Node or Python or React?
Maybe it’s because there are more Java Spring developers unemployed than the other hotter frameworks?
Or that Spring is more “mature” as a framework since it’s been around since the 90’s.
During register for a Predix account, each developer’s GitHub account is granted access to the repository and a number of subrepositories at
https://www.vmware.com/products/vfabric-tcserver/ Cloud Foundry is by VMware Pivotal is purchased as part of the VMWare Fabric containing the “VMware vFabric tc Server”.
At https://github.com/cloudfoundry/cli/releases click the “Latest Release”.
brew tap cloudfoundry/tap
The response (on 7 July 2016):
==> Tapping cloudfoundry/tap Cloning into '/usr/local/Library/Taps/cloudfoundry/homebrew-tap'... remote: Counting objects: 7, done. remote: Compressing objects: 100% (6/6), done. remote: Total 7 (delta 0), reused 3 (delta 0), pack-reused 0 Unpacking objects: 100% (7/7), done. Checking connectivity... done. Tapped 2 formulae (33 files, 27K)
Install Command Line Interface:
brew install cf-cli
==> Installing cf-cli from cloudfoundry/tap ==> Downloading https://cli.run.pivotal.io/stable?release=macosx64-binary&version=6.20.0&source=homebrew ==> Downloading from https://s3.amazonaws.com/go-cli/releases/v6.20.0/cf-cli_6.20.0_osx.tgz ######################################################################## 100.0% 🍺 /usr/local/Cellar/cf-cli/6.20.0: 2 files, 22.1M, built in 18 seconds
The response expand the width of shell window to see:
NAME: cf - A command line tool to interact with Cloud Foundry
USAGE: cf [global options] command [arguments…] [command options]
GETTING STARTED: help Show help version Print the version login Log user in logout Log user out passwd Change user password target Set or view the targeted org or space
api Set or view target api url auth Authenticate user non-interactively
APPS: apps List all apps in the target space app Display health and status for app
push Push a new app or sync changes to an existing app scale Change or view the instance count, disk space limit, and memory limit for an app delete Delete an app rename Rename an app
start Start an app stop Stop an app restart Restart an app restage Restage an app </pre>
### Sample app #
In an internet browser, explore sample apps in Cloud Foundry’s sample organization:
Back at the Termial:
Clone the sample app:
git clone https://github.com/cloudfoundry-samples/cf-sample-app-spring.git
Cloning into 'cf-sample-app-spring'... remote: Counting objects: 69, done. remote: Total 69 (delta 0), reused 0 (delta 0), pack-reused 69 Unpacking objects: 100% (69/69), done. Checking connectivity... done.
Navigate to the repo created:
Sign in to PWS:
cf login -a https://api.run.pivotal.io
API endpoint: https://api.run.pivotal.io Email>
Type in your Email, then Password.
API endpoint: https://api.run.pivotal.io (API version: 2.57.0) User: email@example.com No org or space targeted, use 'cf target -o ORG -s SPACE'
Type in email and password (which is not reflected back to the screen):
Authenticating... OK Targeted org montana Select a space (or press enter to skip):
joliet Space> 2 </pre>
Type in the number associated with the space you want to use (based on the list):
Targeted space joliet API endpoint: https://api.run.pivotal.io (API version: 2.57.0) User: firstname.lastname@example.org Org: montana Space: joliet
API endpoint: https://api.run.pivotal.io
Predix Basic for individual emails:
Predix Select for company names:
Deploy the app to PWS:
The response begins with:
Using manifest file /Users/mac/gits/pivotal/cf-sample-app-spring/manifest.yml Creating app cf-spring in org montana / space joliet as email@example.com... OK Creating route cf-spring-isomagnetic-pleiophylly.cfapps.io... OK Binding cf-spring-isomagnetic-pleiophylly.cfapps.io to cf-spring... OK Uploading cf-spring... Uploading app files from: /Users/mac/gits/pivotal/cf-sample-app-spring Uploading 1M, 44 files Done uploading OK Starting app cf-spring in org montana / space joliet as firstname.lastname@example.org...
The response ends with:
requested state: started instances: 1/1 usage: 512M x 1 instances urls: cf-spring-isomagnetic-pleiophylly.cfapps.io last uploaded: Wed Jul 20 02:10:46 UTC 2016 stack: unknown buildpack: java-buildpack=v3.8.1-offline-https://github.com/cloudfoundry/java-buildpack.git#29c79f2 open-jdk-like-jre=1.8.0_91-unlimited-crypto open-jdk-like-memory-calculator=2.0.2_RELEASE spring-boot-cli=1.3.5_RELEASE state since cpu memory disk details #0 running 2016-07-19 08:11:24 PM 0.0% 338.7M of 512M 155M of 1G
TODO: Change the log color.
cf logs cf-spring –recent
List the available ElephantSQL service plans in the Marketplace:
cf marketplace -s elephantsql
Getting service plan information for service elephantsql as email@example.com... OK service plan description free or paid turtle 4 concurrent connections, 20MB Storage free panda 20 concurrent connections, 2GB Storage paid hippo 300 concurrent connections, 100 GB Storage paid elephant 300 concurrent connections, 1000 GB Storage, 500Mbps paid
Create a service instance with the free plan “turtle”:
cf create-service elephantsql turtle cf-spring-db
Creating service instance cf-spring-db in org montana / space joliet as firstname.lastname@example.org... OK
Bind the newly created service to the app:
cf bind-service cf-spring cf-spring-db
NOTE: When a service is bound to an app, environment variables are stored that allow the app to connect to the service after a push, restage, or restart command.
Binding service cf-spring-db to app cf-spring in org montana / space joliet as email@example.com... OK TIP: Use 'cf restage cf-spring' to ensure your env variable changes take effect
Restart the app:
cf restart cf-spring
Stopping app cf-spring in org montana / space joliet as firstname.lastname@example.org... OK Starting app cf-spring in org montana / space joliet as email@example.com... 0 of 1 instances running, 1 starting
Verify the new service is bound to the app:
name service plan bound apps last operation cf-spring-db elephantsql turtle cf-spring create succeeded
Increase the number of app instances from one to two:
cf scale cf-spring -i 2
Check the status of the app and verify there are two instances running:
cf app cf-spring
WARNING: Scaling your app vertically changes the disk space limit or memory limit for each app instance.
Increase the memory limit for each app instance:
cf scale cf-spring -m 1G
Increase the disk limit for each app instance:
cf scale cf-spring -k 512M
gem install cf-uaac
Fetching: multi_json-1.12.1.gem (100%) Successfully installed multi_json-1.12.1 Fetching: cf-uaa-lib-3.4.0.gem (100%) Successfully installed cf-uaa-lib-3.4.0 Fetching: highline-1.6.21.gem (100%) Successfully installed highline-1.6.21 Fetching: eventmachine-220.127.116.11.gem (100%) Building native extensions. This could take a while... Successfully installed eventmachine-18.104.22.168 Fetching: launchy-2.4.3.gem (100%) Successfully installed launchy-2.4.3 Fetching: cookiejar-0.3.3.gem (100%) Successfully installed cookiejar-0.3.3 Fetching: em-socksify-0.3.1.gem (100%) Successfully installed em-socksify-0.3.1 Fetching: http_parser.rb-0.6.0.gem (100%) Building native extensions. This could take a while... Successfully installed http_parser.rb-0.6.0 Fetching: em-http-request-1.1.5.gem (100%) Successfully installed em-http-request-1.1.5 Fetching: json_pure-1.8.3.gem (100%) Successfully installed json_pure-1.8.3 Fetching: rack-1.5.5.gem (100%) Successfully installed rack-1.5.5 Fetching: cf-uaac-3.3.0.gem (100%) Successfully installed cf-uaac-3.3.0 Parsing documentation for multi_json-1.12.1 Installing ri documentation for multi_json-1.12.1 Parsing documentation for cf-uaa-lib-3.4.0 Installing ri documentation for cf-uaa-lib-3.4.0 Parsing documentation for highline-1.6.21 Installing ri documentation for highline-1.6.21 Parsing documentation for eventmachine-22.214.171.124 Installing ri documentation for eventmachine-126.96.36.199 Parsing documentation for launchy-2.4.3 Installing ri documentation for launchy-2.4.3 Parsing documentation for cookiejar-0.3.3 Installing ri documentation for cookiejar-0.3.3 Parsing documentation for em-socksify-0.3.1 Installing ri documentation for em-socksify-0.3.1 Parsing documentation for http_parser.rb-0.6.0 Installing ri documentation for http_parser.rb-0.6.0 Parsing documentation for em-http-request-1.1.5 Installing ri documentation for em-http-request-1.1.5 Parsing documentation for json_pure-1.8.3 Installing ri documentation for json_pure-1.8.3 Parsing documentation for rack-1.5.5 Installing ri documentation for rack-1.5.5 Parsing documentation for cf-uaac-3.3.0 Installing ri documentation for cf-uaac-3.3.0 Done installing documentation for multi_json, cf-uaa-lib, highline, eventmachine, launchy, cookiejar, em-socksify, http_parser.rb, em-http-request, json_pure, rack, cf-uaac after 10 seconds 12 gems installed
Verify use of uaac:
UAA Command Line Interface
Miscellaneous version Display version help [topic|command…] Display summary or details of command or topic target [uaa_url] Display current or set new target </pre>
Install bower for front-end UI flat (non-recursive) dependencies tree:
npm install -g bower
Create a folder (~/gits/predix) to hold repos and cd to it.
Predix offers two samples:
- git clone https://github.com/PredixDev/predix-microservice-cf-jsr.git
- git clone https://github.com/PredixDev/predix-microservice-cf-spring.git
Create repo for JSR and cd into it:
git clone https://github.com/PredixDev/predix-microservice-cf-jsr.git
The tree of folders and files for JSR is more complex than Spring:
|-- COPYRIGHT.md |-- LICENSE.md |-- README.md |-- config | `-- application.properties |-- manifest.yml |-- pom.xml `-- src |-- main | |-- java | | `-- com | | `-- ge | | `-- predix | | `-- solsvc | | |-- boot | | | |-- Application.java | | | |-- PredixBootSecurityConfig.java | | | `-- service | | | `-- cxf | | | |-- ApplicationJSONProvider.java | | | |-- DefaultService.java | | | |-- DynamicService.java | | | `-- DynamicServiceImpl.java | | `-- spi | | |-- IServiceManagerService.java | | |-- NamedCxfProperties.java | | `-- ServiceManagerServiceImpl.java | `-- resources | |-- META-INF | | `-- spring | | |-- predix-microservice-cf-jsr-cxf-context.xml | | `-- predix-microservice-cf-jsr-scan-context.xml | |-- application-default.properties | `-- application.properties `-- test |-- java | `-- com | `-- ge | `-- predix | `-- solsvc | `-- boot | `-- HelloControllerTest.java `-- resources `-- application.properties 23 directories, 21 files
Create the repo for Spring and cd into it:
git clone https://github.com/PredixDev/predix-microservice-cf-spring.git
The tree of folders and files for Spring is less complex than JSR:
|-- COPYRIGHT.md |-- LICENSE.md |-- README.md |-- config | `-- application.properties |-- manifest.yml |-- pom.xml `-- src |-- main | |-- java | | `-- com | | `-- ge | | `-- predix | | `-- solsvc | | |-- boot | | | |-- Application.java | | | `-- PredixBootSecurityConfig.java | | `-- service | | `-- HelloController.java | `-- resources | |-- application-default.properties | `-- application.properties `-- test `-- java `-- com `-- ge `-- predix `-- solsvc `-- boot |-- HelloControllerIT.java `-- HelloControllerTest.java 18 directories, 13 files
Build using Maven
mvn clean package
The end of a long list is like this:
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 02:27 min [INFO] Finished at: 2016-07-08T08:55:47-06:00 [INFO] Final Memory: 30M/152M [INFO] ------------------------------------------------------------------------
https://www.youtube.com/watch?v=9SEVfK-1sCQ Predix Intelligent Environment API Quick Start Demo
This is one of several related topics: