A Place For My Thoughts, Technical Activities & Dev Stuff

M8Vj25stMN_1420636467227

JumpStart Development with Bluemix

by

Introduction

Are you looking for JumpStart your development with Bluemix? Well, you are just at the right place. We will be doing a good understanding of what IBM Bluemix is and how it can enable developers to rapidly build, deploy, scale and manage apps in the cloud. We will learn how to compose apps quickly, in a language of your choice and leverage a wide range of useful API’s and services. Starting with a high-level overview of the Bluemix architecture, we will then move to the online portal. Learn how to register and login. Look at some of the runtimes, services and boilerplates available and finally, walk through the process of building our first application on Bluemix.

Bluemix: The Big Picture

Bluemix is a cloud platform as a service (PAAS), developed by IBM that supports a range of programming languages and services, as well as integrated dev apps to build, run, scale, manage, integrate, and secure apps in the cloud.

Bluemix is based on CloudFoundry open technology and runs of soft layered infrastructure. It offers different compute choices to build your apps, including CloudFoundry apps, Docker Containers, and OpenStack Virtual Machines. A catalog of composable services are available through provision on demand and used within your apps. The IBM Cloud Marketplace is a way of allowing you to commercialize your innovative services and make them available to other developers within the catalog. IBM Bluemix offers three infrastructure compute technology choices to deploy apps: CloudFoundry apps, Docker Containers, and OpenStack Virtual Machines.

With these multiple compute options, you can run a variety of both new and existing apps in the cloud, on one cloud platform. These can be back-end processing apps or modern cloud-centric web apps. An existing app can be cloud-enabled. This is an app that is moved to the cloud but was originally developed for deployment in a traditional data center. Some characteristics of the app may be changed or customized for the cloud. On the other hand, a cloud-centric app, also known as cloud-native and cloud ready, is an app developed with the cloud principles within it’s design, including multitenancy, elastic scaling, easy integration, and administration. CloudFoundry apps contain everything you need when you want to develop an app and focus only on your app code. You can let the platform handle the rest, including runtime, scaling, networking OS. And if you’re writing a new app, you may want to start here. If in the future, you decide you need more control over your environment, you can move to IBM containers or virtual machines. IBM containers are Docker-based containers, you can think of these as lightweight virtual machines, containing code, runtime, and dependencies. These are designed for enterprise production

You can let the platform handle the rest, including runtime, scaling, networking OS. And if you’re writing a new app, you may want to start here. If in the future, you decide you need more control over your environment, you can move to IBM containers or virtual machines.

IBM containers are Docker-based containers, you can think of these as lightweight virtual machines, containing code, runtime, and dependencies. These are designed for enterprise production workloads, and can be securely deployed with integrated scalability and reliability. A user can obtain access through a hosted private repository of images where they can store, certify, and manage access to container images for their organization. This option provides more control over your environment in comparison to CloudFoundry apps.

Finally, you can deploy an OpenStack virtual machine, complete with an operating system pre-installed. You can run applications inside these virtual machines, configure your VM to autoscale dynamically and load balance automatically, and this option gives you the most control, however you must manage most of the environment yourself.

A Platform as a Service lets the developer focus on what’s important to them, the app. The platform provides all of the building blocks needed to develop and run apps in the cloud. It controls the runtimes and any provision services, ensures the number of instances are allocated based upon your configuration, and generally manages the health of your applications. Bluemix platform can eliminate or dramatically simplify various tasks: such as OS patching, security hardening, deployment, load-balancing, scaling, and health management. IBM Bluemix contains an ecosystem of services that are available through provision on demand. These services are from IBM, third parties, and open source. An example of some of these services are databases, such as Cloudant NoSQL Database, MongoDB, and dashDB.

There are mobile services, including Push notifications and Mobile Application Security. We have web and application services, such as message queues or caching, Internet of Things, including IBM Internet of Things, and Flowthings.io. There are Big Data tools such as analytics for Apache Hadoop or Geospatial Analytics and you can leverage the power of cognitive services with your applications using Watson Personality Insights, Relationship Extraction, and Visual Recognition Tools. There are many more services available.

