Friday, August 18, 2017

Cloud Foundry @ PIVOTAL WEB SERVICES

Cloud Foundry Providers :

•• Cloud Foundry Foundation – http://cloudfoundry.org/
•• ActiveState Stackato – http://www.activestate.com/stackato
FF Free for production use up to 20GB RAM
•• AppFog – http://appfog.com/
FF 30-day free trial (up to 2GB RAM)
•• IBM Bluemix – http://www.ibm.com/software/bluemix/
FF 30-day free trial (up to 2GB RAM)
•• Pivotal Cloud Foundry – http://pivotal.io/platform-as-aservice/pivotal-cloud-foundry
FF 90 day evaluation term, non-production use, up to 50 app instances
•• Pivotal Web Services – https://run.pivotal.io/
FF 60-day free trial (up to 2GB RAM)

Create a account @ Pivotal Web Services (PWS): http://run.pivotal.io/

Deploy the Sample App: 
  1. Download the app with git:
    git clone https://github.com/cloudfoundry-samples/cf-sample-app-spring.git
  2. Navigate to the app directory: cd cf-sample-app-spring
  3. Sign in to PWS: cf login -a https://api.run.pivotal.io
  4. Push the app to PWS: cf push my_app
View the Logs: 
  1. View a snapshot of recent logs: cf logs cf-spring --recent 
  2. Stream live logs: cf logs cf-spring 
Adding a Service/Connect a Database:
  1. List the available ElephantSQL plans: cf marketplace -s elephantsql
  2. Create a service instance with the free plan: cf create-service elephantsql turtle cf-spring-db
  3. Bind the newly created service to the app: cf bind-service cf-spring cf-spring-db
    NotE: Once a service is bound to an app, environment variables are stored that allow the app to connect to the service after a push, restage, or restart command.
  4. Restart the app: cf restart cf-spring
  5. Verify the new service is bound to the app: cf services 
Create/Delete user-provided service:
  1. Create Eureka Server as eureka-service : cf cups eureka-service -p '{"uri":"https://eureka007.cfapps.io/"}'
  2. Delete eureka-service : cf delete-service eureka-service
 Scale the App: 
  1. Increase the number of app instances to two: cf scale cf-spring -i 2
  2. Check the status of the app and verify there are two instances running: cf app cf-spring
    NotE: Scaling your app vertically changes the disk space limit or memory limit for each app instance.
  3. Increase the memory limit for each app instance: cf scale cf-spring -m 1G
  4. Increase the disk limit for each app instance: cf scale cf-spring -k 512M

No comments:

Post a Comment

உப்பு மாங்காய்

சுருக்குப்பை கிழவி. சுருக்கங்கள் சூழ் கிழவி. பார்க்கும் போதெல்லாம் கூடையுடனே குடியிருப்பாள். கூடை நிறைய குட்டி குட்டி மாங்காய்கள். வெட்டிக்க...