Learning IBM Bluemix

By Sreelatha Sankaranarayanan
    What do you get with a Packt Subscription?

  • Instant access to this title and 7,500+ eBooks & Videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Free Chapter
    Saying Hello to IBM Bluemix
About this book

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.

Publication date:
October 2016
Publisher
Packt
Pages
382
ISBN
9781785887741

 

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 models

  • Getting a step closer to understanding IBM Bluemix

  • Understanding Bluemix architecture

  • Familiarizing with Bluemix deployment models

  • Getting an account on public Bluemix

  • Understanding 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.

Taking this discussion to the next level, in the third stack from the figure, we see that in addition to the infrastructure components, we also see a model where the cloud service providers provide the application infrastructure components as a service along with the infrastructure components. This model is called platform as-a-service. Essentially, what this translates to is a multi-tenanted environment where development and deployment of applications can be done collaboratively with the support of value-added software products and solutions offered as a service on the same platform. This model is useful when the consumer wants an easy bring up and tear down development environment, where quick and dirty prototypes can be built. The prototypes can be graduated to a full-fledged production-ready application that is hosted and maintained on the same platform. Again, as with any other as-a-service model with PaaS too, the consumer is not vendor locked and  is absolved of upfront huge license costs, when he is still evaluating technology, an exception to this would be when the customer brings his own license (BYOL) to use a specific software as-a-service on the PaaS.

Lastly, software as-a-service is a model where the entire application stack from the infrastructure components all the way up to the application and application data are vendor managed. The user is merely an end consumer of the software application.

As we move from a traditional, on-premise environment to a completely vendor managed software stack, the flexibility and customizability options with the consumer decreases; also, the control that the consumer will have on different layers of the stack decreases. However, the lower costs and speed and agility with faster time to value are achieved as we move from the traditional environments through the types of as-a-service models.

 

Getting a step closer to understanding IBM Bluemix


Bluemix is an open source Cloud Foundry-based platform as-a-service offering from IBM. Bluemix is not just a hosting of open source Cloud Foundry; Bluemix provides value additions such as:

  • An intuitive dashboard to interact with the Cloud Foundry layer and to work with Bluemix

  • A suite of enterprise middleware and software offered as services on Bluemix

  • IBM support for the platform and IBM services

  • Deployment models to choose from, such as public, dedicated, and local

  • Rich IBM community business partners offering value added services

  • Community support through the IBM developerWorks network

The following figure gives a high-level snapshot of what the Bluemix platform is composed of; Bluemix is not limited to what follows, but this figure gives a simplistic view of the components available on Bluemix for users to work with. Bluemix provides a rich and wide set of IBM software offered as managed services; these include services for application development and deployment known as DevOps services, services that enable hybrid applications to be developed and hosted through the use of integration services, cognitive services from Watson, Mobile services for mobile application development and management, data and analytics services to work with application data, and a host of runtime support for your applications, such as Java, NodeJS, Ruby, php, Python, Groovy, and so on:

High-level view of what Bluemix offers

You will also see here in the figure that Bluemix offers different compute options for your applications, based on your needs. In addition to the Cloud Foundry-based applications, you can also deploy your applications and host them on Bluemix by using a Docker container or open stack-based virtual machines. IBM also has announced the IBM Open Whisk compute environment, which is ideal for applications that are event-based. To know more about the compute options in Bluemix, refer to https://www.bluemix.net/docs/compute/index.html.

Understanding the Bluemix architecture

Bluemix is a Cloud Foundry-based platform as-a-service offering from IBM. Cloud Foundry is the open source standard for PaaS. To understand in-depth details on cloud foundry internals, you can refer to http://docs.cloudfoundry.org/ .

The following figure gives a high-level overview of Bluemix architecture. We will scope our discussion to the public deployment model of Bluemix; however, for dedicated and local Bluemix deployments (about which we shall learn more later in the chapter), the Bluemix internals based on Cloud Foundry architecture remain the same; what would change is the infrastructure on which Bluemix is hosted:

Bluemix high level overview

In the preceding figure, you can see that Bluemix is hosted on Softlayer infrastructure. An application hosted on Bluemix would run within the VM on Softlayer, each of the VMs will have resource isolation through containers, and each container will have the runtime and framework components necessary to run an application.

Applications on Bluemix are monitored for their health and managed by an application manager. Developers can use a browser or the cloud foundry command line client to work with Bluemix. The details on Bluemix UI are discussed in future sections of this chapter; we will also be discussing details on working with Bluemix using the cloud foundry command line in future chapters.

Bluemix catalog offers services that are hosted on Bluemix or those that run outside of it. Services are IBM provided, community-based, or third-party software or middleware that is offered from the Bluemix platform as-a-service, which is, in other words, ready-to-use software that is billed on a pay as you use model, without prior license purchase and so on.

 

