Search code examples
deploymentruntimeibm-cloud

How can I get Bluemix to pull in multiple runtimes?


My primary application requires the node.js runtime on Bluemix. However, other components of my application require both Python and Java. How can get Bluemix to pull in all 3 runtimes when I push my app?


Solution

  • I recommend following the microservices architecture and keeping the deployment lifecyle of each of your three applications separate. You can have a manifest.yml file for each of your application and push that application when it needs to be updated. This allows you to scale them individually as well.

    If you really need to push and update all 3 applications at the same time, you can write a simple script that does a cf push with each manifest.

    cf push -f ./some_directory/application1/
    cf push -f ./some_directory/application2/
    cf push -f ./some_directory/application3/
    

    You can also have multiple applications defined in ONE manifest file https://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html#multi-apps

    ---
    # this manifest deploys two applications
    # apps are in flame and spark directories
    # flame and spark are in fireplace
    # cf push should be run from fireplace
    applications:
    - name: spark
      memory: 1G
      instances: 2
      host: flint-99
      domain: shared-domain.com
      path: ./spark/
      services:
      - mysql-flint-99
    - name: flame
      memory: 1G
      instances: 2
      host: burnin-77
      domain: shared-domain.com
      path: ./flame/
      services:
      - redis-burnin-77