SlideShare a Scribd company logo
1 of 11
Download to read offline
Lab: deploy and update the application by
using the cf CLI
Lab: deploy and update the application by using the cf CLI
2 Copyright IBM Corporation 2016. All rights reserved.
Overview
In this lab, you use the cf command-line interface (CLI) to work with IBM Bluemix. The cf CLI is
a tool that you will use in a terminal or command window on your workstation.
This lab uses the same sample application that was used in the previous lab “Deploy your first
application.”
Prerequisites
You need the following accounts and software:
 An IBM Bluemix account
 Cloud Foundry Command Line Interface (CLI) installed version 6.15 or later
 An Internet Explorer, Firefox, or Chrome web browser
See the prerequisite installation videos at the start of this course for more information.
Lab: deploy and update the application by using the cf CLI
3 Copyright IBM Corporation 2016. All rights reserved.
Step 1. Obtain the application code and deploy to Bluemix
Starting from the Bluemix boilerplate application that you deployed in the first lab, you will
download the application code. Then, you will remove the current application from Bluemix and
re-create it by deploying with the Cloud Foundry CLI tool.
1. Click Getting Started and then click DOWNLOAD STARTER CODE.
2. After the starter package is downloaded, move it to a directory on your workstation
where you want to work, such as the Bluemix directory in your Documents folder.
3. Extract the package by double-clicking or right-clicking and click Extract All or
Unarchive or use a command line tool. Do not delete the ZIP file: you will need it in the
next lab “Working with Eclipse.”
4. Delete the deployed application so that you can deploy it from the command line. Click
the Overview page for the application, click the gear wheel in the application, and then
click Delete App.
Lab: deploy and update the application by using the cf CLI
4 Copyright IBM Corporation 2016. All rights reserved.
5. Confirm that the service or services and the route for the application will be deleted in
the Services tab and the Routes tab. By default, these check boxes are selected:
6. Click Delete to delete the application.
7. Open a command or terminal window and change the directory to the location where you
extracted the downloaded sample application. (The file package.json should be in
your current directory.) Note that the cf CLI tool is not supported in a Cygwin bash shell
on Windows.
8. Log in to Bluemix by issuing one of the following commands. Use the same region that
you used in the Bluemix web UI:
cf l -a https://api.ng.bluemix.net (Region: US South)
cf l -a https://api.eu-gb.bluemix.net (Region: United Kingdom)
cf l -a https://api.au-syd.bluemix.net (Region: Sydney)
Lab: deploy and update the application by using the cf CLI
5 Copyright IBM Corporation 2016. All rights reserved.
9. Enter the email and password that you used to log in to the Bluemix web UI. If prompted,
select the organization and space that you want to work in.
10. Before you deploy the application, create a Cloudant database service instance. View
the available services by running the following command. This command will take a little
while to run because it collects all catalog entries:
cf marketplace
11. In the list of services, find the cloudantNoSQLDB service.
12. Create the service by running this command:
cf cs cloudantNoSQLDB Lite BICloudant
 CloudantNoSQLDB is the name of the service from the cf marketplace command.
 Lite is the name of the service plan that you want to use from the cf
marketplace command.
 BICloudant is the name of the service instance that you want to use. Enter your
own name rather than BICloudant. You will use this new name when connecting
(binding) the service to the application.
13. Refresh your web UI to you see the deployed service.
Lab: deploy and update the application by using the cf CLI
6 Copyright IBM Corporation 2016. All rights reserved.
14. Deploy the application.
Push the application to Bluemix by entering the following command. Change the
application name to your unique name:
cf push bl-workshop-ssl -c "node app.js" -m 128M --no-manifest --
no-start
 bl-workshop-ssl is your unique application name and host name.
 -c specifies the command to start the application.
 -m specifies the amount of memory to allocate to each application instance. The
default is 1 GB.
 --no-manifest instructs to CLI tool to ignore the supplied manifest file. This will
allow the Cloudant database instance that you just created to be linked to the
application.
 --no-start instructs to CLI tool not to automatically start the application.
