@@ -30,66 +30,104 @@ developed>> in the ``Getting Started'' section up and running in the Cloud.
30
30
[[cloud-deployment-cloud-foundry]]
31
31
== Cloud Foundry
32
32
Cloud 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,
34
34
including Spring Boot. You can deploy stand-alone executable jar applications, as well as
35
- traditional `war` packaged applications.
35
+ traditional `. war` packaged applications.
36
36
37
37
Once 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.
40
43
41
44
[indent=0,subs="verbatim,quotes,attributes"]
42
45
----
43
46
$ 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*
44
56
45
- Name> *_$YOURAPP_*
46
57
Instances> *1*
58
+
59
+ 1: 128M
60
+ 2: 256M
61
+ 3: 512M
62
+ 4: 1G
47
63
Memory Limit> *256M*
48
64
49
- Creating _$YOURAPP_ ... *OK*
65
+ Creating acloudyspringtime ... *OK*
50
66
51
- 1: _$YOURAPP_
67
+ 1: acloudyspringtime
52
68
2: none
53
- Subdomain> *_$YOURAPP_ *
69
+ Subdomain> *acloudyspringtime *
54
70
55
71
1: cfapps.io
56
72
2: none
57
73
Domain> *cfapps.io*
58
74
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*
61
77
62
78
Create services for application?> *n*
79
+
63
80
Bind other services to application?> *n*
81
+
64
82
Save configuration?> *y*
83
+
84
+ Saving to manifest.yml... *OK*
65
85
----
66
86
87
+ NOTE: Here we are substituting `acloudyspringtime` for whatever value you give `cf` when
88
+ it asks for the `name` of your application.
89
+
67
90
At this point `cf` will start uploading your application:
68
91
69
92
[indent=0,subs="verbatim,quotes,attributes"]
70
93
----
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*)
75
97
-----> 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
85
111
----
86
112
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
+ ----
89
127
90
128
Once 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/`.
93
131
94
132
95
133
0 commit comments