@@ -30,66 +30,104 @@ developed>> in the ``Getting Started'' section up and running in the Cloud.
3030[[cloud-deployment-cloud-foundry]]
3131== Cloud Foundry
3232Cloud Foundry provides default buildpacks that come into play if no other buildpack is
33- specified. The Cloud Foundry buildpack has excellent support for Spring applications,
33+ specified. The Cloud Foundry Java buildpack has excellent support for Spring applications,
3434including Spring Boot. You can deploy stand-alone executable jar applications, as well as
35- traditional `war` packaged applications.
35+ traditional `. war` packaged applications.
3636
3737Once you've built your application (using, for example, `mvn clean install`) and
38- http://docs.cloudfoundry.org/devguide/installcf/[installed the `cf` command line tool],
39- simply answer the `cf push` command's prompts as follows:
38+ http://docs.run.pivotal.io/devguide/installcf/install-go-cli.html/[installed the `cf`
39+ command line tool], simply answer the `cf push` command prompts as follows, substituting
40+ the path to your compiled `.jar` for mine. Be sure to have
41+ http://docs.run.pivotal.io/devguide/installcf/whats-new-v6.html#login[logged in with your
42+ `cf` command line client] before attempting to use it.
4043
4144[indent=0,subs="verbatim,quotes,attributes"]
4245----
4346 $ cf push --path target/demo-0.0.1-SNAPSHOT.jar
47+ ----
48+
49+ If there is a Cloud Foundry `manifest.yml` file present in the same directory, it will be
50+ consulted. If not, the client will prompt you with questions it has about how it should
51+ deploy and manage your application, starting with its name:
52+
53+ [indent=0,subs="verbatim,quotes,attributes"]
54+ ----
55+ Name> *acloudyspringtime*
4456
45- Name> *_$YOURAPP_*
4657 Instances> *1*
58+
59+ 1: 128M
60+ 2: 256M
61+ 3: 512M
62+ 4: 1G
4763 Memory Limit> *256M*
4864
49- Creating _$YOURAPP_ ... *OK*
65+ Creating acloudyspringtime ... *OK*
5066
51- 1: _$YOURAPP_
67+ 1: acloudyspringtime
5268 2: none
53- Subdomain> *_$YOURAPP_ *
69+ Subdomain> *acloudyspringtime *
5470
5571 1: cfapps.io
5672 2: none
5773 Domain> *cfapps.io*
5874
59- Creating route _$YOURAPP_ .cfapps.io... OK
60- Binding _$YOURAPP_ .cfapps.io to _$YOURAPP_ ... OK
75+ Creating route acloudyspringtime .cfapps.io... *OK*
76+ Binding acloudyspringtime .cfapps.io to acloudyspringtime ... *OK*
6177
6278 Create services for application?> *n*
79+
6380 Bind other services to application?> *n*
81+
6482 Save configuration?> *y*
83+
84+ Saving to manifest.yml... *OK*
6585----
6686
87+ NOTE: Here we are substituting `acloudyspringtime` for whatever value you give `cf` when
88+ it asks for the `name` of your application.
89+
6790At this point `cf` will start uploading your application:
6891
6992[indent=0,subs="verbatim,quotes,attributes"]
7093----
71- Saving to manifest.yml... *OK*
72- Uploading $YOURAPP... *OK*
73- Preparing to start _$YOURAPP_... *OK*
74- -----> Downloaded app package (8.7M)
94+ Uploading acloudyspringtime... *OK*
95+ Preparing to start acloudyspringtime... *OK*
96+ -----> Downloaded app package (*8.9M*)
7597 -----> Java Buildpack source: system
76- -----> Downloading Open JDK 1.7.0_51 from .../openjdk-1.7.0_51.tar.gz (*1.4s*)
77- Expanding Open JDK to .java-buildpack/open_jdk (*1.3s*)
78- -----> Downloading Spring Auto Reconfiguration 0.8.7 from .../auto-reconfiguration-0.8.7.jar (*0.0s*)
79- -----> Uploading droplet (*43M*)
80- Checking status of app '_$YOURAPP_'...
81- 0 of 1 instances running (1 starting)
82- 0 of 1 instances running (1 starting)
83- 1 of 1 instances running (1 running)
84- Push successful! App '_$YOURAPP_' available at http://_$YOURAPP_.cfapps.io
98+ -----> Downloading Open JDK 1.7.0_51 from .../x86_64/openjdk-1.7.0_51.tar.gz (*1.8s*)
99+ Expanding Open JDK to .java-buildpack/open_jdk (*1.2s*)
100+ -----> Downloading Spring Auto Reconfiguration from 0.8.7 .../auto-reconfiguration-0.8.7.jar (*0.1s*)
101+ -----> Uploading droplet (*44M*)
102+ Checking status of app 'acloudyspringtime'...
103+ 0 of 1 instances running (1 starting)
104+ ...
105+ 0 of 1 instances running (1 down)
106+ ...
107+ 0 of 1 instances running (1 starting)
108+ ...
109+ 1 of 1 instances running (1 running)
110+ Push successful! App \'acloudyspringtime' available at acloudyspringtime.cfapps.io
85111----
86112
87- NOTE: Here we are substituting `$YOURAPP` for whatever value you give `cf` when it asks
88- for the `name` of your application.
113+ Congratulations! The application is now live!
114+
115+ It's easy to then verify the status of the deployed application:
116+
117+ [indent=0,subs="verbatim,quotes,attributes"]
118+ ----
119+ $ cf apps
120+ Getting applications in ... OK
121+
122+ name status usage url
123+ ...
124+ acloudyspringtime running 1 x 256M acloudyspringtime.cfapps.io
125+ ...
126+ ----
89127
90128Once Cloud Foundry acknowledges that your application has been deployed, you should be
91- able to hit the application at the URI provided:
92- `http://$YOURAPP .cfapps.io/`.
129+ able to hit the application at the URI given, in this case
130+ `http://acloudyspringtime .cfapps.io/`.
93131
94132
95133
0 commit comments