With Bluemix, you can pay for what you use, which enables a low barrier to entry. You can register online in minutes and start a free 30 day trial. That will allow you to test an entire application and all of the Bluemix features. There is also a Free tier, to enable and promote prototyping and experimenting with services. Multiple pricing models are available, such as the pay-as-you-go model which provides flexibility without any term commitment and a subscription offering, which provides cost savings when committed to a fixed term. The self-service nature of Bluemix allows you to grow your application as needed. You can have an environment up and running in minutes, allowing you to get coding straight away. You can provision and scale-out resources as your application demands, it offers the ability to monitor your application costs and charges, and set up notifications to keep informed when a certain threshold has been reached.

Bluemix can help you address many different types of use cases. You can expand existing applications by adding or enhancing the user experience, such as mobile or social media support. You can add new capabilities by integrating others services and API’s. You can API enable your existing applications by adding an API layer over an existing service or simplifying how an existing set of service capabilities are exposed. And finally, you can build a new, or greenfield application, including rapid-prototyping and trying different services leveraging the power of dev app tuning to manage your development and deployment life-cycle, and scaling as your application grows.

Registration, Login, and Pricing

Registering for your Bluemix account is very easy and it should only take you a few moments to get signed up and logged in to your dashboard. From your browser, navigate to www.getbluemix.net. From here, you can click Get Started Free or Sign Up from the top right of the page. You can fill in your details and click Create Account at the bottom;

You should receive a verification email to the email address you’ve specified and once you receive this and verify, you will be able to log in. Once registered, you can now navigate to www.bluemix.net and click Log In to get started;

You will be prompted for the email and password you used during the registration process. Then you will be asked to create an Organization;

Bluemix allows you to create applications and services in different regions. You can select the region that is nearest to your customers and deploy your apps to this region to get low application latency, or you can select a region where you want to keep application data to address security or compliance issues. When you build apps in multiple regions, if one region goes down, the apps in the other regions continue to run.

Your resource alliance is the seam for each region that you use. Spaces are tied to a region, so if I was to switch to the United Kingdom, it would enable me to work with the spaces I have created under that region. And when I switch back to US South, I will have access to the spaces that we can currently see on the left-hand side. Bluemix is currently deployed and available in three regions and new additional regions will be added soon.

Now simply Create a Space;

And That’s it;

And once authenticated, you will arrive at the Bluemix dashboard;

First, let’s have a look at the pricing area of the portal by clicking on Pricing in the main menu or by going to the URL Here; https://new-console.ng.bluemix.net/pricing/

You can get everything about the pricing here;

When you first sign up, for the first 30 days, everything is free and will allow you to really jump in and try out as many of the cool services and features as you wish without worrying about costs. After the free trial has completed, you will continue to get half a gigabyte of free memory every month for runtimes and containers. Looking down the pricing page, you will see some examples of application use cases to get a better understanding of what a monthly bill might look like. These are guidelines only, however you can also use the pricing estimator to better understand what your app will cost. Further down, you will see a similar tool for estimating the cost of containers and further down the page, we have a link to a down to the penny pricing calculator, to get a better idea of costs for services, containers, and VM’s. Finally, at the bottom, you can find some FAQ’s for some of the common pricing and building queries. You can monitor your application costs within your account area, including previous charges and your current usage for this month. We will look at that later in this module.

Walkthrough the Dashboard, Services, and Runtimes

When logging in to Bluemix, the first screen you’re presented with is the Bluemix dashboard;

This is a one-stop shop for all of your cloud assets. You can see, at a glance, the health status of any of your provision services or applications and perform a range of activities, such as provisioning a new service,

CloudFoundry app, virtual machine, or container. The dashboard provides a guided experience when provisioning your applications and services to get you up and running in minutes. And we will explore this process in the next module. If you are on the Classic Dashboard then at the top, we have our main menu, we have links for Solutions, the Catalog, Pricing, Docs, and the Community;

There are also notifications, access to your user account, and some quickstarts;

First, let’s click on Docs from the Dashboard menu bar. This will open the comprehensive online documentation area;