Familiarizing yourself with Bluemix deployment models


Bluemix is offered as a service in three deployment models. They are as follows:

  • Public Bluemix

  • Dedicated Bluemix

  • Local Bluemix

Public Bluemix

Bluemix is offered as a public multi-tenanted platform as-a-service offering. Public Bluemix is available currently in three datacenters (at the time of writing this book). Public Bluemix is great for startups, open community developers, freelance developers, students, and for specific requirements of small to medium or even large enterprises. This is a great platform for experimenting with technology, building the quick and dirty prototypes, and also, a platform for building and hosting business applications that are not stringent on regulatory and compliance requirements. As discussed in this chapter and for most of this book, we will be using public Bluemix, which can be accessed from www.bluemix.net .

Dedicated Bluemix

Unlike public Bluemix, dedicated Bluemix is hosted on a single tenanted dedicated Softlayer infrastructure. If you want a dedicated Bluemix setup, then the infrastructure underlying this dedicated Bluemix is also dedicated to you. The hardware is not shared with any other users. Dedicated Bluemix makes a hybrid environment possible, where you can leverage the advantages of cloud development along with the data from within your enterprise.

Dedicated Bluemix  can be set up to sit within your enterprise VPN network and user identity management can be integrated to your enterprise identity management system. This will allow dedicated Bluemix to be a platform that is truly dedicated and customizable for your enterprise. Services on dedicated Bluemix can be customized based on what you really need, as opposed to out of the box catalog.

Dedicated Bluemix is suitable for application deployments that have greater security, regulatory, and compliance requirements. Also, in cases where there is a need to have greater control over audit data or application data, this kind of Bluemix deployment is suggested.

Apart from the regular Bluemix dashboard, dedicated Bluemix has what is called the admin console. This is an operations console that the administrators of the dedicated Bluemix environment within your organization can use to manage and administer the Bluemix platform within their enterprise. The functions that can be carried out using the admin console would be as follows:

  • User administration

  • Catalog management

  • Organization administration

  • View system/dedicated Bluemix updates or scheduled updates

  • Monitor the usage of resources across the organizations within the dedicated Bluemix account

  • Access and view reports and logs for activities on the environment

Another important aspect worth mentioning about dedicated Bluemix is the syndicated catalog. Dedicated Bluemix provides the ability for its users to use software services across their public or dedicated Bluemix environments. A single palette of services catalog is displayed to the dedicated Bluemix user, from where he can choose services that he would like to use for his application. Dedicated services are marked with a red icon on the top right, as shown in the following screenshot; the grayed-out service is one that is turned off or made unavailable for the given organization in the dedicated Bluemix through the admin console, which was discussed earlier. Services that are from public Bluemix syndicated to the dedicated Bluemix catalog are shown in a separate category of services and they do not have the red icon to the top right corner, as was the case with dedicated services.

The pricing and support models are also different from public Bluemix. To learn more about dedicated Bluemix you can refer to http://www.ibm.com/cloud-computing/bluemix/dedicated/ .

Local Bluemix

Bluemix delivered as a service within the firewall boundaries of your enterprise on your infrastructure or within your datacenter is called local Bluemix. You can imagine it to be a private cloud offering a PaaS platform. The core Bluemix platform is the same across public, dedicated, or local.

Local Bluemix is typically useful where the sensitivity, privacy, and security needs of applications and application data is very stringent. An example would be government agencies or government bodies; they are usually governed by very strict regulatory and compliance standards and often would need hosting and operating environments that are mostly under their control.

The architecture of Bluemix local is given in detail at http://www.ibm.com/cloud-computing/bluemix/local/imgs/the-architects-guide-to-bluemix-local.pdf .

Note

The first step in your journey to learning Bluemix is to learn how to create your own account on IBM Bluemix.

 

Getting an account on public Bluemix