You don't automatically start the application because it needs a database to run. You
must link the Cloudant database instance to the application before you start the
application. In Cloud Foundry, the action of linking is described as binding the service
instance.
15. Link the database and application by using the following command. Substitute the
application name and service instance names that you used previously:
cf bs bl-workshop-ssl BICloudant
 bl-workshop-ssl is the unique application name used to deploy.
 BICloudant is the service instance name used when the service is deployed.
Lab: deploy and update the application by using the cf CLI
7 Copyright IBM Corporation 2016. All rights reserved.
If you refresh the web UI, you see that the application and service are linked, but the
application is still stopped.
16. Start the application by running the following command. Substitute the name of your
application:
cf start bl-workshop-ssl
 bl-workshop-ssl is the application that you want to start.
If you refresh the web UI, you should see the application running. If not, you can start the
application from the Bluemix Dashboard.
17. Launch the application by clicking the route in the web UI. In this image, the route is bl-
workshop-ssl.mybluemix.net.
Lab: deploy and update the application by using the cf CLI
8 Copyright IBM Corporation 2016. All rights reserved.
Step 2. Modify the application and republish to Bluemix
With the application deployed from your development workstation, you will now make a simple
change to the application and then republish it to Bluemix.
1. In a text editor, open the file app.js and modify the name of the file, the file description,
and the value (lines 344, 345, and 348):
 Line 344: Change the docName from 'sample_doc' to 'test_doc'
 Line 345: Change the docDesc from 'A sample Document' to 'A test
Document'
 Line 348: Change the value from 'A sample Document' to 'A test
Document'
Save the file when you’re finished editing.
When the application starts for the first time, it creates a sample document in the database.
You just modified the code that creates the sample document in the database. Now, you will
delete the document from the database and then restart the application to allow the
database to be populated with the modified document.
Lab: deploy and update the application by using the cf CLI
9 Copyright IBM Corporation 2016. All rights reserved.
2. In the Bluemix web UI, select the Cloudant Service instance.
3. Launch the Cloudant console.
You now see a single database. Select the database by clicking on the name:
Lab: deploy and update the application by using the cf CLI
10 Copyright IBM Corporation 2016. All rights reserved.
4. Edit the database document by clicking the pencil icon:
5. Delete the document by clicking trash icon.
6. Confirm the deletion when prompted.
7. Redeploy the updated application with the push command. This time, you don’t need to
include the --no-start or -m parameters.
cf push bl-workshop-ssl -c "node app.js" --no-manifest
8. After the application is restarted, test it to ensure that your changes are now running.
Lab: deploy and update the application by using the cf CLI
11 Copyright IBM Corporation 2016. All rights reserved.
After the application is tested to confirm that the modified code is running, you can delete
the application to release resources for the next lab.
9. Delete the application and service and confirm the deletion by running the following two
commands:
Delete the application: cf d bl-workshop-ssl –r
 bl-workshop-ssl is the application name to be deleted.
 -r instructs Bluemix to also delete the routes attached to the application.
Delete the service: cf ds BICloudant
 BICloudant is the name of the service instance to be deleted.
Confirm that the application and service were deleted by checking the dashboard in the
Bluemix web UI.
Summary
In this lab, you learned how to use the Cloud Foundry CLI tool to manage an application
including deployment, binding application services, and deleting the application.

More Related Content

What's hot

ASP.NET 4.0
ASP.NET 4.0ASP.NET 4.0
ASP.NET 4.0XeDotNet
 
Flash, actionscript 2 : preloader for loader component.pdf
Flash, actionscript 2 : preloader for loader component.pdfFlash, actionscript 2 : preloader for loader component.pdf
Flash, actionscript 2 : preloader for loader component.pdfSMK Negeri 6 Malang
 
LoadUI web performance testing tool
LoadUI web performance testing toolLoadUI web performance testing tool
LoadUI web performance testing toolMilind Rupchandani
 
MAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR applicationMAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR applicationrtretola
 
