Deploy Your First Cloud Foundry App to Any Cloud Foundry Service Provider

Similar documents
Getting Started with the SDAccel Environment on Nimbix Cloud

Secure File Transfer Protocol (SFTP) Interface for Data Intake User Guide

Managing Your Access To The Open Banking Directory How To Guide

istartsmart 3.5 Upgrade - Installation Instructions

Manually Upgrading PostgreSQL 9.1 to PostgreSQL

SmartPass User Guide Page 1 of 50

Cloud Storage Migration Suite 1.1.0

BMC Remedyforce Integration with Remote Support

These tasks can now be performed by a special program called FTP clients.

Moving your MedicalDirector Clinical / PracSoft Data to a New Server

APPLY PAGE: LOGON PAGE:

Creating an Online Account

Click Studios. Passwordstate. RSA SecurID Configuration

NiceLabel LMS. Installation Guide for Single Server Deployment. Rev-1702 NiceLabel

Bitnami LAMP for Huawei Enterprise Cloud

AvePoint Perimeter Pro 1.9

BMC Remedyforce Integration with Bomgar Remote Support

My Dashboard Instructions

Copy your Course: Export and Import

Quick Installation Guide

Entering an NSERC CCV: Step by Step

Access the site directly by navigating to in your web browser.

Tips For Customising Configuration Wizards

VMware AirWatch Certificate Authentication for Cisco IPSec VPN

Campuses that access the SFS nvision Windows-based client need to allow outbound traffic to:

Enabling Your Personal Web Page on the SacLink

The screenshots/advice are based on upgrading Controller 10.1 RTM to 10.1 IF6 on Win2003

Technical Paper. Installing and Configuring SAS Environment Manager in a SAS Grid Environment with a Shared Configuration Directory

UiPath Automation. Walkthrough. Walkthrough Calculate Client Security Hash

ATKey.BLE Quick Guide (Windows 10)

SAS Hot Fix Analysis, Download and Deployment Tool

REFWORKS: STEP-BY-STEP HURST LIBRARY NORTHWEST UNIVERSITY

Mission Antyodaya Android Mobile & Web Application. Frequently Asked Questions

Firmware Upgrade Wizard v A Technical Guide

Guide to getting started in J2ME for the Motorola A780 phone

ClassFlow Administrator User Guide

Form Filing Instructions

Date: October User guide. Integration through ONVIF driver. Partner Self-test. Prepared By: Devices & Integrations Team, Milestone Systems

HP Universal CMDB. Software Version: Backup and Recovery Guide

OO Shell for Authoring (OOSHA) User Guide

Using the Swiftpage Connect List Manager

Integrating QuickBooks with TimePro

ATKey.Phone Quick Guide

Kaltura Video Extension for SharePoint 2013 Deployment Guide for Microsoft Office 365. Version: 1.0

Imagine for MSDNAA Student SetUp Instructions

UiPath Automation. Walkthrough. Walkthrough Calculate Client Security Hash

Reviewer Information Sheet for Committee Members

Exosoft Backup Manager

Installing AX Server with PostgreSQL

Log in with your WUSTL Key and password If you have forgotten your WUSTL Key or password, see

VISITSCOTLAND - TOURS MANAGEMENT SYSTEM Manual for Tour Operators

Using the Swiftpage Connect List Manager

TechSmith Relay 5.1.5

HPE AppPulse Mobile. Software Version: 2.1. IT Operations Management Integration Guide

Enterprise Installation

Technical Paper. Installing and Configuring SAS Environment Manager in a SAS Grid Environment

Universal CMDB. Software Version: Backup and Recovery Guide

UPGRADING TO DISCOVERY 2005

Manual for installation and usage of the module Secure-Connect

IMPORTING INFOSPHERE DATA ARCHITECT MODELS INFORMATION SERVER V8.7

Information about the ACC Education App Featuring ACCSAP 9

Sircon User Guide A Guide to Using the Vertafore Sircon Self-Service Portal

