Merge pull request #718 from scottfrederick/master

* pull718:
  Update Cloud Foundry deployment documentation
This commit is contained in:
Phillip Webb 2014-04-23 22:19:23 +01:00
commit 63aa5457b0

View File

@ -30,62 +30,30 @@ developed>> in the ``Getting Started'' section up and running in the Cloud.
[[cloud-deployment-cloud-foundry]] [[cloud-deployment-cloud-foundry]]
== Cloud Foundry == Cloud Foundry
Cloud Foundry provides default buildpacks that come into play if no other buildpack is Cloud Foundry provides default buildpacks that come into play if no other buildpack is
specified. The Cloud Foundry Java buildpack has excellent support for Spring applications, specified. The Cloud Foundry https://github.com/cloudfoundry/java-buildpack[Java buildpack]
including Spring Boot. You can deploy stand-alone executable jar applications, as well as has excellent support for Spring applications, including Spring Boot. You can deploy
traditional `.war` packaged applications. stand-alone executable jar applications, as well as traditional `.war` packaged
applications.
Once you've built your application (using, for example, `mvn clean package`) and Once you've built your application (using, for example, `mvn clean package`) and
http://docs.run.pivotal.io/devguide/installcf/install-go-cli.html/[installed the `cf` http://docs.cloudfoundry.org/devguide/installcf/install-go-cli.html[installed the `cf`
command line tool], simply answer the `cf push` command prompts as follows, substituting command line tool], simply deploy your application using the `cf push` command as follows,
the path to your compiled `.jar` for mine. Be sure to have substituting the path to your compiled `.jar`. Be sure to have
http://docs.run.pivotal.io/devguide/installcf/whats-new-v6.html#login[logged in with your http://docs.cloudfoundry.org/devguide/installcf/whats-new-v6.html#login[logged in with your
`cf` command line client] before attempting to use it. `cf` command line client] before pushing an application.
[indent=0,subs="verbatim,quotes,attributes"] [indent=0,subs="verbatim,quotes,attributes"]
---- ----
$ cf push --path target/demo-0.0.1-SNAPSHOT.jar $ cf push acloudyspringtime -p target/demo-0.0.1-SNAPSHOT.jar
---- ----
If there is a Cloud Foundry `manifest.yml` file present in the same directory, it will be See the http://docs.cloudfoundry.org/devguide/installcf/whats-new-v6.html#push[`cf push`
consulted. If not, the client will prompt you with questions it has about how it should documentation] for more options. If there is a Cloud Foundry
deploy and manage your application, starting with its name: http://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html[`manifest.yml`]
file present in the same directory, it will be consulted.
[indent=0,subs="verbatim,quotes,attributes"] NOTE: Here we are substituting `acloudyspringtime` for whatever value you give `cf`
---- as the name of your application.
Name> *acloudyspringtime*
Instances> *1*
1: 128M
2: 256M
3: 512M
4: 1G
Memory Limit> *256M*
Creating acloudyspringtime... *OK*
1: acloudyspringtime
2: none
Subdomain> *acloudyspringtime*
1: cfapps.io
2: none
Domain> *cfapps.io*
Creating route acloudyspringtime.cfapps.io... *OK*
Binding acloudyspringtime.cfapps.io to acloudyspringtime... *OK*
Create services for application?> *n*
Bind other services to application?> *n*
Save configuration?> *y*
Saving to manifest.yml... *OK*
----
NOTE: Here we are substituting `acloudyspringtime` for whatever value you give `cf` when
it asks for the `name` of your application.
At this point `cf` will start uploading your application: At this point `cf` will start uploading your application:
@ -107,7 +75,8 @@ At this point `cf` will start uploading your application:
0 of 1 instances running (1 starting) 0 of 1 instances running (1 starting)
... ...
1 of 1 instances running (1 running) 1 of 1 instances running (1 running)
Push successful! App \'acloudyspringtime' available at acloudyspringtime.cfapps.io
App started
---- ----
Congratulations! The application is now live! Congratulations! The application is now live!
@ -117,11 +86,12 @@ It's easy to then verify the status of the deployed application:
[indent=0,subs="verbatim,quotes,attributes"] [indent=0,subs="verbatim,quotes,attributes"]
---- ----
$ cf apps $ cf apps
Getting applications in ... OK Getting applications in ...
OK
name status usage url name requested state instances memory disk urls
... ...
acloudyspringtime running 1 x 256M acloudyspringtime.cfapps.io acloudyspringtime started 1/1 512M 1G acloudyspringtime.cfapps.io
... ...
---- ----