Creating an account on Bluemix would be the first step for you to get access to a variety of resources that you will use to create, deploy, and run your application. Throughout this book, we will use the public multi-tenanted offering of IBM Bluemix to work with. Let us learn on how to create your Bluemix account:

  1. Ensure you have Internet connectivity, open your browser, and go to  www.bluemix.net .

  2. Click SIGN UP, as shown in the following screenshot:

  3. You can sign up for a 30-day free trial of Bluemix. Once you click SIGN UP, you will be taken to the page as follows; a couple of things that you should pay attention to on this page are as follows:

    • You are providing information on this page to create an IBM ID; if you already have an IBM ID, created as part of your work with any other IBM products or offerings, then you can use it to log in to Bluemix. You can then skip the sign up step. If you do not have an IBM ID, then please follow the steps here to create one.

    • By the sign up process, you are entitled to the 30-day free trial of IBM Bluemix. You will be able to log in to Bluemix and use all the resources on it for free during this trial period:

  4. Provide your details in the fields shown in the SIGN UP screen and click CREATE ACCCOUNT. This will create your IBM ID and you will get further login information on your e-mail address that you have provided during sign up. Once you click CREATE ACCOUNT, you will see the following page on successful submission:

  5. You will receive an e-mail, as shown in the following screenshot, for reference; you will need to first confirm your account by clicking the Confirm your account link. Once this is done, you can log in to www.bluemix.net using your newly created IBM ID and password. If you face any login-related issues, please log the problem with http://ibm.biz/bluemixsupport and the Bluemix support team will get in touch with you to fix the issue:

  6. On confirming the account, by clicking the Confirm your account link, you will see the following screen:

  7. Click Log in to go to the Bluemix login page. Enter your newly created IBM ID and password to log in:

  8. On logging in, you will be taken to your dashboard, as shown here:

Congratulations! You have just completed the first step toward getting started with Bluemix.

 

Understanding the Bluemix dashboard


In this section, let us try to understand some details about the Bluemix Dashboard. This is essential in learning to work with IBM Bluemix.

Key dashboard or Bluemix UI concepts

In this section, we will learn about some of the key concepts used in Bluemix. Your Bluemix account can be administered from the Bluemix console. Understanding of the concepts within Bluemix, which are surfaced on the console, will help you learn how to plan the usage of your account and the resources within it.

Account details

Clicking the icon to the extreme top-right of your dashboard will bring up information on your Bluemix account:

The account details are shown as follows; it displays the account owner's name, registered e-mail address, and organization. You will see your account details here.

Organization

Organization is an all-encompassing entity in the case of a public Bluemix account. This is the topmost level in the hierarchy of entities that a user will work with on Bluemix. For a public Bluemix user who has created a Bluemix account, he is the account owner and organization is his topmost entity. Usually, the account owner's e-mail is defaulted to his organization name. This can be edited by the account owner; we will see how to do that in future sections:

Managing your organization

You can manage your organization by clicking the icon to the extreme top-right corner of the console, also called the Account Details view:

This would bring up the following screen, where you can click Manage Organizations:

This will bring up the page from where you can administer your Bluemix organization:

There are three important concepts to be understood here under organization management. You will see that there are three tabs here for USERS, DOMAINS, and QUOTA. Organization management amounts to actions that you perform with respect to managing the users and domains in the organization.

USERS

The account owner is the default user listed. Now, in a typical development environment, you would want multiple users to be able to access and work on a given space within your organization. This is a must for collaborative development needs. To enable this, you will need to invite a user to your organization and assign him a space.

Click Invite a User; you will see the following screen, where you will need to enter the e-mail address of the person you want to invite. You can assign the user you are inviting a role within your organization, which is to manage your organization, or you can simply choose to only give the user access to your space, as a developer:

The user you invite can have an account on Bluemix. You will see his user name listed within your organization once you have invited the user. If you are inviting the user using his e-mail address, which is linked to his IBM ID, then he will be added as a member; if the user does not have an IBM ID, then an IBM ID is created for the user with the e-mail address and he is added as a member. However, in our example, the user already has a Bluemix account linked to the given e-mail address, so he will be added as a collaborator.

Click INVITE to invite the user. You will see a confirmation, as follows:

Within your organization, under the USERS tab, you will see the new user listed as follows:

The user that you have invited will be able to see your organization along with his own organization in the account details page; from here he will be able to switch to your organization and will be able to work with the space that you have assigned him to, as shown in the following screenshot:

You can learn more about each of the user roles within an organization and a space by clicking on Learn About Roles:

DOMAIN

Click the DOMAIN tab from the manage organizations page; you will see the default system domain assigned, which in the case of the demo account would be  au-syd.mybluemix.net. The public Internet route for your organization is defaulted to the system domain, and the host in the route is usually your application name:

You will be able to add custom domains to your organization by clicking ADD DOMAIN. You can associate your applications to use the custom domains instead of the default system domain. The discussion of custom domains is outside the scope of this book. To know more on custom domains, you can refer to the Bluemix documentation at www.bluemix.net/docs .

QUOTA

Quota defines the resources allocated to an organization. This will provide information on what is the maximum memory that can be used by applications across spaces in your organization. Quota also provides the total number of cloud service instances that can be created in your organization across spaces. Quota is allocated when the account is created. You can increase your quota by moving to the pay as you go or subscription plans for your Bluemix account. The following screenshot shows the quota for the demo account we are using in this chapter; this would be similar to the quota on the trial account you have created following the steps in this chapter:

Space