Guide to New Broker Certification

Installing and using QGIS

Upgrade Guide. Medtech Evolution General Practice. Version 1.9 Build (March 2018)

First Aid and Choking, Fire Safety, Medication Administration, and Standard Precautions Roster Submission:

Single File Upload Guide

Guidelines for Installing HI 1734-WS Faceplates

Banner Document Management Suite Using Application Xtender Web Access

Troubleshooting Guide for

Wave IP 4.5. CRMLink Desktop User Guide

Kindle Fire Guide. Requires OverDrive Account/Adobe ID authorization.

Procurement Contract Portal. User Guide

Dashboard Extension for Enterprise Architect

STIDistrict AL Rollover Procedures

1 Getting and Extracting the Upgrader

Installing the Citrix Citrix Receiver 3.3 from Citrix Web Interface for SSL VPN Users

USER GUIDE. Thanks for purchasing the igate! You ll need to follow these five Configuration Steps to get your igate up and running:

TMS myclouddata SDK DEVELOPERS GUIDE

Create your Applicant Area

OATS Registration and User Entitlement Guide

1 Getting and Extracting the Upgrader

Element Creator for Enterprise Architect

September 24, Release Notes

Launching Xacta 360 Marketplace AMI Guide June 2017

Create your Applicant Area

SoilCare: Stakeholder Platform Guidance How to edit and manage your own stakeholder platform WP8

Remote Document Delivery

How to create your online Prometric account and schedule your IRS SEE exam

1on1 Sales Manager Tool. User Guide

Faculty Textbook Adoption Instructions

ONLINE GRANT APPLICATION INSTRUCTIONS

Virtual Office

Element Creator for Enterprise Architect

Macquarie CMT download. Instructions to download information from the Macquarie CMT Your.Clients website

Panorama Offsite Access Prepared for: WRHA Mass Immunization Events

Upgrading Kaltura MediaSpace TM Enterprise 1.0 to Kaltura MediaSpace TM Enterprise 2.0

How to Guide. DocAve Extender for MOSS 2007 and SPS Installing DocAve Extender and Configuring a Basic SharePoint to Cloud Extension

Job Aid for: Secure File Transfer Service (SFTS)

Quick Tips

Transcription:

Deply Yur First Clud Fundry App t Any Clud Fundry Service Prvider cludwrkshp.rg/cludfundry Presenter: Dave Nielsen Clud Cmputing Evangelist @davenielsen May 2015 Dave Nielsen dnielsen@gmail.cm twitter.cm/davenielsen linkedin.cm/in/dnielsen 1

Table f Cntents: 1. ABOUT THIS WORKSHOP... 3 2. TARGET AUDIENCE... 3 3. PRE- REQUISITES... 3 Exercise 1: Deply Hell Clud app... 3 Exercise 2: Deply "Cntact Frm" with a database... 6 2

1. Abut This Wrkshp: This wrkshp will teach anyne with basic IT understanding hw t deply his r her first Clud Fundry Web app. 2. Target Audience: Other than installing sftware and typing cmmands in a terminal, we dn t use any advanced tls, s IT prs, develpers, architects, and prject managers shuld be able t cmplete this wrkshp. 3. Pre-requisites: Fr this wrkshp, yu will need: Yur wn Windws, Mac, r Linux cmputer with internet access A Clud Fundry Service Prvider (CFSP): Pivtal Web Services r IBM Bluemix. Other Clud Fundry service prviders may be used, but these instructins have nt been tested with them: Pivtal Web Services: run.pivtal.i (30-day trial) IBM Bluemix: bluemix.net (30-day trial) Stackat (by ActiveState): activestate.cm/stackat/sandbx (30 day trial) HP Helin Dev Platfrm (cming sn) CenturyLink (cming sn) An e-mail address. Like many free Clud Cmputing services, Clud Fundry service prviders require that yu have a valid e-mail. Nte: Pivtal Web Services als requires that yu prvide an SMS-enabled phne number, t verify that yu are nt a bt. Exercise 1: Deply and Scale the Hell Clud app 1. Prepare yur applicatin: a. Dwnlad (r create) yur first applicatin Yu can dwnlad the Hell Clud app created fr this exercise frm http://cludwrkshp.rg/cludfundry Unzip the hellclud.zip archive int any directry yu want (such as c:/wrkshp (r ~/wrkshp). Navigate t the new hellclud app flder (such as c:/wrkshp/hellclud (r ~/wrkshp/hellclud). Mdify the text in the manifest.yml file as required t deply yur app. Change hst: prperty frm cf-nde-hellclud-dcn t a unique hstname with yur initials. Fr example, yu might change the last three letters t that f yur wn initials, such as xyz (such as cf-nde-hellclud-xyz). 3