From here, you can search for keywords and get results. If I view the documentation for Push, you can see I can customize documentation for Java, JavaScript, and Objective-C. And you can also use the categories on the left to navigate the documentation. Next, if we click on Community from the Dashboard main menu, it will launch developerWorks at developer.ibm.com/bluemix DeveloperWorks has some great content to get you started, including how-to’s and tutorials, videos, and links to Bluemix events;

There are also links to the Bluemix area of Stack Overflow and the dW answers forum. The Bluemix development team actively monitor questions on dW answers, so this may be a great place to start when asking your questions. Back on the dashboard, the next feature we will look at is organizations and spaces, and this is on the left-hand side of your dashboard. Spaces are a mechanism to collect related applications, services, and the users that can collaborate on resources. An organization can contain multiple spaces. You can see, I have several spaces created already;

You can create a space easily if you need as we create in the start.

Next, we will look at the User Account, and you can access this by clicking on the icon at the top-right of the page. From here, you can update your account details and subscription, and view your app usage and billing. You can check the status of the Bluemix platform or get access to Bluemix Support. Another important feature found here, is the ability to select your region.

We will now explore the catalog, and we can do this by clicking ‘Catalog’ from the top menu bar on the right side. This is where you can access and provision all of the runtimes, services, and boilerplates that are available on Bluemix;

Here, on the left side you can see all categories available on Bluemix;

You can filter from here and you can use the search box at the top to find your services, boilerplates, and runtimes. At the top, we can see the boilerplates. Boilerplates are a great way to get started very quickly with runtimes and services already preconfigured.

For example, looking at the MobileFirst Services Starter boilerplate, we can see the SDK for Node.js along with the Mobile Client Access: Push and Cloudant NoSQLDB.

Services will be created automatically when we create this type of app. Now similarly if we go back, we can have a look at the ASP.NET Core Cloudant Starter.

And again, you can see it has the necessary runtimes and services to start building an ASP.NET Core application with a Cloudant NoSQL database.

If we continue down the catalog, we’re next presented with the runtimes. So there are the number of runtimes including Java, Node, Go, PHP, Python, Ruby and others. If a runtime you wish to use isn’t there, please make sure and check out the community buildpacks. This will take you to a GitHub page showing all community created buildpacks for CloudFoundry.

If we continue down the catalog, we’re presented with their container images. The IBM container service is super easy to use. No need to deploy and manage virtual machines, set up a Docker Engine, or manage your own registries.

Next, we have the services. In the left-hand menu, you can see the categories for the services. We have services for Watson, Mobile, DevOps, Web and Application, Integration, Data and Analytics, Security, Business Analytics, and finally the Internet of Things. First, we have the Watson services. These enable you to build cognitive apps that help enhance, scale and accelerate human expertise. Cognitive services are adaptable, interactive, and contextual in the way they provide information. Instead of simply returning prepared responses, these services provide answers based on what they know to be correct, relying on information they’ve acquired over time. Services include Personality Insights, which helps derive insights from transactional and social media data to identify psychological traits. Next, we have Language Translation. This can enable you to dynamically translate content, such as news, persons, or conversational documents and instantly publish content in multiple languages. You can also see a range of other services, some from third parties, and other’s currently still in beta. As we continue down the catalog, we can see services for Mobile, including Mobile Data, Push Notifications, and iOS Services. We have DevOps that can support your processes from developing through to deploying and monitoring your applications. Under the Web and Application category, there are lots of services covering everything from workflows and caching through to message queues, queue coding, and much more. Integration services can be very powerful in an enterprise environment to help enable secure integration with existing on-premise data and systems. Data and Analytics contains a lot of storage and persistence options, as well as modeling and analytics services. Use the Help Me Pick tool if you aren’t sure which of these services you should use. Enable single sign-on across your applications or scan your web or mobile applications for vulnerabilities using the services under Security. There are services for Business Analytics, including reporting and insights. And finally, build your IoT, or Internet of Things applications using IBM Internet of Things, Real-Time Insights, and