Space is a logical grouping of resources on the platform. Multiple Spaces can be created within an organization. Doing so allows the account owner to invite other users to his account and share resources with them by providing resource isolation; he does this by assigning users to a given Space. While inviting users to work on a Space, he can also assign roles for the users that would define what the users can do with the resources and the platform. This is an essential concept, that makes collaborative development a possibility on the platform. In addition, it gives the flexibility of maintaining similar but different environments within the user account. One of the most popular needs to do this would be for someone to isolate test environments from that of development and production. You will notice dev is the default Space that is created for your organization:

Creating your own Space

You can create a new Space by clicking Create a Space and providing the name of your Space in the dialog that comes up, as shown here:

Once your Space is created, you can see it listed to the left, as shown here:

You can work with your Space in the same way as you would with the default dev Space. Both the Spaces in your organization have access to and can work with the same set of resources of the platform.

Managing your Space

Go to the account details view and click Manage Organizations; you can select the Space you want to manage, as shown here:

In the screenshot, you see that we have selected the mydev Space; the user and domain details for this Space can be managed from here. You can remove users in your Space from here. You can also delete the Space from here by clicking on DELETE.

Region

Region is an important concept that you need to understand; you see that the Region is displayed in the account details page and this is a drop-down menu, which means that you can switch the region for your account from here:

Note

Region-based URLs

The access URLs for directly accessing your account on any of the three data centers are as follows: 

Region implies the datacenter where the public Bluemix is hosted. Currently, at the time of writing this book, public Bluemix is available in three datacenters, which can be seen by expanding the drop-down menu on the account details page, explained in the previous section:

The three datacenters are as follows:

  • Dallas, US South

  • London, United Kingdom

  • Sydney, Australia

Any user who creates an account on Bluemix is provided an ORG and default Space in one the datacenters. However, the user can also access his account on any of the other datacenters by creating a Space for his organization.

When you first sign up for your account and go to the login URL from your confirmation e-mail, you will notice being redirected to one of the three URLs mentioned in the preceding information box. That will give you the information on the datacenter where your account and default Space exists.

The demo account used in this chapter is created in the Sydney, Australia datacenter, as you would see from the account details screenshot where Sydney is selected as the default Region. Now, if I would like to use Bluemix from another Region, say, US South for example, I can change the drop-down value of the Region in the account details page to US South. This will automatically redirect me to https://console.ng.bluemix.net , which you can witness in the address bar of the browser. Now, since this is a datacenter region that I am going to for the first time since my account creation and since this is not the default datacenter where my default Space was created, you will see the following in your browser:

Note

Working with different Regions 

Throughout this book, we will work across Regions on Bluemix and you should now know how to switch your Region using the Bluemix console.

You will see here that you do not have a default Space in this datacenter. You are, however, prompted to create one to continue to use your account on this datacenter.

Enter the name of the Space you would like to create in this region and click CREATE:

You will see that my mydev Space is created, and now I am on my account on the US South datacenter.

The dashboard for you is displayed as shown in the screenshot. You will observe that the dashboard that you saw when the region of this demo account was Sydney, Australia, is slightly different from the dashboard in the US South region; this is because Bluemix is continuously evolving as a platform. The latest and greatest set of capabilities of the platform are first pushed to the US South datacenter, which is then incrementally and in a phased manner pushed to the other datacenters.

Now let us switch the Region back to Sydney from the account details page.

The number of days your account will be active is indicated on your dashboard, as seen in the following screenshot. Since we have signed up for the free trial period, you will see 30 days indicated in your dashboard. As you progress with Bluemix, with passing days on your account, you will see a countdown to the number of days left for your account:

Clicking the icon showing the number of days left, as shown in the following screenshot, brings up the information on how you can upgrade your Bluemix account from being a trial account to a paid account:

You can get more information on Bluemix pricing by going to www.bluemix.net/pricing/ .

 

Summary


In this chapter, we have explored the cloud as-a-service delivery models and have seen how Bluemix fits in the cloud service delivery model. We have also looked at the details of Bluemix as the platform as-a-service offering and the need for it. We learned how to get an account on the public deployment of Bluemix and also looked at the key concepts related to the Bluemix account and account management from the dashboard.

We shall explore the dashboard further in our next chapter. Also in the next chapter, we will learn about the cloud foundry command line utility and how to use it to work with IBM Bluemix. What is more? Get excited to also learn how to build your first Hello World application and deploy it on Bluemix.

About the Author
  • Sreelatha Sankaranarayanan

    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.

    Browse publications by this author
Latest Reviews (2 reviews total)
An excellent book to be introduced into Bluemix plataform
Very good book. There are very few book about this subject.
Learning IBM Bluemix
Unlock this book and the full library FREE for 7 days
Start now