Build,Run and manage MobileFirst apps with Eclipse
Build,Run and manage MobileFirst apps with EclipseBuild,Run and manage MobileFirst apps with Eclipse
Build,Run and manage MobileFirst apps with EclipseVidyasagar Machupalli
 
Flash, actionscript 2 : preloader for loader component.docx
Flash, actionscript 2 : preloader for loader component.docxFlash, actionscript 2 : preloader for loader component.docx
Flash, actionscript 2 : preloader for loader component.docxSMK Negeri 6 Malang
 
Apex code-fundamentals
Apex code-fundamentalsApex code-fundamentals
Apex code-fundamentalsAmit Sharma
 
Introduce anypoint studio
Introduce anypoint studioIntroduce anypoint studio
Introduce anypoint studioSon Nguyen
 
Configuring an application_server_in_eclipse
Configuring an application_server_in_eclipseConfiguring an application_server_in_eclipse
Configuring an application_server_in_eclipseSupratim Ray
 
Mule legacy modernization example
Mule legacy modernization exampleMule legacy modernization example
Mule legacy modernization exampleD.Rajesh Kumar
 
Software Testing presentation
Software Testing presentationSoftware Testing presentation
Software Testing presentationRazia Sultana
 
M365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx VersionM365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx VersionThomas Daly
 
Have upload steps slides
Have upload steps slidesHave upload steps slides
Have upload steps slidesthe BrokerList
 
Containers Lab
Containers Lab Containers Lab
Containers Lab Dev_Events
 
Integration with CMIS using Mule ESB
Integration with CMIS using Mule ESBIntegration with CMIS using Mule ESB
Integration with CMIS using Mule ESBSanjeet Pandey
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopmentgillygize
 
DotNet Cologne 2015 - Windows 10 AppDev, Teil2: Coole APIs - (Daniel Meixner)
DotNet Cologne 2015 - Windows 10 AppDev, Teil2: Coole APIs - (Daniel Meixner)DotNet Cologne 2015 - Windows 10 AppDev, Teil2: Coole APIs - (Daniel Meixner)
DotNet Cologne 2015 - Windows 10 AppDev, Teil2: Coole APIs - (Daniel Meixner)Daniel Meixner
 
Configuring Anypoint Studio MQ connector
Configuring Anypoint Studio MQ connectorConfiguring Anypoint Studio MQ connector
Configuring Anypoint Studio MQ connectorShanky Gupta
 

What's hot (20)

ASP.NET 4.0
ASP.NET 4.0ASP.NET 4.0
ASP.NET 4.0
 
Flash, actionscript 2 : preloader for loader component.pdf
Flash, actionscript 2 : preloader for loader component.pdfFlash, actionscript 2 : preloader for loader component.pdf
Flash, actionscript 2 : preloader for loader component.pdf
 
LoadUI web performance testing tool
LoadUI web performance testing toolLoadUI web performance testing tool
LoadUI web performance testing tool
 
MAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR applicationMAX 2008 - Building your 1st AIR application
MAX 2008 - Building your 1st AIR application
 
Build,Run and manage MobileFirst apps with Eclipse
Build,Run and manage MobileFirst apps with EclipseBuild,Run and manage MobileFirst apps with Eclipse
Build,Run and manage MobileFirst apps with Eclipse
 
Flash, actionscript 2 : preloader for loader component.docx
Flash, actionscript 2 : preloader for loader component.docxFlash, actionscript 2 : preloader for loader component.docx
Flash, actionscript 2 : preloader for loader component.docx
 
Apex code-fundamentals
Apex code-fundamentalsApex code-fundamentals
Apex code-fundamentals
 
Introduce anypoint studio
Introduce anypoint studioIntroduce anypoint studio
Introduce anypoint studio
 
Configuring an application_server_in_eclipse
Configuring an application_server_in_eclipseConfiguring an application_server_in_eclipse
Configuring an application_server_in_eclipse
 
Mule legacy modernization example
Mule legacy modernization exampleMule legacy modernization example
Mule legacy modernization example
 
Software Testing presentation
Software Testing presentationSoftware Testing presentation
Software Testing presentation
 