Cognitive services are adaptable, interactive, and contextual in the way they provide information. Instead of simply returning prepared responses, these services provide answers based on what they know to be correct, relying on information they’ve acquired over time. Services include Personality Insights, which helps derive insights from transactional and social media data to identify psychological traits. Next, we have Language Translation. This can enable you to dynamically translate content, such as news, persons, or conversational documents and instantly publish content in multiple languages.You can also see a range of other services, some from third parties, and other’s currently still in beta. As we continue down the catalog, we can see services for Mobile, including Mobile Data, Push Notifications, and iOS Services. We have DevOps that can support your processes from developing through to deploying and monitoring your applications. Under the Web and Application category, there are lots of services covering everything from workflows and caching through to message queues, queue coding, and much more. Integration services can be very powerful in an enterprise environment to help enable secure integration with existing on-premise data and systems. Data and Analytics contains a lot of storage and persistence options, as well as modeling and analytics services. Use the Help Me Pick tool if you aren’t sure which of these services you should use. Enable single sign-on across your applications or scan your web or mobile applications for vulnerabilities using the services under Security. There are services for Business Analytics, including reporting and insights. And finally, build your IoT, or Internet of Things applications using IBM Internet of Things, Real-Time Insights, and

You can also see a range of other services, some from third parties, and other’s currently still in beta. As we continue down the catalog, we can see services for Mobile, including Mobile Data, Push Notifications, and iOS Services. We have DevOps that can support your processes from developing through to deploying and monitoring your applications. Under the Web and Application category, there are lots of services covering everything from workflows and caching through to message queues, queue coding, and much more. Integration services can be very powerful in an enterprise environment to help enable secure integration with existing on-premise data and systems. Data and Analytics contains a lot of storage and persistence options, as well as modeling and analytics services. Use the Help Me Pick tool if you aren’t sure which of these services you should use. Enable single sign-on across your applications or scan your web or mobile applications for vulnerabilities using the services under Security. There are services for Business Analytics, including reporting and insights. And finally, build your IoT, or Internet of Things applications using IBM Internet of Things, Real-Time Insights, and

Under the Web and Application category, there are lots of services covering everything from workflows and caching through to message queues, queue coding, and much more. Integration services can be very powerful in an enterprise environment to help enable secure integration with existing on-premise data and systems. Data and Analytics contains a lot of storage and persistence options, as well as modeling and analytics services. Use the Help Me Pick tool if you aren’t sure which of these services you should use. Enable single sign-on across your applications or scan your web or mobile applications for vulnerabilities using the services under Security. There are services for Business Analytics, including reporting and insights. And finally, build your IoT, or Internet of Things applications using IBM Internet of Things, Real-Time Insights, and

Use the Help Me Pick tool if you aren’t sure which of these services you should use. Enable single sign-on across your applications or scan your web or mobile applications for vulnerabilities using the services under Security. There are services for Business Analytics, including reporting and insights. And finally, build your IoT, or Internet of Things applications using IBM Internet of Things, Real-Time Insights, and

And finally, build your IoT, or Internet of Things applications using IBM Internet of Things, Real-Time Insights, and Flowthings.io. As you can see, the catalog is very comprehensive and is growing all of the time. In the next module, we will walk through the process of provisioning some of these runtimes, services, and boilerplates to show you how easy it really is.

IBM Bluemix DevOps services is a SAAS (software as a service) on the cloud that supports continuous delivery. With DevOps services, you can develop, track, plan, and deploy software in one place. From your projects, you can access everything you need to build all of kinds of apps. You can work on your own or use the collaboration tools to work with a team. After you build an app, you can deploy it to the Bluemix cloud platform.

In minutes, you can go from source code to a running app. In DevOps services, you can develop software for any language, and supports deployment through Bluemix with predefined buildpacks for Java, Node, Go, PHP, Python, and Ruby apps. You can choose between a hosted Git repository or Jazz SCM for your source control management. And the WebIDE enables you to develop directly by using a browser without installing anything on your computer. It provides Content Assist, Tool Tips, Previews, Validation, and Syntax Highlighting for JavaScript, HTML, CSS, and Markdown files. Everything you need to go from zero to code in seconds.

