SAP Cloud Platform Cloud Foundry - a PaaS environment for development and runtime
Buildpacks - defines a container for running an application by downloading dependencies while deploying the apps
Services - set of programs that are offered to all the different run-time via marketplace(Catalog of available services) for creating service instance.
Droplet - CF unit of execution for the app, created with cf push
Spaces are standard working area/environment for individual applications. It has dedicated allocation of resources(memory, routes, services) from global account.
Route - URL mapped to dedicated app
Application manifest - manifest.yml - used by the “cf push” command for setting up the environment when the app is deployed to CF
---
applications:
- name: my-app
buildpack: nodejs_buildpack
command: node app.js
memory: 512M
disk_quota: 512M
instances: 2
host: myapp-cf-nodejs
services:
-mymongodb_srv
-------------------------------------------------------------------------------------
Command Line Interface CLI - helps in managing apps on CF
http://cli.cloudfoundry.org - CLI reference guide
cf -v
cf login -a api.run.pivotal.io
cf login -a api.cf.eu10.hana.ondemand.com
cf push your_app
cf logs myapp --recent
cf logs myapp | grep -v RTR
cf env <your_app>
cf set-env <your_app>
cf buildpacks
cf marketplace -s elephantsql
cf create-service <service> <plan> <my-service-instance>
cf delete-service <my-service-instance>
cf bind-service <my-app> <my-service-instance>
cf restart <cf-spring>
cf service <my-service-instance>
cf services
cf services | grep <my-service-instance>
Binding a service instance to a route will cause application requests and responses to be proxied through the service instance, where it may be used to transform or intermediate requests.
cf bind-route-service shared-domain.example.com --hostname my-app my-service-instance
Vertical Scaling - Increasing the available disk space or memory can improve overall app performance.
cf scale cf-spring -m 1G
cf scale cf-spring -k 512M
Horizontal Scaling - Adding more instances allows your application to handle increased traffic( user load and concurrent requests) and demand.
cf scale cf-spring -i 2
cf app cf-spring
Tools
Kibana - Open Source logging and data visualization platform - Provides dashboard