Quiz: What happens if yu run this app cde n a server that is nt Clud Fundry? 2. Create yur accunt: a. Sign-up fr yur free trial: Pivtal Web Services, 60-day trial: http://run.pivtal.i IBM Bluemix, 30-day trial: http://bluemix.net b. Check yur e-mail. Click the link t verify yur e-mail address. Pivtal will als require that yu cnfirm yur mbile phne number via SMS text message. c. Create an rg, e.g., mydevteam. Nte: Bluemix will create an rg fr yu based n yur e-mail address. 3. Setup yur develpment space: a. Dwnlad the Clud Fundry CLI: Visit http://github.cm/cludfundry/cli Scrll dwn t the "Dwnlads" sectin f the github page Dwnlad the apprpriate (stable) installer b. Install the Clud Fundry CLI: Fr Windws: Unzip the installer-windws.zip file yu dwnladed abve. Run the cf_installer.exe that was unzipped by the previus step This will create a flder: C:\Prgram Files (x86)\cludfundry Add the C:\Prgram Files (x86)\cludfundry t yur %PATH% variable Open the Cmmand app (cmd.exe) Type the fllwing cmmand t make sure the CLI was installed crrectly: Fr Mac: > cf help Open the Terminal applicatin. Type the fllwing cmmand t make sure the CLI was installed crrectly: $ cf help c. Run the fllwing cmmand t lg int yur Clud Fundry service prvider accunt: > cf lgin -a https://api.run.pivtal.i r > cf lgin -a https://api.ng.bluemix.net When prmpted, enter the e-mail address and passwrd yu used t create yur Clud Fundry Service Prvider accunt. d. Run the fllwing cmmands t see details abut yur rg and space: 4

