'cf push' is the command used in Cloud Foundry for uploading the applications to Cloud foundry. You can deploy an application to Cloud Foundry by running a cf push command from the Cloud Foundry command line interface ( cf CLI).
CF Push -F
cf push : Here is my source code
Run it on the cloud for me
I do not care how ...
How to specify health check timeout
CF Push -t 600 -F manifest file name
maximum 600ms
$ cf restart YOUR-APP
$ cf delete YOUR-APP
$ cf restage YOUR-APP
$ cf scale myApp -i 5
$ cf scale myApp -k 512M
$ cf scale myApp -m 1G
$ cf env my-app
$cf push -f mytomcat
$ cf set-env APP_NAME ENV_VAR_NAME ENV_VAR_VALUE
$ cf login
API endpoint: https://api.run.pivotal.io
Email> nanduni@wso2.com
Password>
Authenticating...
OK
Targeted org nanduni-org
Targeted space development
API endpoint: https://api.run.pivotal.io (API version: 2.48.0)
User: nanduni@wso2.com
Org: nanduni-org
Space: development
$ cf push mytomcat
Creating app mytomcat in org nanduni-org / space development as nanduni@wso2.com...
OK
Creating route mytomcat.cfapps.io...
OK
Binding mytomcat.cfapps.io to mytomcat...
OK
Uploading mytomcat...
Uploading app files from: /home/nanduni/apache-tomcat-7.0.67/webapps/Servlet3
Uploading 3.2K, 7 files
Done uploading
OK
development as nanduni@wso2.com...
OK
requested state: started
instances: 1/1
usage: 1G x 1 instances
urls: mytomcat.cfapps.io
last uploaded: Wed Jan 27 05:54:32 UTC 2016
stack: cflinuxfs2
buildpack: java-buildpack=v3.5.1-http://github.com/pivotal-cf/pcf-java-buildpack.git#d6c19f8 open-jdk-like-jre=1.8.0_65 open-jdk-like-memory-calculator=2.0.1_RELEASE tomcat-access-logging-support=2.5.0_RELEASE tomcat-instance=8.0.30 tomcat-lifecycle-support=2.5.0...
state since cpu memory disk details
#0 running 2016-01-27 11:25:10 AM 0.0% 109.2M of 1G 129.5M of 1G
$ cf target
API endpoint: https://api.run.pivotal.io (API version: 2.48.0)
User: nanduni@wso2.com Org: nanduni-org Space: development$ cf restart YOUR-APP$ cf delete YOUR-APP$ cf restage YOUR-APP$ cf scale myApp -i 5
$ cf scale myApp -k 512M$ cf scale myApp -m 1G$ cf env my-app
Getting env variables for app my-app in org my-org / space my-space as
admin...
OK
System-Provided:
{
"VCAP_APPLICATION": {
"application_id": "fa05c1a9-0fc1-4fbd-bae1-139850dec7a3",
"application_name": "my-app",
"application_uris": [
"my-app.192.0.2.34.xip.io"
],
"application_version": "fb8fbcc6-8d58-479e-bcc7-3b4ce5a7f0ca",
"limits": {
"disk": 1024,
"fds": 16384,
"mem": 256
},
"name": "my-app",
"space_id": "06450c72-4669-4dc6-8096-45f9777db68a",
"space_name": "my-space",
"uris": [
"my-app.192.0.2.34.xip.io"
],
"users": null,
"version": "fb8fbcc6-8d58-479e-bcc7-3b4ce5a7f0ca"
}
User-Provided:
MY_DRAIN: http://drain.example.com
MY_ENV_VARIABLE: 100$ cf set-env APP_NAME ENV_VAR_NAME ENV_VAR_VALUE
$ cf restart YOUR-APP$ cf restart YOUR-APP$ cf restart YOUR-APP$ cf restart YOUR-APP$ cf restage YOUR-APP$ cf restart YOUR-APP
Restage Your Application
To restage your application, run the following command:Restaging your application stops your application and restages it, by compiling a new droplet and starting it.
Restart Your Application
To restart your application, run the following command:
Restarting your application stops your application and restarts it with the already compiled droplet. A droplet is a tarball that includes:
Scaling Horizontally
Horizontally scaling an application creates or destroys instances of your application.
Incoming requests to your application are automatically load balanced across all instances of your application, and each instance handles tasks in parallel with every other instance. Adding more instances allows your application to handle increased traffic and demand.
Use cf scale APP -i INSTANCES
to horizontally scale your application. Cloud Foundry will increase or decrease the number of instances of your application to match INSTANCES
.
Scaling Vertically
Vertically scaling an application changes the disk space limit or memory limit that Cloud Foundry applies to all instances of the application.
Use cf scale APP -k DISK
to change the disk space limit applied to all instances of your application. DISK
must be an integer followed by either an M, for megabytes, or G, for gigabytes.
Use cf scale APP -m MEMORY
to change the memory limit applied to all instances of your application. MEMORY
must be an integer followed by either an M, for megabytes, or G, for gigabytes.
To restage your application, run the following command:
Restart Your Application
To restart your application, run the following command:
Restarting your application stops your application and restarts it with the already compiled droplet. A droplet is a tarball that includes:
Scaling Horizontally
Horizontally scaling an application creates or destroys instances of your application.
Incoming requests to your application are automatically load balanced across all instances of your application, and each instance handles tasks in parallel with every other instance. Adding more instances allows your application to handle increased traffic and demand.
Use
cf scale APP -i INSTANCES
to horizontally scale your application. Cloud Foundry will increase or decrease the number of instances of your application to match INSTANCES
.Scaling Vertically
Vertically scaling an application changes the disk space limit or memory limit that Cloud Foundry applies to all instances of the application.
Use
cf scale APP -k DISK
to change the disk space limit applied to all instances of your application. DISK
must be an integer followed by either an M, for megabytes, or G, for gigabytes.Use
cf scale APP -m MEMORY
to change the memory limit applied to all instances of your application. MEMORY
must be an integer followed by either an M, for megabytes, or G, for gigabytes.
$ cf buildpacks
Getting buildpacks...
buildpack position enabled locked filename
staticfile_buildpack 1 true false staticfile_buildpack-cached-v1.3.0.zip
java_buildpack 2 true false java-buildpack-v3.5.1.zip
ruby_buildpack 3 true false ruby_buildpack-cached-v1.6.12.zip
nodejs_buildpack 4 true false nodejs_buildpack-cached-v1.5.5.zip
go_buildpack 5 true false go_buildpack-cached-v1.7.2.zip
python_buildpack 6 true false python_buildpack-cached-v1.5.4.zip
php_buildpack 7 true false php_buildpack-cached-v4.3.3.zip
liberty_buildpack 8 true false liberty_buildpack.zip
binary_buildpack 9 true false binary_buildpack-cached-v1.0.1.zip
No comments:
Post a Comment