Tuesday, September 29, 2015

IBM Bluemix session for Reva University.




Being an alumni of Reva University of Bangalore, I wanted to introduce IBM's Academic Initiative to our college. I spoke to the principal of Reva University and he was very interested in pursing this further.

He then got a professor contact with whom I could coordinate the things. Mr Akram Pasha, then enrolled to the IBM academic initiative and showed interest in introducing IBM Bluemix as a course subject for Reva University along with lab sessions.

Following up, Myself and my colleague Mr. Sathish Subramanyam delivered a session on IBM Bluemix on 23/9/2015, which was attended by 90 students of the CS branch.
We introduced the students to Cloud Foundry & IBM Bluemix. We also showed them a quick demo to start of with IBM Bluemix.
Students were very impressed as they understood they would save time to setup the environment, which they can get easily at IBM Bluemix.
Many students even interacted with us post the session and showed interest in doing some projects in IBM Bluemix.It was a successful session.

The future steps are for the college to check with the management and decide how they would like to carry forward this relationship with IBM.
At what point in Engineering, they would like to introduce IBM Bluemix and how the faculties would be trained on IBM Bluemix is yet to be decided by the Management.

Thursday, November 27, 2014

Bluemix troubleshooting -> An application cannot be staged by using a custom buildpack

You might not be able to deploy an application to Bluemix by using a custom buildpack if the scripts within the buildpack are not executable.
When you deploy an application to Bluemix by using a custom buildpack, you see the error message, The application failed to stage, so there are no instances to display.
This problem might happen if scripts, such as the detect script, the compile script, and the release script, are not executable.
You can use the git update command to change the permission of each script to "executable". For example, you can type git update --chmod=+x script.sh.

Bluemix troubleshooting -> A gateway timeout error message is displayed when you delete a service instance

ou might receive an error message when you try to delete a service instance that is already deleted from the cloud controller.
When you try to delete a service instance, you see the service broker error message, Gateway timeout.
This problem happens if the service instance is already deleted from the cloud controller.
To resolve this problem, create a service instance with the same service name, and then bind it to your applications. After that, you can delete the service instance and the applications that use the service.

Bluemix troubleshooting -> The Bluemix dashboard cannot load applications or services

The Bluemix dashboard might not display any application or service information because your organization or space cannot access it.
When you log into the Bluemix user interface, there is nothing available on your dashboard even though you have created applications and used some services before.
This problem might happen when you bind a service instance to your application, but the service is no longer accessible because the service privileges are changed for your organization or space.
To resolve the problem, type cf services in the cf command line interface to list your service instances and identify the service. Then, use the cf delete-service command to delete the service instance that is no longer accessible.

Bluemix troubleshooting -> Configuration errors appear in the server.xml file after you import a Bluemix Liberty application from IBM DevOps Services to Eclipse

If you see configuration errors in the server.xml file after you import a Bluemix Liberty application from IBM DevOps Services to Eclipse, you might need to remove the server.xml file from the project.
After you import a Bluemix Liberty application from IBM DevOps Services into the Eclipse, you see configuration errors within the server.xml file from Eclipse Problems view.
Liberty buildpack uses the server.xml file to configure application and generates a runtime-vars.xml file when the Liberty application is pushed to Bluemix. When you import the application to Eclipse, the runtime-vars.xml file doesn't exist in your local environment.
You can resolve this problem by removing the server.xml file from the project. The buildpack creates the server.xml file dynamically when you push the application as a WAR application. For more information, see Creating apps with Liberty for Java.

Bluemix troubleshooting -> A Node.js application cannot be staged

You might not be able to deploy and stage a Node.js application if the command to start the application or package to parse environment variables is not set up correctly.

When you try to deploy an application to Bluemix, you see the error message, Cannot get instances since staging failed.
The problem might happen if the environment variables are parsed incorrectly, or if the command that is used to start the application is not specified.
To resolve the problem, complete one or both of the following actions as necessary:
  • Specify the command that is used to start the application in the package.json file or in the manifest.yml file. For example, in the package.json file, you can use the following code:
    { ... "scripts": { "start": "node app.js" } }
    In the manifest.yml file, you can use the following code:
    applications: - name: testApp ... command: node app.js ...
  • Use the cf-env package to parse the environment variables, instead of doing it manually. For example, you can use the following code:
    cfEnv = require("cf-env")

Bluemix troubleshooting -> Double-byte characters are not displayed properly when Liberty applications are pushed to Bluemix

Double-byte characters might not be displayed properly if Unicode support is not configured properly for the servlet or JSP files.

When a Liberty application is pushed to the Bluemix, the double-byte characters that are specified within the application are not displayed properly.
The problem might occur if Unicode support is not configured properly for the servlet or JSP files.
You can use the following code within your servlet or JSP file:
  • In the servlet source file
    response.setContentType("text/html; charset=UTF-8");
  • In the JSP
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />