Search This Blog

Tuesday, March 5, 2019

How to configure pivotal cloud foundry onperm/laptop

If you have trial limitation with pcf trial account and you are not able to host anything due to resource constraints
you can configure the pivotal onperm single node virtual machine using the pcfdev.

Prerequisites 
Windows laptop 8 Gb ram and Virtual box 5.2 and  pcfdev plugin download from pivotal
make sure you get 30 version , lot of bugs are fixed in it. also cf cli is required

Now go to folder where pcfdev downloaded extracted // do not run pcfdev on a VM else it wont work
and run the powershell in admin mode before starting dev 
cf install-plugin cfdev
cf dev start // it will take ages like an hour or so let all services run 
if all is well you should see 58 of 58 services started , hello message else break your head 
cf dev ssh will land you inside the machine , it will provision in VB 
To debug ssh to dev using cf dev ssh -- /var/vcap/monit folder and sudo tail the monit.log 
also you can grep the drain and other libraries in the /var/pcfdev/run.log
check here  /var/vcap/sys/log/syslog_drain_binder/syslog_drain_binder.log
admin/admin is the cred to login to the api end point 
cf login -a  api.local.pcfdev.io  --skip-ssl-validation // user and pass should work .. 
you will be able to see org/quota/space 
cf create-space myspace -o orgname
cf target -s myspace
now push
create a space and push you app by cf push -f manifest.yml 
sample manifest.yml 
applications:  - name: fixserver    memory: 1024M    buildpack: https://github.com/cloudfoundry/java-buildpack.git    path: server.jar    hostname: fixserver    health-check-type: process  
health check type of process will help your app to boot atleast else it will check that port 
and mark your app as failure.

It should push you app to pcf cloud , now you can login to dash of pcf and see the logs 
also from command line 
cf logs fixserver // you can also ssh to app container by cf ssh appname

docker push appname --docker-image url  from hub
cf enable-feature-flag diego_docker    

No comments:

Post a Comment