There are also plug-ins for Eclipse, Visual Studio, and you can bring a tool of your choice when building your applications. You can use the build and deploy tools, such as Delivery Pipeline to automatically build and deploy your application to Bluemix. Services such as Monitoring and Analytics and Auto-scaling can help support your application as it grows. In addition to supporting scaling and performance, IBM Bluemix also offers tiered services such as Load Impact to support stress tests.

Finally, you can share your work and collaborate your expertise for Agile Development, this includes the Track and Plan services to create stories, tasks, and defects to describe and track project work and use agile planning tools for the product backlog releases on sprints. If you’re more of a planner than a coder, you can even create a project just for planning. When you create a project, be sure to add the agile planning features.

To get started with DevOps services, open your browser and navigate to hub.jazz.net, you will first want to register and once registered, you can continue to log in. Once authenticated, you will be presented with any of your existing DevOps projects and the ability to create a new project. Let’s create a sample project. We will give it a name, demo. And you can see, that name’s available and we have the option to create a new repository or link to an existing GitHub repository.

We want to select Create a New Repository and we’re presented with three options: We can create a Git repo on GitHub, Git repo on Bluemix, or a Jazz SCM repository. We want to select, Git repo on Bluemix. You will see, the Git URL will be created and you have some additional options.

For now, we want to click Create.

Once completed, you now have a new workspace to start developing your application. You can use Git on your local development machine, to work with your application code. You can use Eclipse plug-ins, Visual Studio plug-ins, or you can even add a code directly in the browser if we select the Edit Code option this will load the WebIDE. And the WebIDE has everything needed to start creating and updating your code directly within the browser.

We will explore the WebIDE in more detail in the next module. Let’s look at the Track and Plan services. Track and Plan have everything needed to create work items and tasks, build your sprints, and collaborate with your team. If we now look at Build and Deploy, this service will allow us to build our Delivery Pipeline that can include Build, Deployment, and even add steps for running your tests with.

Solutions: Internet of Things and Watson

IBM Bluemix provides a suite of ready-to-use solutions that are preconfigured services to help you assemble your apps faster. There are solutions for Data and Analytics, Watson, IoT, DevOps, Security, and more.

We will explore two solutions, Internet of Things and Watson.

The Internet of Things, or IoT, is the network of physical objects or things embedded with electronics, software, sensors, and connectivity to enable objects to exchange data. This includes everything, from mobile phones, sensors, wearable devices, and almost anything else you can think of. Experts estimate that;

IoT will consist of almost 25 billion connected things by 2020. Bluemix provides first-class support for building your Internet of Things apps, by providing all of the building blocks to connect your services and devices to the cloud and store and analyze all of the big data generated. Services such as Node-RED allow you to rapidly build workflows that can send and receive data from your sensors or devices, such as a Raspberry Pi and can easily leverage other services, such as Watson to build truly exciting and world-class applications.

Lets do understand with an example;

To give a quick demo of the IoT capabilities on Bluemix, you can log in to your dashboard at bluemix.net and click on Solutions from your Dashboard in the main menu;

From here, we have access to a range of different solutions, covering things like Data and Analytics, Watson, Hybrid Cloud, Security, and others. For now, we want to look at Internet of Things. On the Internet of Things solutions page, we have access to exciting case studies, information on the IoT configuration on Bluemix, details on how much it will cost, and we have access to a cool online sample app;

To get started with the sample app, you will need a smartphone with internet access. You can enter a device name… And a secret four digit code. Once entered, you can click Go Play. Once complete, you’ll be presented with a custom URL. You will want to enter this within the browser on your smartphone. Once loaded on your smartphone, you will be prompted for the four digit code you entered. Once connected, if you move around your smartphone you will see the data for vibration motion and orientation starting to feed through into the browser;

This is just a simple demo, but shows the power of IoT and the possibilities are endless. Your application could be temperature sensors in the classroom, automatically warming or cooling the room. Or as one of the IBM case studies shows, using the IoT, find ease and service with Bluemix as the bases for it’s real-time power boat telemetry platform, allowing it to run complex diagnostic analytics in real-time on racing boats traveling at high speeds on the ocean. The possibilities are endless.