Testing soap UI
Testing soap UITesting soap UI
Testing soap UI
 
M365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx VersionM365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx Version
 
Have upload steps slides
Have upload steps slidesHave upload steps slides
Have upload steps slides
 
Containers Lab
Containers Lab Containers Lab
Containers Lab
 
Integration with CMIS using Mule ESB
Integration with CMIS using Mule ESBIntegration with CMIS using Mule ESB
Integration with CMIS using Mule ESB
 
State ofappdevelopment
State ofappdevelopmentState ofappdevelopment
State ofappdevelopment
 
DotNet Cologne 2015 - Windows 10 AppDev, Teil2: Coole APIs - (Daniel Meixner)
DotNet Cologne 2015 - Windows 10 AppDev, Teil2: Coole APIs - (Daniel Meixner)DotNet Cologne 2015 - Windows 10 AppDev, Teil2: Coole APIs - (Daniel Meixner)
DotNet Cologne 2015 - Windows 10 AppDev, Teil2: Coole APIs - (Daniel Meixner)
 
Calabash-iOS
Calabash-iOSCalabash-iOS
Calabash-iOS
 
Configuring Anypoint Studio MQ connector
Configuring Anypoint Studio MQ connectorConfiguring Anypoint Studio MQ connector
Configuring Anypoint Studio MQ connector
 

Similar to Dvwkbm lab2 cli1

Intro to IBM Bluemix DevOps Services, a Workshop with a Cloudant twist
Intro to IBM Bluemix DevOps Services, a Workshop with a Cloudant twistIntro to IBM Bluemix DevOps Services, a Workshop with a Cloudant twist
Intro to IBM Bluemix DevOps Services, a Workshop with a Cloudant twistLauren Hayward Schaefer
 
Get over the Cloud with Bluemix
Get over the Cloud with BluemixGet over the Cloud with Bluemix
Get over the Cloud with BluemixCodemotion
 
Creating Sentiment Line Chart with Watson
Creating Sentiment Line Chart with Watson Creating Sentiment Line Chart with Watson
Creating Sentiment Line Chart with Watson Dev_Events
 
Bluemix and DevOps workshop lab
Bluemix and DevOps workshop labBluemix and DevOps workshop lab
Bluemix and DevOps workshop labbenm4nn
 
IBM Bluemix cloudfoundry platform
IBM Bluemix cloudfoundry platformIBM Bluemix cloudfoundry platform
IBM Bluemix cloudfoundry platformDaniela Zuppini
 
Intro to IBM Bluemix DevOps Services, an open lab for IBM InterConnect
Intro to IBM Bluemix DevOps Services, an open lab for IBM InterConnectIntro to IBM Bluemix DevOps Services, an open lab for IBM InterConnect
Intro to IBM Bluemix DevOps Services, an open lab for IBM InterConnectLauren Hayward Schaefer
 
Create a Profitable News App using Ionic 4 and Angular
Create a Profitable News App using Ionic 4 and Angular								Create a Profitable News App using Ionic 4 and Angular
Create a Profitable News App using Ionic 4 and Angular Shelly Megan
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 serversMark Myers
 
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0Haytham Ghandour
 
Miracle mulesoft tech_cloud_hub
Miracle mulesoft tech_cloud_hubMiracle mulesoft tech_cloud_hub
Miracle mulesoft tech_cloud_hubkishore ippili
 
Achieving Developer Nirvana With Codename: BlueMix
Achieving Developer Nirvana With Codename: BlueMixAchieving Developer Nirvana With Codename: BlueMix
Achieving Developer Nirvana With Codename: BlueMixRyan Baxter
 
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsAngular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsDigamber Singh
 
Part 1 implementing a simple_web_service
Part 1 implementing a simple_web_servicePart 1 implementing a simple_web_service
Part 1 implementing a simple_web_servicekrishmdkk
 
IBM Bluemix hands on
IBM Bluemix hands onIBM Bluemix hands on
IBM Bluemix hands onFelipe Freire
 
