Learning IBM Bluemix - Sreelatha Sankaranarayanan - E-Book

Learning IBM Bluemix E-Book

Sreelatha Sankaranarayanan

0,0
41,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Demystify application development on cloud platform by leveraging the power of IBM Bluemix

About This Book

  • The first book in the market that discusses the power of IBM Bluemix
  • Shows developers how to develop and deploy applications on the cloud platform using IBM Bluemix
  • A comprehensive guide to help you get started with IBM Bluemix also featuring samples applications

Who This Book Is For

This book is aimed at developers seeking to learn application development and deployment methods on IBM Bluemix. A basic knowledge of Java and Node.js is assumed.

What You Will Learn

  • Discover IBM Bluemix as a PaaS platform and learn about its three delivery models
  • Develop and deploy a "Hello World" application on IBM Bluemix using the Cloud Foundry command line utility and the Bluemix console
  • Extend your application by using the API or services provided by IBM Bluemix
  • Understand microservices architecture and learn how to develop a sample application based on microservices architecture, using IBM Bluemix
  • Learn how to leverage on-premise software and build an application on IBM Bluemix
  • Scale and monitor an application on IBM Bluemix
  • Explore the compute options on IBM Bluemix and work with each of them
  • Build a mobile client application using Mobile services on IBM Bluemix

In Detail

IBM Bluemix is an open standard platform for building, running, and managing applications on the cloud. With Bluemix, developers can build innovative applications using various compute options and value added services , developers can also manage the application lifecycle using the platform provided DevOps services.

Learning IBM Bluemix will take you on a journey from the basics of IBM Bluemix to working with the platform to developing and deploying of modern applications. The sample application use cases employed in the book will introduce you to the transformative nexus of cloud, mobile, and security, all enabled through capabilities provided out-of-the-box by IBM Bluemix.

By the end of the book, you will have understood the benefits and use cases for IBM Bluemix, and will possess the skills to further explore the platform and thus develop, deploy, and secure your own innovative, new-age applications.

Style and approach

This comprehensive, step-by-step guide to learning IBM Bluemix will cover everything that is required to build, deploy, manage, and secure an application on the cloud.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 208

Veröffentlichungsjahr: 2016

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Learning IBM Bluemix
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book 
Errata
Piracy
Questions
1. Saying Hello to IBM Bluemix
Understanding cloud service delivery models
Getting a step closer to understanding IBM Bluemix
Understanding the Bluemix architecture
Familiarizing yourself with Bluemix deployment models
Public Bluemix
Dedicated Bluemix
Local Bluemix
Getting an account on public Bluemix
Understanding the Bluemix dashboard
Key dashboard or Bluemix UI concepts
Account details
Organization
Managing your organization
Space
Creating your own Space
Managing your Space
Region
Summary
2. Building and Deploying Your First Application on IBM Bluemix
Cloud Foundry command line utility
Installing the Cloud Foundry command-line utility
Log in to Bluemix using cf cli
Log in to your Bluemix account
Building your first Hello World application and deploying it on Bluemix
Understanding some more Bluemix concepts
Creating your Hello World application on Bluemix using a boilerplate
Updating your application on Bluemix
Downloading the source files for your starter or Hello World application
Summary
3. Extending an Application and Configuring for Continuous Delivery Using DevOps Services
DevOps services and the delivery pipeline
Configuring the delivery pipeline for your application
Creating the sample application
Learning to wire applications using Node-RED
The ibmiot node
The debug node
The function node
The switch node
The template node
Configuring continuous delivery for your application
Editing the source using a web editor
Extending the application
Summary
4. Leveraging On-Premise Software for Applications on Bluemix
Services under the Integrate category
Creating an application on Bluemix
Wiring and configuring the flow
Downloading and installing MongoDB
Starting the MongoDB daemon and working with MongoDB
Creating the Secure Gateway service instance
Configuring the Secure Gateway service instance
Summary
5. Scaling Applications in Bluemix
Overview of scaling types supported in Bluemix
Vertical scaling
Horizontal scaling
Creating an application to scale on Bluemix
Configuring a load test for your application
Creating the BlazeMeter service instance
Creating the load test
Manually scaling your application
Scaling your application using the Auto-Scaling service in Bluemix
Creating the Auto-Scaling service instance
Binding the Auto-Scaling service instance to your application
Defining the scaling policy for your application
Summary
6. Monitoring and Management in Bluemix
Overview of monitoring and management services in Bluemix
Monitoring and Analytics service
Creating the Monitoring and Analytics service instance
Simulating events in your application
New Relic service
Creating the New Relic service instance
Binding the New Relic service to your application
Configuring the application to send events to the New Relic service
Simulating events in your application
Viewing reports in the New Relic dashboard for your monitored application
Summary
7. Compute Options on Bluemix
Cloud Foundry applications
Working with the eclipse plugin for Bluemix
Installing the eclipse plugin for Bluemix
Importing your Cloud Foundry application to Eclipse
Updating your application in Eclipse
Deploying updates to Bluemix using the Eclipse plugin
Containers
Creating an IBM Container with an existing image
Before you begin
Installing Docker
Installing Cloud Foundry CLI
Installing the IBM Containers Cloud Foundry plugin
Creating a container using the Bluemix dashboard
Working with the CF plugin for IBM Containers
Virtual servers
OpenWhisk
Installing the OpenWhisk CLI
Creating the trigger source for our demonstration
Creating an action
Creating a rule
Testing a rule
Summary
8. Security Services on Bluemix
Overview of the security services in the Bluemix catalog
Access Trail security service
Creating the Access Trail service instance
Working with the Access Trail service
Single Sign On security service
Creating a Single Sign On service instance
Configuring the identity sources in Single Sign On
Configuring the cloud directory
Configuring LinkedIn as an identity source
Configuring Google+ as an identity source
Create an application which will use the Single Sign On authentication service
Modify the sample application to enable the use of the Single Sign On service
Integrating the Single Sign On service with your application
Seeing it all work together
Summary
9. Microservices-based Application Development on Bluemix
Understanding the microservices architecture pattern
Developing a microservices-based application on Bluemix
Microservice 1
Microservice 3
Microservice 2
Wiring and configuring the flow
Seeing it all work together
Summary
10. Mobile Application Development on Bluemix
Mobile category services
Creating a mobile application
Creating a mobile project
Running the application on an Android emulator
Integrating Push Notifications to the application
Creating the Push Notifications service instance
Configuring the Push Notifications service instance
Integrating the Push Notifications service with an application
Sending Push Notifications to your application
Summary

