Cloud Foundry is an open source PAAS Implementation, Pivotal based on a number of CF extensions that released its own commercial version of PCF. and deploying PCF to AWS as a reference implementation is the PWS.
Current PCF -supported IAAS includes AWS, AZURE, GCP, VSphere, OpenStack.
If you are just trying to deploy an application on a PCF platform, you can choose two ways to deploy directly to PWS, and the other is to deploy a pcf--directly if you do not have a PCF-installed infrastructure, you can choose the dev version of PCF, which can be installed directly on your PC.
Direct deployment to the PWS requires a few steps: Register the PWS account, install the CF command line, log in to PWS, select a deployable application, and deploy to PWS.
- Register a PSW Account
- Install the CF command line, after installation, the verification command is available: CF Help
- Log in to PWS:
cf login -a https://api.run.pivotal.io
- Choose a deployable application that can be used directly to the Https://github.com/cloudfoundry-samples clone application, and you can see applications that are implemented in several different development languages.
- Deploy, first CD to the app directory, then CF push. After you start, you can see the URL assigned to the app in the last few lines of the output, accessible through the browser.
Requested STATE:STARTEDINSTANCES:1/1usage:1g x 1Spring-music-metronomical-remex.cfapps.ioLast Uploaded:fri Dec 2 02:40:16 UTCstack:cflinuxfs
- View real-time logs: CF logs Spring-music, the name used here is Spring-music
In the cloud, all resources are services, and DB is a service. Next look at how to switch the database:
- Lists the available configuration plans: CF Marketplace-s Elephantsql, where marketplace provides various resources,-S is the service, and Elephantsql is the service plan name. A service plan is a configuration or template that creates a service. This command lists the various configurations of all available elephantsql, with different configurations of capacity or performance. One of the plans is turtle.
- Create a service on a schedule: CF create-service elephantsql turtle MyDB, where MyDB is the name of the service created.
- Bind the app to the service: CF Bind-service Spring-music mydb
- Restart application: CF Restart Spring-music
- View service bindings: CF Services
Scaling Hardware Resources
- Adjust the application instance to 2, memory and storage space 512M:CF scale spring-music-i 2-m 512m-k 512M
The commands used are: Login, push, app; Logs Markestplace, Create-service, bind-services, services; Scale
Features Summary:
- Application deployment is simple and requires only one command. Obviously, there is a contract between PCF and application;
- Performance scalability, through the horizontal expansion, the number of free adjustment instances. And do not care about load balancing and routing and session maintenance issues. That's why it's important to choose PAAs rather than IaaS.
- All resources are services (here PWF memory and storage is not). That application and service should have some kind of contract.
Experience Pivotal Cloud Foundry