I found the Command Line Interface (CLI) of IBM Bluemix (rather IBM Cloud now) very useful. I have tried deploying a few test applications. This article is more for my reference to be able to deploy more application on my IBM Bluemix account. Elaborate steps are provided in the IBM Training on Bluemix and IBM User Manuals. This is a subset of that with just the commands I require.
To be able to use this feature, one needs having a IBM Bluemix account. Also, one needs installing IBM Bluemix CLI on their machine.
I provide here the necessary commands and a few troubleshooting steps in case they do not work.
On you terminal, the first step is to change the current directory to the directory where the Application is available. Next, one needs to login to IBM Bluemix. The command for that is as follows:
NOTE: The words in Italics are the parameters needed for the command or command option. These need to be replaced suitably.
bx login -u partha -o majumdar -s dev |
|
|
If this command gives an error, check for the following:
|
![]() |
Next, we need to bind the services required for the Application. To find the available services and the plans for the same, use the following command.
bx service offerings | grep -i Language |
|
![]() |
In this example, I am interested in the “language_translator” service. It is offered in standard*, advanced*, premium*, lite plans. The plan with an asterix (*) against them are paid plans. |
Now, bind the service.
bx service create language_translator lite "Language Translator-x1" |
Provide the name of the service as found in the Service Offerings. Provide the name of the plan as found in the Service Offerings. Provide the name of your service as defined in the manifest file created by you. |
The command can give an error only if the Service being binded is not available to you. It needs noting that all services are not available in all regions. Also, if the service being binded is a paid service, it needs to be subscribed before it can be binded. |
![]() |
Now, all you need to do is to push your application.
bx app push |
This command can give a number of errors. However, these are out of scope of this article. The errors can arise because of the code written for the application. These errors are compilation errors. One would need to debug their program to rectify these errors.
The below screen shot provides the last bit of the output if the push of the application takes place successfully. |
![]() |
You must be logged in to post a comment.