Learning IBM Bluemix

Learning IBM Bluemix

Copyright © 2016 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: October 2016

Production reference: 1171016

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78588-774-1

www.packtpub.com

Credits

Authors

Sreelatha Sankaranarayanan

Copy Editor

Safis Editing

Reviewers

Mohan P Annamalai

Project Coordinator

Izzat Contractor

Commissioning Editor

Pratik Shah

Proofreader

Safis Editing

Acquisition Editor

Nitin Dasan

Indexer

Tejal Daruwale Soni

Content Development Editor

Priyanka Mehta

Production Coordinator

Shraddha Falebhai

Technical Editors

Dhiraj Chandanshive

Cover Work

Shraddha Falebhai

About the Author

Sreelatha Sankaranarayanan has close to 16 years of experience in software engineering. She has been with Phoenix Global Solutions (now Tata Consultancy Services) for close to 2.5 years. She is currently with IBM India and has been with them for the last 13.5 years. During her career, she has been part of product development, support, and test teams, primarily working on enterprise middleware products. In her most recent role, she was responsible for evangelizing IBM's cloud platform as-a-service, Bluemix, and has worked with System Integrators, academia, and IBM partners to enable and support them with the adoption of IBM's cloud platform as-a-service, Bluemix. She has coauthored a redbook entitled B2B Solutions using WebSphere Partner Gateway v6.0, authored some developerWorks articles, and some blog posts on the Mobile Enterprise Application Platform (MEAP), Internet of Things (IoT), and cloud platform as-a-service (Bluemix). You can find her on Twitter at  @sreelathas and on LinkedIn at https://in.linkedin.com/in/sreelathas.

I thank Packt Publishing and Nitin Dasan for providing me with the opportunity and support to author this book. Special mention to the editorial reviewer, Priyanka Mehta, and the technical reviewer, Mohan P Annamalai (IBM), who have worked to refine each of the chapters in this book. We hope that you enjoy and learn as much as we, as author and reviewers, have enjoyed and learned putting this book together.

About the Reviewer

Mohan P Annamalai is a senior manager at IBM India Private Ltd, with 16 years of experience in the IT industry. He is currently responsible for driving the development efforts for Mobile Foundation Service on Bluemix. Prior to this, he successfully managed the efforts for setting up the IBM Push Notifications service on Bluemix. He was also responsible for driving IBM Bluemix eco system from India Software Labs in the year 2014. In this role, he worked with key IBM system integrators to gain interest on Bluemix. In his role as the IBM Bluemix program manager, he played a pivotal role in gaining mind share for IBM Bluemix among the developers and students in India. Apart from mobile and cloud, Mohan led the delivery of the analytics service component to power analytics in couple of key IBM solutions. He has also worked for Satyam Computer Services Limited. He started his career as a J2EE developer in connectivity and integration products and became a development manager in the same space.

www.PacktPub.com

For support files and downloads related to your book, please visit www.PacktPub.com.

eBooks, discount offers, and more

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.

At www.PacktPub.com , you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

https://www.packtpub.com/mapt

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?

Fully searchable across every book published by PacktCopy and paste, print, and bookmark contentOn demand and accessible via a web browser

Free access for Packt account holders

Get notified! Find out when new books are published by following @PacktEnterprise on Twitter or the Packt Enterprise Facebook page.

Preface

Cloud computing is an important transformative force defining the technology landscape today. Cloud computing has changed the way technology can be built and used for business, industry, governance, academia, and the like. Cloud technology is also considered as a key enabler to building innovations that define newer markets. Given the importance and relevance of this space, it is but natural to consider talking about one such cloud platform called Bluemix, which is a platform as-a-service (PaaS) offering from IBM.

This book is an attempt to compile illustrative descriptions for the different capabilities offered by Bluemix. The intended audience for this book is developers who are relatively new to the space of application development on a platform as-a-service environment. This book also serves to jumpstart developers who want to learn and use IBM Bluemix.

This book gives you the levers to understand Bluemix as a platform, learn how to use the value-added services on Bluemix, understand how to build, manage, and monitor applications on Bluemix, discover the options of deployment on Bluemix, and above all, witness the ease and the innovative approach to discover and cater to different types of use cases solving problems in varied categories.

This book is written in a simple, appealing, explanatory format with sufficient visual aids in the form of screenshots so that it is easy to follow even for those of you who are not very technical. As the author of this book, I am certain that you will experience a learning that you can build upon later; you will find that this provides an apt landing platform from where you are equipped to take the plunge.

What this book covers

Chapter 1, Saying Hello to IBM Bluemix, covers cloud computing and cloud service delivery models, and then lets us take a look at what Bluemix is. It also covers the different ways in which the platform is offered, along with an introduction to the IBM Bluemix public offering.

Chapter 2, Building and Deploying Your First Hello World Application on Bluemix, introduces you to application building on IBM Bluemix. You will learn how to build a simple application on Bluemix and deploy and run it.

Chapter 3, Extending an Application and Configuring for Continuous Delivery Using DevOps Services, teaches you how to extend existing applications on Bluemix to build additional functionality using some of the value-added services on Bluemix; this is illustrated along with a sample application.

Chapter 4, Leveraging On-Premise Software for Applications on Bluemix, demonstrates a very important aspect of modern application building environment, called hybrid cloud. We will see how on-premise or local software or applications can be leveraged to integrate with newer applications that are to be deployed on public cloud infrastructure.

Chapter 5, Scaling Applications in Bluemix, introduces you to application scaling. You will learn about the scaling options supported on Bluemix: manual and auto-scaling.

Chapter 6, Monitoring and Management in Bluemix, discusses the different services that can be used to monitor and manage applications. You will learn to work with the Monitoring and Analytics service for a web application deployed on Bluemix. Additionally, the chapter introduces readers to NewRelic, which is a third-party service on Bluemix.

Chapter 7, Compute Options on Bluemix, covers the different compute options available on Bluemix, such as containers, Cloud Foundry applications, virtual servers, and Open Whisk.

Chapter 8, Security Services on Bluemix, talks about the security services available on Bluemix and elaborates two of the available security services in Bluemix. You will learn how to offload the web application authentication functionality to the Single Sign On service on Bluemix.

Chapter 9, Microservices-based Application Development on Bluemix, talks about an architecture pattern for application development on the cloud, called the Microservices architecture pattern. You will also learn how to use Bluemix and services on Bluemix to build and deploy applications that employ the microservices architecture.

Chapter 10, Mobile Application Development on Bluemix, introduces you to services offered on Bluemix that are specifically for mobile application development. You will learn how to use some of these services to build a simple mobile catalog application.

What you need for this book

Here's what you require for this book:

Cloud Foundry CLI (the latest version available)Eclipse IDE (v4.4 or later)

Who this book is for

This book is aimed at developers seeking to learn application development and deployment methods on IBM Bluemix. A basic knowledge of Java and Node.js is assumed.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning. Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "You will notice that the deployable artifact for your application is the  webApp.war file."

A block of code is set as follows:

@Override protected void init(VaadinRequest vaadinRequest) { Responsive.makeResponsive(this); setLocale(vaadinRequest.getLocale()); getPage().setTitle("MyVaadinApp"); showMainView(); }

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Enter your LinkedIn credentials and click Allow access."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

Log in or register to our website using your e-mail address and password.Hover the mouse pointer on the SUPPORT tab at the top.Click on Code Downloads & Errata.Enter the name of the book in the Search box.Select the book for which you're looking to download the code files.Choose from the drop-down menu where you purchased this book from.Click on Code Download.

