What is the easiest way to move the application and the services provisioned (together), from one space to the other? I understand that the service and app's are tied to a space but the usecase is that there are lot of applications that are created in an existing app. They are now required to be moved to a different space, as a subset of users only should have the access to change and work with it. I want to avoid doing the manual work of recreating everything in the new space. Both spaces are in the same org for record purposes.
Currently you cannot move an application from one space to another. As already said the only way to accomplish this is using the command line by essentially deploying the application to the other space. You could try for example a bash script like the following:
#!/bin/bash
APPNAME=$1
OLDSPACE=$2
NEWSPACE=$3
cf target -s $OLDSPACE
cf delete $APPNAME -f
cf target -s $NEWSPACE
cf push $APPNAME
Don't forget to remove the route from the original space (if you want to use the same route). You can retrieve all the routes with
cf routes
And then delete the old one with
cf delete-route
Regarding the services, deleting them and provisioning them from scratch in the new space you could need to manually migrate data or make the requested configuration again. However if the service is accessibile from outside Bluemix too it should have a public URL/IP. You could leave it in the old space and connect to it from the application in the new space.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With