> cf apps > cf rgs > cf spaces > cf target - [rg] -s [space] example: > cf target - mydevteam -s develpment e. Push yur app (run this cmmand frm within yur hellclud app flder): > cf push f. Run the apps cmmand again and see yur new app listed: > cf apps g. Run the app cmmand t see health and status details abut a specific app: > cf app [app name] example: > cf app hellclud h. Run the scale cmmand t increase the number f instances running yur new app: > cf scale [app name] -i [# f instances] example: > cf scale hellclud i 2 i. Open yur Web brwser t the URL prvided by the utput f the cf push prcess. It shuld lk smething like this: Fr Pivtal Web Services: cf-nde-hellclud-<yur initials>.cfapps.i Fr IBM Bluemix: cf-nde-hellclud-<yur initials>.mybluemix.net j. Open the Web cnsle and view the dashbard fr yur app: See yur app listed within the develper space dashbard. Click n yur app t see the app s dashbard. Click the Plus (+) buttn tw mre times t add a cuple mre instances t yur app. View yur app in the Web brwser again t see the new instances in use. Yu may have t refresh the Web brwser a few times. k. G back t yur terminal and shut dwn yur app: Reduce the number f app instances t ne: > cf scale [app name] -i 1 Then stp yur instance, s yu dn t use up any mre f yur free trial hurs: > cf stp [app name] > cf apps Finally, delete yur instance, s yu dn t take up any space at all > cf delete [app name] 5

> cf apps l. View the lgs and events yu have generated s far: T view Events: > cf events [app name] T view Lgs: > cf lgs [app name] m. View ther infrmatin f interest, such as buildpacks and qutas: > cf buildpacks > cf qutas Exercise 2: Deply Cntact Frm and a Database Service 1. Prepare yur applicatin: a. Dwnlad (r create) yur applicatin (http://www.cludwrkshp.rg/cludfundry/) Unzip it int c:/wrkshp/cntactfrm (r ~/wrkshp/cntactfrm). Navigate int this new app flder. Mdify the surce cde in the manifest.yml file. Change hst prperty frm cf-nde-cntactfrm t a unique hstname. Fr example, yu might add yur wn initials t cntactfrm t create a unique hstname, such as cntactfrm-dcn. b. (Optinal) Setup a runtime envirnment n yur cmputer and test yur app: Install Nde.js: http://ndejs.rg/dwnlad Install MySQL: http://dev.mysql.cm/dwnlads/ Install MySQL Wrkbench: http://dev.mysql.cm/dwnlads/wrkbench/ c. Push yur app: > cf push d. Test yur app: Open yur Web brwser t the URL prvided by the utput f the push cmmand. It shuld lk smething like this: Fr Pivtal Web Services: cf-nde-cntactfrm-dcn.cfapps.i Fr IBM Bluemix: cf-nde-cntactfrm-dcn.mybluemix.net Enter any name, e-mail, and message int the frm fields. Press Enter t submit the Web frm. Yu will see an errr message. Can yu guess why? It s because yu dn t have a database setup fr yur app yet. 6

2. Add a database service t yur applicatin: a. View the list f marketplace services prvided by yur CFSP and add the ClearDB service. ClearDB is a highly available MySQL service which will be used by this cntact frm app. Cmmand line: > cf marketplace > cf marketplace s cleardb Web cnsle: Click Marketplace n the Web cnsle dashbard. b. Add a database service t yur app. There are three ways f cnsuming service instance credentials within yur applicatin: Aut-cnfiguratin, CFRuntime, and manual. We will use the manual prcess. Use the Web Cnsle t bind a ClearDB service t yur app: In yur web brwser, select the Develpment space n the menu n the left side f the screen. Select Add Service. Brwse the different services available. Sme f these may be hsted by yur CFSP, thers may be hsted utside f yur CFSP. Select ClearDB MySQL Database. Click Select this plan t select the free plan. Enter an Instance Name, e.g., cf-nde-cntactfrm-mysql-dcn. Bind the service t the app: Select yur app, e.g., cf-nde-cntactfrm-dcn. Click Add. Use the cmmand line: > cf start cf-nde-cntactfrm > cf create-service cleardb spark cleardb-mine > cf bind-service cf-nde-cntactfrm clear-db-mine c. Find the service variables: In yur terminal windw, type: > cf env [app name] example: > cf env cf-nde-cntactfrm Lk fr the fllwing ClearDB prperties: hstname: username: passwrd: name: 7

Find and replace these prperty values in the server.js file and replace them with the envirnmental variables frm abve: hstname -> hst username -> user passwrd -> passwrd name -> database Use MySQL Wrkbench r any ther tl yu are familiar with t cnnect t yur ClearDB database service. Then create a database table called cntact with the fllwing fields: name varchar(50) email varchar(50) message text(50) 3. Re-pen yur Web brwser t the URL prvided by the utput f the cf push prcess. Use cf app [app name] t view the URL again. Enter yur name, e-mail, and message int the cntact frm. Press Enter t submit the frm. Yu will n lnger see an errr message because yur database nw wrks. Exercise 3: Registratin Frm with e-mail verificatin Cming sn Exercise 4: Registratin Frm with SMS verificatin Cming sn Fr mre infrmatin visit http://cludwrkshp.rg/cludfundry 8