Currently you can create an application in the IBMCloud dashboard or via the CLI, and you can also add services to that app. However when you deploy that app to CloudFoundry in any way (CLI or WEbUI directly, or via a DevOps Toolchain) the services are never connected.
The online help for the CLI implies that you should be able to create an app, attach services, and then deploy to either CloudFoundry or Kubernetes and it will deploy the entire app, but this is not correct.
Currently the only way to correctly deploy an app to CloudFoundry is to do it completely manually like you used to have to do it before apps and resource groups were added. This impacts anybody who is trying to use IBMCloud to create an application. At the very least the documentation is misleading and should be corrected, but really the whole concept of the application is useless right now.
I followed the exact path detailed in the online help instructions, and tried with both new and existing services with the same result.
My expectation when I use ibmcloud to create and deploy an application (specifically to CloudFoundry) is that:
- the application is created with the correct files for deployment to the chosen target
- if I add a new service, I expect that service to be created, an alias to be created automatically in the chosen org/space, and the app's manifest.yaml to be updated with the alias
- if I add an existing service, I expect an alias to be created automatically in the chosen org/space if it doesn't already exist, and the app's manifest.yaml to be updated with the alias
- if I then manually deploy, I expect the cloudFoundry build/deploy process to find and bind the alias to the app
- if I create a toolchain, I expect the deploy process to find and bind the alias
- if I later add a service, I expect the above to occur but the manifest.yaml changes to be created as a merge file that I manually merge in
Even better would be if I choose to deploy an existing application to a new CloudFoundry org/space that the deploy process automatically handles any alias creation and binding with no manual intervention.
If existing bindings exist in the org/space then they should be preferred over creating new - this would then allow the flexibility to bind to the same service across different spaces, or separate service instances per space (ie. dev/test to a common service but prod to a different service instance)