You can also download the code files by clicking on the Code Files button on the book's webpage at the Packt Publishing website. This page can be accessed by entering the book's name in the Search box. Please note that you need to be logged in to your Packt account.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

WinRAR / 7-Zip for WindowsZipeg / iZip / UnRarX for Mac7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/LearningIBMBluemix. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the color images of this book 

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from http://www.packtpub.com/sites/default/files/downloads/LearningIBMBluemix_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.

Chapter 1. Saying Hello to IBM Bluemix

Ready to rock with IBM Bluemix? Not yet? Don't fret; we are here to take you through your exciting journey to embrace the whole new paradigm of application development on cloud.

Before we take the plunge, let us equip ourselves with an understanding of some of the concepts that are at the periphery but that are essential to build your know-how of IBM Bluemix.

Heard of cloud computing? No? Well, we highly recommend you have a basic understanding of what cloud computing is at this point, before we can move forward. If we were to define it in simple terms, cloud computing is the method of creating a pool of resources (compute, storage, and network) and offering it through a simple portal that allows users to request the resources they want and get them provisioned in minutes, all this at a cost that is charged against the actual usage metrics of the resources or on a period-based consumption model.

Did you get it? No? Let us simplify it further.

Think of resources as compute, storage, and networking.

Now think of these resources being pooled and shared in a data center by what we call cloud service provider or CSP.

As a user, you will need a certain compute, storage, and networking capacity to host your application. In a non-traditional cloud world, you would go to the URL of the CSP, which will take you to the self-service portal of his service. Through this portal, you will be able to look at the available resources offered by the CSP, look at the costs at which each of them is offered, and will also be able to request a combination of resources based on your requirements. This custom compute capacity will be provisioned to you inside your tenancy or account with the CSP cloud offering. You will then be able to access and work with your resources through public Internet calls. This is a typical scenario of using cloud computing on a public cloud. By public cloud, what is meant is that the resources are shared and accessible by anyone on the public Internet, once they have a tenancy or account established within the cloud offering. Tenancy will assure resource isolation between tenants. Public cloud platforms are a popular way to explain the concept of cloud computing; however, there are private and hybrid flavors of cloud computing that CSPs provide. We shall discuss this further along in this chapter.

In this chapter, we will be looking at the following topics:

Understanding cloud service delivery modelsGetting a step closer to understanding IBM BluemixUnderstanding Bluemix architectureFamiliarizing with Bluemix deployment modelsGetting an account on public BluemixUnderstanding the Bluemix dashboard

Understanding cloud service delivery models

Having understood the cloud computing model, let us graduate ourselves to the next level, where we will get an understanding of the three different service delivery models in cloud, which is to say in simple words, what can I get from a CSP?

To understand the cloud service delivery models, we need to focus on what we need from a cloud platform and what is provided to us by a cloud service provider; together, they define the as-a-service paradigm of the cloud or the cloud service delivery model.

What do we mean by as-a-service? As-a-service is a new business model, where the consumer does not have to buy a product or solution in its entirety for lifetime use. In the as-a-service model, a consumer buys the rights to use a product or solution for a defined period, in its entirety; the period can be renewed or continued based on the consumer's requirement. There is no lock-in or upfront huge investments needed in the as-a-service model. Applied to IT, this as-a-service model is cost viable for most small to mid-size organizations and start-ups. This has allowed for exploitation of software solutions to bring in business transformation through rapidly developed ubiquitous and innovative applications.

Let us take a look at what the cloud service delivery models are. In the broad category, we have three cloud service delivery models; there have been other specific categories as well, but to discuss all service delivery models is outside the scope of this book. The three cloud service delivery models are as follows:

Infrastructure as-a-service (IaaS)Platform as-a-service (Paas)Software as-a-service (SaaS)

The following figure shows a pictorial definition of each of the as-a-service models. IT within an enterprise consists of the nine broad layers of infrastructure components, such as networking, storage, servers and virtualization, and middleware; application infrastructure components such as operating system, and runtime; and a software stack of applications and data:

Cloud service delivery models

In a traditional on-premise environment, all the layers are procured, managed, and maintained by the consumer, who is typically an enterprise. If the consumer opts to not invest in infrastructure and instead leverage infrastructure provided as a service by a cloud service provider, then the consumer is operating in an infrastructure as-a-service model; the stack above the infrastructure components are still procured, managed, and maintained by him. This model is useful when there is a need for elasticity in infrastructure to support ever-changing business demands. This model absolves the consumer of being locked down by huge investments in infrastructure if he has to support a shrinkage in his needs. On the other hand, it also helps the consumer expand his IT in response to the increase in business need.