Search code examples
javaeclipseibm-cloudcloud-foundryibm-cloud-tools

How to use services section of manifest during Eclipse-Bluemix Liberty for Java deployment


I have a manifest.yml for a sample java application. It includes the database service in it: applications: - name: redbooklibrary memory: 512M path: RedbookLibrary.war host: redbook-library-rew-eclipse3 buildpack: liberty-for-java services: - library_db

I have library_db already created in Bluemix (SQLDB). When I push this application through the command line, the SQLDB library_db service is automatically bound and the application works fine.

When I deploy the same application through Eclipse, I have to go through the whole deployment wizard, and manually check the library_db service. I can change the host name in the manifest, and the wizard is picking up the new name, so it is finding the manifest. However, if I deploy without manually selecting library_db, the service is not bound. So, it looks like it ignores the services section of the manifest. If I select the service manually, the application binds and works just fine.

I there something else I need to do to get Eclipse->Bluemix to recognize the services section of the manifest?


Solution

  • When you have a manifest.yml in your Web Project in Eclipse Tools for Bluemix, and that manifest.yml includes a named service instance which already exists in your space, then the wizard should automatically pick that up when you go to deploy the application.

    This means, in your case, the library_db service should be automatically checked on the services page of the wizard (but in your case, it sounds like it isn't, which would be bug.)

    However, I've tried to reproduce this problem in the latest version of IBM Eclipse Tools for Bluemix (as of August 2015 is v1.0.4), and this scenario works as expected: when I go to deploy an application with a manifest.yml, I see the service checkbox is automatically checked, based on the service value in the manifest.yml.

    My suggestion is to use the "Save to manifest file" check box on the first page of the deployment wizard. This will save a manifest.yml file for your project, and you can compare this with the manifest.yml you are currently using (as posted in your question description).