Deploying mule applications
Deploying mule applicationsDeploying mule applications
Deploying mule applicationsBhargav Ranjit
 
IBM MobileFirst Platform v7.0 POT App Mgmt Lab v1.1
IBM MobileFirst Platform  v7.0 POT App Mgmt Lab v1.1IBM MobileFirst Platform  v7.0 POT App Mgmt Lab v1.1
IBM MobileFirst Platform v7.0 POT App Mgmt Lab v1.1Banking at Ho Chi Minh city
 
Windows Phone Workshop: WCF services
Windows Phone Workshop: WCF services Windows Phone Workshop: WCF services
Windows Phone Workshop: WCF services Zayen Chagra
 

Similar to Dvwkbm lab2 cli1 (20)

Intro to IBM Bluemix DevOps Services, a Workshop with a Cloudant twist
Intro to IBM Bluemix DevOps Services, a Workshop with a Cloudant twistIntro to IBM Bluemix DevOps Services, a Workshop with a Cloudant twist
Intro to IBM Bluemix DevOps Services, a Workshop with a Cloudant twist
 
Get over the Cloud with Bluemix
Get over the Cloud with BluemixGet over the Cloud with Bluemix
Get over the Cloud with Bluemix
 
Creating Sentiment Line Chart with Watson
Creating Sentiment Line Chart with Watson Creating Sentiment Line Chart with Watson
Creating Sentiment Line Chart with Watson
 
Bluemix and DevOps workshop lab
Bluemix and DevOps workshop labBluemix and DevOps workshop lab
Bluemix and DevOps workshop lab
 
IBM Bluemix cloudfoundry platform
IBM Bluemix cloudfoundry platformIBM Bluemix cloudfoundry platform
IBM Bluemix cloudfoundry platform
 
5 pcf
5 pcf5 pcf
5 pcf
 
Intro to IBM Bluemix DevOps Services, an open lab for IBM InterConnect
Intro to IBM Bluemix DevOps Services, an open lab for IBM InterConnectIntro to IBM Bluemix DevOps Services, an open lab for IBM InterConnect
Intro to IBM Bluemix DevOps Services, an open lab for IBM InterConnect
 
Create a Profitable News App using Ionic 4 and Angular
Create a Profitable News App using Ionic 4 and Angular								Create a Profitable News App using Ionic 4 and Angular
Create a Profitable News App using Ionic 4 and Angular
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 servers
 
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
EMC Documentum xCP 2.2 Self Paced Tutorial v1.0
 
Homestead demo
Homestead demoHomestead demo
Homestead demo
 
Miracle mulesoft tech_cloud_hub
Miracle mulesoft tech_cloud_hubMiracle mulesoft tech_cloud_hub
Miracle mulesoft tech_cloud_hub
 
Achieving Developer Nirvana With Codename: BlueMix
Achieving Developer Nirvana With Codename: BlueMixAchieving Developer Nirvana With Codename: BlueMix
Achieving Developer Nirvana With Codename: BlueMix
 
web application.pptx
web application.pptxweb application.pptx
web application.pptx
 
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive FormsAngular 7 Firebase5 CRUD Operations with Reactive Forms
Angular 7 Firebase5 CRUD Operations with Reactive Forms
 
Part 1 implementing a simple_web_service
Part 1 implementing a simple_web_servicePart 1 implementing a simple_web_service
Part 1 implementing a simple_web_service
 
IBM Bluemix hands on
IBM Bluemix hands onIBM Bluemix hands on
IBM Bluemix hands on
 
Deploying mule applications
Deploying mule applicationsDeploying mule applications
Deploying mule applications
 
IBM MobileFirst Platform v7.0 POT App Mgmt Lab v1.1
IBM MobileFirst Platform  v7.0 POT App Mgmt Lab v1.1IBM MobileFirst Platform  v7.0 POT App Mgmt Lab v1.1
IBM MobileFirst Platform v7.0 POT App Mgmt Lab v1.1
 
Windows Phone Workshop: WCF services
Windows Phone Workshop: WCF services Windows Phone Workshop: WCF services
Windows Phone Workshop: WCF services
 