The next solution we will explore is Watson. Watson is an artificially intelligent computer system capable of answering questions posed in natural language. From hospitals to kitchens, Watson has clocked in to work and is already taking impressive strides across industries. But to understand the power of Watson, we must first understand cognitive computing and how it enhances skills and accelerates human expertise.

Watson is built to mirror the same learning processes that we have through the power of cognition. What drives this process is a common cognitive framework that humans use to inform their decisions: observe, interpret, evaluate, and decide. Unlike other computing systems, Watson takes in data from all sorts of sources, from research reports to tweets, All the information humans produce for other humans to consume. However, Watson is not bind by volume or memory.

Watson can read IBM millions of unstructured documents in seconds.

Next, Watson interprets data to expose patterns, connections, and insights. Watson pre-processes the information, organizing data that makes working with content more efficient. Now that Watson has ingested the corpus, or collection of information, it needs to be trained by the human expert to learn how to interpret the information. Now, Watson is revolutionizing the way we meet the seasons, become experts and share expertise in different industries. Further, Watson is discovering and offering answers and patterns we hadn’t known existed, faster than any person or group of people ever could.

Watson services include Personality Insights, Concept Insights, Tradeoff Analytics, and Machine Translation. Also, recently added to the Watson catalog, is Alchemy, which can enable you to build cognitive infused applications with a combination of text analysis and visual recognition services. The text analysis services use sophisticated natural language processing to analyze content and add high-level semantic information. One the image service enables developers to extract and tag images to better understand content and context. Developers can access services through simple REST API’s to pardon new apps and services. To give a quick demo of the Watson capabilities on Bluemix, you can log in to your Classic dashboard at bluemix.net. From here, click on Solutions in the main menu. From the solutions page, we can select Watson. The Watson solution page will provide details on the solution, including services available, a featured API and at the bottom, there are some case studies;

We will explore some of the services.

First, click on Personality Insights. This will display the Personality Insights page within the catalog. Next, click View Docs, this will provide some detailed documentation for the service;

We can look at the online demo by clicking Demo;

This demo will allow us to take some input text and analyze it. Once we click Analyze, it will provide details on the personality traits of the text. And if we scroll down, it gives some metrics and data about the personality. And we have a Visualization of the Personality Data. We will use the Personality Insights service when we develop our application later in this course. If we close the demo and return All Categories, you will see it returns us to the catalog.

We will now explore one of the other services. We will have a look at Alchemy API by clicking View More. And from here, again we will View Docs and click Try Demo. There are a series of demos and the one we will look at now is the Face Recognition Demo. The AlchemyVision Face API will automatically detect faces and identify people within images. We will select the first image. And if we scroll down, you will see that the Watson service has actually identified people from an image and mapped them to known names within its database. You should take some time to explore the Watson solutions on Bluemix and try out some of the exciting demos that are already available.

Exploring the IBM Cloud Marketplace

If you develop an innovative service and want to commercialize it, you have to start at IBM Cloud Marketplace process, which at the end will add your service to the Bluemix catalog. This process will take a maximum of 90 days and you will need to provide price policies, including the freemium one and add some API’s to your code for metering and billing purposes. If you do not want to commercialize it and just want to use it internally within your applications, you can use the user provided services facility. There’s more information on the IBM Cloud Marketplace at the following link.

Conclusion:

So we see some of the key components of IBM Bluemix to give you a better understanding of what the platform can offer and help you as a developer when building your new or existing apps. We looked at the powerful features and services available, including the ability to provide and compute runtimes and services on demand. How you can leverage DevOps services for your source control management, continuous delivery pipelines, and agile planning and tracking. We looked at the solutions, offering pre-built services that can help you build your apps faster, including the IoT demos and Watson. Finally, we looked at how you can commercialize your innovative services for the IBM Marketplace.


* For Discussion upon any service or query, feel free to ping me @ Sajid.Ali.Khan@pk.ibm.com.

Leave a Reply

Your email address will not be published.

*

Latest from IBM Bluemix Dev

Go to Top