By creating a manifest as follows we can push multiple applications in one go as shown below.
1. manifest.yml
applications:
- name: pas-props
  memory: 256M
  instances: 1
  host: pas-props
  domain: cfapps.io
  path: ./props.war
- name: pas-httpsession
  memory: 256M
  instances: 1
  host: pas-httpsession
  domain: cfapps.io
  path: ./haclusterdemo.war
2. Push as follows
[Thu Feb 20 14:48:45 papicella@:~/vmware/pivotal/products/cloud-foundry/apps/other ] $ cf push -f manifest-twoapps.yml
Using manifest file manifest-twoapps.yml
Creating app pas-props in org papicella-org / space development as papicella@gopivotal.com...
OK
Using route pas-props.cfapps.io
Binding pas-props.cfapps.io to pas-props...
OK
Uploading pas-props...
Uploading from: props.war
2.7K, 5 files
OK
Starting app pas-props in org papicella-org / space development as papicella@gopivotal.com...
OK
1 of 1 instances running
App started
Showing health and status for app pas-props in org papicella-org / space development as papicella@gopivotal.com...
OK
requested state: started
instances: 1/1
usage: 256M x 1 instances
urls: pas-props.cfapps.io
     state     since                    cpu    memory           disk           
#0   running   2014-02-20 02:51:14 PM   0.0%   193.2M of 256M   110.7M of 1G   
Creating app pas-httpsession in org papicella-org / space development as papicella@gopivotal.com...
OK
Creating route pas-httpsession.cfapps.io...
OK
Binding pas-httpsession.cfapps.io to pas-httpsession...
OK
Uploading pas-httpsession...
Uploading from: haclusterdemo.war
130.2K, 10 files
OK
Starting app pas-httpsession in org papicella-org / space development as papicella@gopivotal.com...
OK
0 of 1 instances running, 1 starting
1 of 1 instances running
App started
Showing health and status for app pas-httpsession in org papicella-org / space development as papicella@gopivotal.com...
OK
requested state: started
instances: 1/1
usage: 256M x 1 instances
urls: pas-httpsession.cfapps.io
     state     since                    cpu    memory           disk           
#0   running   2014-02-20 02:53:53 PM   2.0%   214.3M of 256M   113.3M of 1G   
More Information
http://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html
No comments:
Post a Comment