More from Saranga Tripathy

Multi platform application deployment with urban code deploy
Multi platform application deployment with urban code deployMulti platform application deployment with urban code deploy
Multi platform application deployment with urban code deploySaranga Tripathy
 
Ibm mobile first platform presentation refresh 05 18-mc
Ibm mobile first platform presentation refresh 05 18-mcIbm mobile first platform presentation refresh 05 18-mc
Ibm mobile first platform presentation refresh 05 18-mcSaranga Tripathy
 
Devops single slide for usecase and customer benifits
Devops single slide for usecase and customer benifitsDevops single slide for usecase and customer benifits
Devops single slide for usecase and customer benifitsSaranga Tripathy
 

More from Saranga Tripathy (6)

Ibm rtw
Ibm rtwIbm rtw
Ibm rtw
 
Multi platform application deployment with urban code deploy
Multi platform application deployment with urban code deployMulti platform application deployment with urban code deploy
Multi platform application deployment with urban code deploy
 
Ibm mobile first platform presentation refresh 05 18-mc
Ibm mobile first platform presentation refresh 05 18-mcIbm mobile first platform presentation refresh 05 18-mc
Ibm mobile first platform presentation refresh 05 18-mc
 
Devops single slide for usecase and customer benifits
Devops single slide for usecase and customer benifitsDevops single slide for usecase and customer benifits
Devops single slide for usecase and customer benifits
 
7 cc 5fa-31a
7 cc 5fa-31a7 cc 5fa-31a
7 cc 5fa-31a
 
47 b 9e3-b98
47 b 9e3-b9847 b 9e3-b98
47 b 9e3-b98
 

Recently uploaded

Call Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any TimeCall Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any Timedelhimodelshub1
 
rishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfrishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfmuskan1121w
 
BEST Call Girls In BELLMONT HOTEL ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In BELLMONT HOTEL ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In BELLMONT HOTEL ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In BELLMONT HOTEL ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,noida100girls
 
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...lizamodels9
 
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdf
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdfCatalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdf
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdfOrient Homes
 
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCRsoniya singh
 
