2. www.ics.ug #icsug
Getting started with Bluemix and custom development
Oliver Busse
• „Bleeding Yellow“ since R4.5
• Certified Lotus Instructor since 2001
• IBM Champion for ICS in 2015
• OpenNTF Contributor & Board Member
• XPages Advocate
• Framework-addict
• IBM Bluemix beginner
www.oliverbusse.eu
@zeromancer1972
3. www.ics.ug #icsug
Getting started with Bluemix and custom development
Focus
This is NOT about coding
(last chance to leave )
This demonstrates the
possible WORKFLOWS for
developers using IBM Bluemix
4. www.ics.ug #icsug
Getting started with Bluemix and custom development
Agenda
• What is…?
• Prerequisites
• Which tools?
• Getting started: your first application
• Which workflow?
– A: Start in Bluemix, continue on local
– B: Start local, deploy on Bluemix
5. www.ics.ug #icsug
Getting started with Bluemix and custom development
What is…
• Bluemix
– PaaS („Platform as a Service“, no software preconfigured, based on CloundFoundry)
• a Runtime
– Environment in which your application will run
• a Service
– Functionality for your application e.g. Database, Security, Watson or „Internet of Things“
• DevOps
– „Development & Operations“, tools for testing, building and deploying apps
• JazzHub
– Repository for your application source code, issue tracking and documentation
• a Stage
– block in DevOps‘ deployment process
• a Pipeline
– combination of stages when deploying an application
• the cf-Tool
– CloudFoundry command line tool, manage your application via the console
6. www.ics.ug #icsug
Getting started with Bluemix and custom development
Prerequisites
• Create a new account or log in to your Bluemix account
7. www.ics.ug #icsug
Getting started with Bluemix and custom development
Which tools?
• Git-SCM
– common source code control system
• CMDER
– Powerful command line replacement with Git support
• Any Editor (Notepad++, SublimeText, Brackets)
• Eclipse
– IDE for Java Developers
• Bluemix Plugin
– Deployment console for Eclipse on Bluemix
• Websphere Liberty Profile (WLP)
– Local application server runtime
• CF Commandline Tool
– CloudFoundry command for deploying apps
10. www.ics.ug #icsug
Getting started with Bluemix and custom development
Cont‘d: create a new application
Name your application.
This will be the subdomain URL.
Choose „WEB“ for this first timer
14. www.ics.ug #icsug
Getting started with Bluemix and custom development
Alternative: use a Boilerplate
• Choose a Boilerplate from the catalog
• A Boilerplate is a predefined runtime with one
or more services attached automatically
• A Boilerplate can also be edited later
• It‘s the easiest way to start over with a
complete application structure
21. www.ics.ug #icsug
Getting started with Bluemix and custom development
Start coding: add a repository*
*) You may have to create an account for JazzHub, too
24. www.ics.ug #icsug
Getting started with Bluemix and custom development
Clone your repo
• Learn Git!
• Create a folder for your
repos
• Open a command line
(e.g. CMDER)
25. www.ics.ug #icsug
Getting started with Bluemix and custom development
Next steps
• Open the local project in your IDE
• Start coding!
26. www.ics.ug #icsug
Getting started with Bluemix and custom development
Optional: use the sample app
• Optional: Download the sample app (is this case the „Visual Recognition
Starter App“)
• Extract the sample app in your project folder (overwrite files if necessary)
27. www.ics.ug #icsug
Getting started with Bluemix and custom development
Cont‘d: Next steps
• Commit & push
changes with Git to
your remote
repository
28. www.ics.ug #icsug
Getting started with Bluemix and custom development
Cont‘d: Next steps
• Watch DevOps building & deploying your
application in the Cloud
32. www.ics.ug #icsug
Getting started with Bluemix and custom development
Example: Java Web Application
• Ingredients:
– Eclipse IDE
– Bluemix Plugin for Eclipse
– Websphere Liberty Profile (WLP)
– CF-Tool
• Topics covered
– manifest.yml
– local build tools
– .war file
34. www.ics.ug #icsug
Getting started with Bluemix and custom development
Cont‘d: install Bluemix plugin
• In Eclipse Marketplace,
search for „bluemix“and
hit enter.
• Find „IBM Eclipse Tools
for Bluemix“ and hit
„Install“.
• Follow the installer‘s
instructions.
35. www.ics.ug #icsug
Getting started with Bluemix and custom development
Setting up Eclipse: install WLP runtime
• In Eclipse, goto
Window, Preferences,
Server, Runtime
Environments. Click
„Add...“.
• Choose IBM,
Websphere
Application Server
Liberty Profile.
• Click „Next“.
36. www.ics.ug #icsug
Getting started with Bluemix and custom development
Cont‘d: install WLP runtime
• On the next screen choose
„Install from an archive or a
repository“ if you don‘t
already have a WLP
installed.
• Click „Next“.
37. www.ics.ug #icsug
Getting started with Bluemix and custom development
Cont‘d: install WLP runtime
• On the next screen browse for a
destination folder for the WLP
installation.
• Choose „Download and Install...“.
• The search for the WLP repos can
take some time.
• Then, choose the „Liberty Profile
V8.5.5.4 Runtime“ (or newer, not
the beta).
• Hit „Next“, then accept the license
terms.
• Click „Next“.
38. www.ics.ug #icsug
Getting started with Bluemix and custom development
Cont‘d: install WLP runtime
• Almost done!
• Leave the settings alone and click
„Finish“.
39. www.ics.ug #icsug
Getting started with Bluemix and custom development
Verify WLP installation
• Open Window, Show
View, Servers to open the
servers tab.
• The WLP should appear
right below the IBM
Bluemix runtime
41. www.ics.ug #icsug
Getting started with Bluemix and custom development
Test WLP installation
• Create a new project
• File, New, Project... „Dynamic Web
Project“
43. www.ics.ug #icsug
Getting started with Bluemix and custom development
Cont‘d: Test WLP installation
• Create a sample jsp file „index.jsp“
• Add the project to the WLP
runtime
44. www.ics.ug #icsug
Getting started with Bluemix and custom development
Cont‘d: Test WLP installation
• Start the server and navigate to the URL in a
browser
45. www.ics.ug #icsug
Getting started with Bluemix and custom development
Next step: deploying on Bluemix
• Right-click on the IBM
Bluemix Runtime entry in the
servers tab
• Be sure to NOT have a
manifest.yml file
• Choose „Add and remove...“
• Select your project
• Click „Add“, then „Finish“
46. www.ics.ug #icsug
Getting started with Bluemix and custom development
Cont‘d: deploying on Bluemix
• Set options for the Bluemix app, e.g. a host URL
• These settings are optional
• Check „Save to manifest file“
• Click „Finish“
47. www.ics.ug #icsug
Getting started with Bluemix and custom development
Cont‘d: deploying on Bluemix
• Check the console and your Bluemix dashboard!
Voila!
48. www.ics.ug #icsug
Getting started with Bluemix and custom development
Alternative: using the CF-Tool
• Prerequesites
– manifest.yml
– WAR file in the project
52. www.ics.ug #icsug
Getting started with Bluemix and custom development
Deployment: manifest.yml
• If there is no manifest.yml file create a new
one in the root folder of the project
• Contents:
applications:
- name: ICSUGDemo
memory: 512M
instances: 1
host: icsugdemo
path: ICSUGDemo.war
domain: mybluemix.net
54. www.ics.ug #icsug
Getting started with Bluemix and custom development
Using the CF Tool
• Open a command line
• Set the API entry
point
• Set your target
(default: „dev“)
• Login to Bluemix
55. www.ics.ug #icsug
Getting started with Bluemix and custom development
• Push the app to
Bluemix
• Wait until you
see that the app
has started
57. www.ics.ug #icsug
Getting started with Bluemix and custom development
Summary
• Easy to start
• Easy to maintain
• Many options & tools
• A „developer‘s playground“
61. www.ics.ug #icsug
Getting started with Bluemix and custom development
Sources
http://bliker.github.io/cmder/
http://eclipse.org
http://bluemix.net
http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/visual-recognition/#using
http://thoughtsoncloud.com/2014/08/three-tools-work-ibm-bluemix/
https://github.com/cloudfoundry/cli#downloads
http://marketplace.eclipse.org/content/ibm-eclipse-tools-bluemix