out of the blue: getting started with ibm bluemix development

Post on 15-Jul-2015

688 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

www.ics.ug #icsug

Getting started with Bluemix and custom development

Oliver Busse, 27.03.2015

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

www.ics.ug #icsug

Getting started with Bluemix and custom development

Focus

This is NOT about coding(last chance to leave)

This demonstrates thepossible WORKFLOWS for developers using IBM Bluemix

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

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

www.ics.ug #icsug

Getting started with Bluemix and custom development

Prerequisites

• Create a new account or log in to your Bluemix account

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

www.ics.ug #icsug

Getting started with Bluemix and custom development

Create a new application(DEMO)

skip

www.ics.ug #icsug

Getting started with Bluemix and custom development

Create a new application

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

www.ics.ug #icsug

Getting started with Bluemix and custom development

Choose a runtime

www.ics.ug #icsug

Getting started with Bluemix and custom development

Start coding: download starter code

www.ics.ug #icsug

Getting started with Bluemix and custom development

Add a service

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

www.ics.ug #icsug

Getting started with Bluemix and custom development

Cont‘d: use a Boilerplate

www.ics.ug #icsug

Getting started with Bluemix and custom development

Workflow A:Start on Bluemix,continue on local

(DEMO)

www.ics.ug #icsug

Getting started with Bluemix and custom development

Example: Visual Recognition in Node.js

www.ics.ug #icsug

Getting started with Bluemix and custom development

Add the Visual Recognition Service

www.ics.ug #icsug

Getting started with Bluemix and custom development

Cont‘d: adding the service

www.ics.ug #icsug

Getting started with Bluemix and custom development

Start and open the application

We will change this later!

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

www.ics.ug #icsug

Getting started with Bluemix and custom development

Add the sample application to your repo

www.ics.ug #icsug

Getting started with Bluemix and custom development

Goto your repo and browse or edit codeD

evO

ps

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)

www.ics.ug #icsug

Getting started with Bluemix and custom development

Next steps

• Open the local project in your IDE

• Start coding!

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)

www.ics.ug #icsug

Getting started with Bluemix and custom development

Cont‘d: Next steps

• Commit & push changes with Git to your remote repository

www.ics.ug #icsug

Getting started with Bluemix and custom development

Cont‘d: Next steps

• Watch DevOps building & deploying your application in the Cloud

www.ics.ug #icsug

Getting started with Bluemix and custom development

Finished!• Watch your changes online on IBM Bluemix!

Voila!

www.ics.ug #icsug

Getting started with Bluemix and custom development

Useful resources

• DevOps Repo: https://hub.jazz.net/project/<username>/<projectname>/overview

• DevOps Build & Deploy: https://hub.jazz.net/pipeline/<username>/<projectname

www.ics.ug #icsug

Getting started with Bluemix and custom development

Workflow B:Start local,

deploy on Bluemix(DEMO)

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

www.ics.ug #icsug

Getting started with Bluemix and custom development

Setting up Eclipse: install Bluemix plugin

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.

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“.

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“.

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“.

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“.

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

www.ics.ug #icsug

Getting started with Bluemix and custom development

http://localhost:9080/

www.ics.ug #icsug

Getting started with Bluemix and custom development

Test WLP installation• Create a new project• File, New, Project... „Dynamic Web

Project“

www.ics.ug #icsug

Getting started with Bluemix and custom development

Cont‘d: Test WLP installation

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

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

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 theservers tab

• Be sure to NOT have a manifest.yml file

• Choose „Add and remove...“

• Select your project

• Click „Add“, then „Finish“

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“

www.ics.ug #icsug

Getting started with Bluemix and custom development

Cont‘d: deploying on Bluemix

• Check the console and your Bluemix dashboard!

Voila!

www.ics.ug #icsug

Getting started with Bluemix and custom development

Alternative: using the CF-Tool

• Prerequesites

– manifest.yml

– WAR file in the project

www.ics.ug #icsug

Getting started with Bluemix and custom development

Build application: WAR file

www.ics.ug #icsug

Getting started with Bluemix and custom development

Cont‘d: Build application: WAR file

www.ics.ug #icsug

Getting started with Bluemix and custom development

Cont‘d: Build application: WAR file

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: ICSUGDemomemory: 512Minstances: 1host: icsugdemopath: ICSUGDemo.wardomain: mybluemix.net

www.ics.ug #icsug

Getting started with Bluemix and custom development

The CF Tool

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

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

www.ics.ug #icsug

Getting started with Bluemix and custom development

Cont‘d: Using the CF Tool• Verify that the app is running

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“

www.ics.ug #icsug

Getting started with Bluemix and custom development

Coming soon! Follow #OpenNTF

www.ics.ug #icsug

Getting started with Bluemix and custom development

Questions?

www.ics.ug #icsug

Getting started with Bluemix and custom development

Thank you!

www.ics.ug #icsug

Getting started with Bluemix and custom development

Sourceshttp://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

top related