NewBase 22 April 2024 Energy News issue - 1718 by Khaled Al Awadi (AutoRe...
NewBase  22 April  2024  Energy News issue - 1718 by Khaled Al Awadi  (AutoRe...NewBase  22 April  2024  Energy News issue - 1718 by Khaled Al Awadi  (AutoRe...
NewBase 22 April 2024 Energy News issue - 1718 by Khaled Al Awadi (AutoRe...Khaled Al Awadi
 
Marketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet CreationsMarketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet Creationsnakalysalcedo61
 
Case study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detailCase study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detailAriel592675
 
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCRsoniya singh
 
A.I. Bot Summit 3 Opening Keynote - Perry Belcher
A.I. Bot Summit 3 Opening Keynote - Perry BelcherA.I. Bot Summit 3 Opening Keynote - Perry Belcher
A.I. Bot Summit 3 Opening Keynote - Perry BelcherPerry Belcher
 
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...lizamodels9
 
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...lizamodels9
 
Pitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deckPitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deckHajeJanKamps
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfpollardmorgan
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024christinemoorman
 
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,noida100girls
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...lizamodels9
 

Recently uploaded (20)

Call Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any TimeCall Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any Time
 
rishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfrishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdf
 
BEST Call Girls In BELLMONT HOTEL ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In BELLMONT HOTEL ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In BELLMONT HOTEL ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In BELLMONT HOTEL ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
 
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
 
KestrelPro Flyer Japan IT Week 2024 (English)
KestrelPro Flyer Japan IT Week 2024 (English)KestrelPro Flyer Japan IT Week 2024 (English)
KestrelPro Flyer Japan IT Week 2024 (English)
 
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdf
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdfCatalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdf
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdf
 
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR
 
NewBase 22 April 2024 Energy News issue - 1718 by Khaled Al Awadi (AutoRe...
NewBase  22 April  2024  Energy News issue - 1718 by Khaled Al Awadi  (AutoRe...NewBase  22 April  2024  Energy News issue - 1718 by Khaled Al Awadi  (AutoRe...
NewBase 22 April 2024 Energy News issue - 1718 by Khaled Al Awadi (AutoRe...
 
Marketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet CreationsMarketing Management Business Plan_My Sweet Creations
Marketing Management Business Plan_My Sweet Creations
 
Case study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detailCase study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detail
 
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
 
A.I. Bot Summit 3 Opening Keynote - Perry Belcher
A.I. Bot Summit 3 Opening Keynote - Perry BelcherA.I. Bot Summit 3 Opening Keynote - Perry Belcher
A.I. Bot Summit 3 Opening Keynote - Perry Belcher
 
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
 
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
 
Pitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deckPitch Deck Teardown: NOQX's $200k Pre-seed deck
Pitch Deck Teardown: NOQX's $200k Pre-seed deck
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024
 
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
 

Dvwkbm lab2 cli1

  • 1. Lab: deploy and update the application by using the cf CLI
  • 2. Lab: deploy and update the application by using the cf CLI 2 Copyright IBM Corporation 2016. All rights reserved. Overview In this lab, you use the cf command-line interface (CLI) to work with IBM Bluemix. The cf CLI is a tool that you will use in a terminal or command window on your workstation. This lab uses the same sample application that was used in the previous lab “Deploy your first application.” Prerequisites You need the following accounts and software:  An IBM Bluemix account  Cloud Foundry Command Line Interface (CLI) installed version 6.15 or later  An Internet Explorer, Firefox, or Chrome web browser See the prerequisite installation videos at the start of this course for more information.
  • 3. Lab: deploy and update the application by using the cf CLI 3 Copyright IBM Corporation 2016. All rights reserved. Step 1. Obtain the application code and deploy to Bluemix Starting from the Bluemix boilerplate application that you deployed in the first lab, you will download the application code. Then, you will remove the current application from Bluemix and re-create it by deploying with the Cloud Foundry CLI tool. 1. Click Getting Started and then click DOWNLOAD STARTER CODE. 2. After the starter package is downloaded, move it to a directory on your workstation where you want to work, such as the Bluemix directory in your Documents folder. 3. Extract the package by double-clicking or right-clicking and click Extract All or Unarchive or use a command line tool. Do not delete the ZIP file: you will need it in the next lab “Working with Eclipse.” 4. Delete the deployed application so that you can deploy it from the command line. Click the Overview page for the application, click the gear wheel in the application, and then click Delete App.
  • 4. Lab: deploy and update the application by using the cf CLI 4 Copyright IBM Corporation 2016. All rights reserved. 5. Confirm that the service or services and the route for the application will be deleted in the Services tab and the Routes tab. By default, these check boxes are selected: 6. Click Delete to delete the application. 7. Open a command or terminal window and change the directory to the location where you extracted the downloaded sample application. (The file package.json should be in your current directory.) Note that the cf CLI tool is not supported in a Cygwin bash shell on Windows. 8. Log in to Bluemix by issuing one of the following commands. Use the same region that you used in the Bluemix web UI: cf l -a https://api.ng.bluemix.net (Region: US South) cf l -a https://api.eu-gb.bluemix.net (Region: United Kingdom) cf l -a https://api.au-syd.bluemix.net (Region: Sydney)
  • 5. Lab: deploy and update the application by using the cf CLI 5 Copyright IBM Corporation 2016. All rights reserved. 9. Enter the email and password that you used to log in to the Bluemix web UI. If prompted, select the organization and space that you want to work in. 10. Before you deploy the application, create a Cloudant database service instance. View the available services by running the following command. This command will take a little while to run because it collects all catalog entries: cf marketplace 11. In the list of services, find the cloudantNoSQLDB service. 12. Create the service by running this command: cf cs cloudantNoSQLDB Lite BICloudant  CloudantNoSQLDB is the name of the service from the cf marketplace command.  Lite is the name of the service plan that you want to use from the cf marketplace command.  BICloudant is the name of the service instance that you want to use. Enter your own name rather than BICloudant. You will use this new name when connecting (binding) the service to the application. 13. Refresh your web UI to you see the deployed service.
  • 6. Lab: deploy and update the application by using the cf CLI 6 Copyright IBM Corporation 2016. All rights reserved. 14. Deploy the application. Push the application to Bluemix by entering the following command. Change the application name to your unique name: cf push bl-workshop-ssl -c "node app.js" -m 128M --no-manifest -- no-start  bl-workshop-ssl is your unique application name and host name.  -c specifies the command to start the application.  -m specifies the amount of memory to allocate to each application instance. The default is 1 GB.  --no-manifest instructs to CLI tool to ignore the supplied manifest file. This will allow the Cloudant database instance that you just created to be linked to the application.  --no-start instructs to CLI tool not to automatically start the application. You don't automatically start the application because it needs a database to run. You must link the Cloudant database instance to the application before you start the application. In Cloud Foundry, the action of linking is described as binding the service instance. 15. Link the database and application by using the following command. Substitute the application name and service instance names that you used previously: cf bs bl-workshop-ssl BICloudant  bl-workshop-ssl is the unique application name used to deploy.  BICloudant is the service instance name used when the service is deployed.
  • 7. Lab: deploy and update the application by using the cf CLI 7 Copyright IBM Corporation 2016. All rights reserved. If you refresh the web UI, you see that the application and service are linked, but the application is still stopped. 16. Start the application by running the following command. Substitute the name of your application: cf start bl-workshop-ssl  bl-workshop-ssl is the application that you want to start. If you refresh the web UI, you should see the application running. If not, you can start the application from the Bluemix Dashboard. 17. Launch the application by clicking the route in the web UI. In this image, the route is bl- workshop-ssl.mybluemix.net.
  • 8. Lab: deploy and update the application by using the cf CLI 8 Copyright IBM Corporation 2016. All rights reserved. Step 2. Modify the application and republish to Bluemix With the application deployed from your development workstation, you will now make a simple change to the application and then republish it to Bluemix. 1. In a text editor, open the file app.js and modify the name of the file, the file description, and the value (lines 344, 345, and 348):  Line 344: Change the docName from 'sample_doc' to 'test_doc'  Line 345: Change the docDesc from 'A sample Document' to 'A test Document'  Line 348: Change the value from 'A sample Document' to 'A test Document' Save the file when you’re finished editing. When the application starts for the first time, it creates a sample document in the database. You just modified the code that creates the sample document in the database. Now, you will delete the document from the database and then restart the application to allow the database to be populated with the modified document.
  • 9. Lab: deploy and update the application by using the cf CLI 9 Copyright IBM Corporation 2016. All rights reserved. 2. In the Bluemix web UI, select the Cloudant Service instance. 3. Launch the Cloudant console. You now see a single database. Select the database by clicking on the name:
  • 10. Lab: deploy and update the application by using the cf CLI 10 Copyright IBM Corporation 2016. All rights reserved. 4. Edit the database document by clicking the pencil icon: 5. Delete the document by clicking trash icon. 6. Confirm the deletion when prompted. 7. Redeploy the updated application with the push command. This time, you don’t need to include the --no-start or -m parameters. cf push bl-workshop-ssl -c "node app.js" --no-manifest 8. After the application is restarted, test it to ensure that your changes are now running.
  • 11. Lab: deploy and update the application by using the cf CLI 11 Copyright IBM Corporation 2016. All rights reserved. After the application is tested to confirm that the modified code is running, you can delete the application to release resources for the next lab. 9. Delete the application and service and confirm the deletion by running the following two commands: Delete the application: cf d bl-workshop-ssl –r  bl-workshop-ssl is the application name to be deleted.  -r instructs Bluemix to also delete the routes attached to the application. Delete the service: cf ds BICloudant  BICloudant is the name of the service instance to be deleted. Confirm that the application and service were deleted by checking the dashboard in the Bluemix web UI. Summary In this lab, you learned how to use the Cloud Foundry CLI tool to manage an application including deployment, binding application services, and deleting the application.