Search This Blog

Thursday 23 November 2017

Taking Pivotal Cloud Foundry Small Footprint for a test drive

Pivotal Cloud Foundry (PCF) now has a small footprint edition. It features a deployment configuration with as few as 6 VMs. Review the documentation for download and installation instructions as follows

http://docs.pivotal.io/pivotalcf/1-12/customizing/small-footprint.html

There was also a Pivotal blog post on this as follows:

https://content.pivotal.io/blog/big-things-come-in-small-packages-getting-started-with-pivotal-cloud-foundry-small-footprint

As you can see from this image it's considerably smaller control plane that's obvious.



It is important to understand what the limitations of such an install are as per the docs link below.

http://docs.pivotal.io/pivotalcf/1-12/customizing/small-footprint.html#limits

Installing the small footprint looks identical from the Operations Manager UI in fact it's still labelled ERT and from the home page of Operations Manager UI your wouldn't even know you had the small footprint



If you dig a bit further and click on the "ERT tile" and then select "Resource Config" left hand link you will then clearly know it's the Small Footprint PCF install.


I choose to use internal MySQL database and if I didn't then it could be scaled back even more then the default 7 VM's I ended up with.

Lastly I was very curious to find out what jobs are placed on which service VM's. Here is what it looked like for me when I logged into bosh director and run some bosh CLI commands
  
ubuntu@ip-10-0-0-241:~$ bosh2 -e aws vms --column=Instance --column="Process State" --column=AZ --column="VM Type"
Using environment '10.0.16.5' as user 'director' (bosh.*.read, openid, bosh.*.admin, bosh.read, bosh.admin)

Task 73. Done

Deployment 'cf-a96683b17697c86b8c90'

Instance                                             Process State  AZ               VM Type
backup-prepare/16356c40-1f20-42f0-8f2e-de45549be797  running        ap-southeast-2a  t2.micro
blobstore/b6e22107-018b-425d-8fe4-ab47eeaf2c75       running        ap-southeast-2a  m4.large
compute/5439f18f-c842-40a2-b6f3-faf6b6848716         running        ap-southeast-2a  r4.xlarge
control/68979d93-d12b-4d87-b110-d3d41a48b261         running        ap-southeast-2a  r4.xlarge
database/a3efedaa-4df6-48f5-9f20-61cf3d9f3c1b        running        ap-southeast-2a  r4.large
mysql_monitor/d40ef638-d2d0-488e-b937-99a7f5b5b334   running        ap-southeast-2a  t2.micro
router/f9573547-c5a1-43d4-be02-38a1d9e9c73e          running        ap-southeast-2a  t2.micro

7 vms

Succeeded
  
ubuntu@ip-10-0-0-241:~$ bosh2 -e aws instances --ps --column=Instance --column=Process
Using environment '10.0.16.5' as user 'director' (bosh.*.read, openid, bosh.*.admin, bosh.read, bosh.admin)

Task 68. Done

Deployment 'cf-a96683b17697c86b8c90'

Instance                                                          Process
autoscaling-register-broker/9feaef45-994e-472c-8ca3-f0c39467dd6b  -
autoscaling/184df31d-a64c-49e0-8b6b-27eafdb31ca0                  -
backup-prepare/16356c40-1f20-42f0-8f2e-de45549be797               -
~                                                                 service-backup
blobstore/b6e22107-018b-425d-8fe4-ab47eeaf2c75                    -
~                                                                 blobstore_nginx
~                                                                 blobstore_url_signer
~                                                                 consul_agent
~                                                                 metron_agent
~                                                                 route_registrar
bootstrap/0dc22a1f-a1ee-4a03-85c6-fed08f37c44a                    -
compute/5439f18f-c842-40a2-b6f3-faf6b6848716                      -
~                                                                 consul_agent
~                                                                 garden
~                                                                 iptables-logger
~                                                                 metron_agent
~                                                                 netmon
~                                                                 nfsv3driver
~                                                                 rep
~                                                                 route_emitter
~                                                                 silk-daemon
~                                                                 vxlan-policy-agent
control/68979d93-d12b-4d87-b110-d3d41a48b261                      -
~                                                                 adapter
~                                                                 auctioneer
~                                                                 bbs
~                                                                 cc_uploader
~                                                                 cloud_controller_clock
~                                                                 cloud_controller_ng
~                                                                 cloud_controller_worker_1
~                                                                 cloud_controller_worker_local_1
~                                                                 cloud_controller_worker_local_2
~                                                                 consul_agent
~                                                                 doppler
~                                                                 file_server
~                                                                 locket
~                                                                 loggregator_trafficcontroller
~                                                                 metron_agent
~                                                                 nginx_cc
~                                                                 policy-server
~                                                                 reverse_log_proxy
~                                                                 route_registrar
~                                                                 routing-api
~                                                                 scheduler
~                                                                 silk-controller
~                                                                 ssh_proxy
~                                                                 statsd_injector
~                                                                 syslog_drain_binder
~                                                                 tps_watcher
~                                                                 uaa
database/a3efedaa-4df6-48f5-9f20-61cf3d9f3c1b                     -
~                                                                 cluster_health_logger
~                                                                 consul_agent
~                                                                 galera-healthcheck
~                                                                 gra-log-purger-executable
~                                                                 mariadb_ctrl
~                                                                 metron_agent
~                                                                 mysql-diag-agent
~                                                                 mysql-metrics
~                                                                 nats
~                                                                 route_registrar
~                                                                 streaming-mysql-backup-tool
~                                                                 switchboard
mysql-rejoin-unsafe/01a0aec3-b103-4c09-bc69-cabc61c513cc          -
mysql_monitor/d40ef638-d2d0-488e-b937-99a7f5b5b334                -
~                                                                 replication-canary
nfsbrokerpush/829f0292-59ab-4824-8b0b-c4af4bddbce0                -
notifications-ui/50972440-36cd-499d-ad7c-eef4df7e604b             -
notifications/968d625e-af63-4e2f-a59c-f6b789ef1cff                -
push-apps-manager/3d9760d7-6f09-453c-a052-32604b6a3235            -
push-pivotal-account/5a8782ad-82eb-4469-8242-f0873bc4a587         -
push-usage-service/9b781db1-171b-4abe-92f4-7445fd3d487f           -
router/f9573547-c5a1-43d4-be02-38a1d9e9c73e                       -
~                                                                 consul_agent
~                                                                 gorouter
~                                                                 metron_agent
smoke-tests/a8e2ff97-bae1-4594-90fc-ec8c430fd620                  -

77 instances

Succeeded

Now, with Small Footprint, you have yet another way to bring PCF to your organization!

Sunday 19 November 2017

Using Spring Boot Actuator endpoint for Spring Boot application health check type on PCF

An application health check is a monitoring process that continually checks the status of a running Cloud Foundry application. When deploying an app, a developer can configure the health check type (port, process, or HTTP), a timeout for starting the application, and an endpoint (for HTTP only) for the application health check.

To use the HTTP option your manifest.yml would look like this

---
applications:
- name: pas-cf-manifest
  memory: 756M
  instances: 1
  hostname: pas-cf-manifest
  path: ./target/demo-0.0.1-SNAPSHOT.jar
  health-check-type: http
  health-check-http-endpoint: /health
  stack: cflinuxfs2
  timeout: 80
  env:
    JAVA_OPTS: -Djava.security.egd=file:///dev/urandom
    NAME: Apples

Using a HTTP endpoint such as "/health" is possible once you add the Spring Boot Actuator maven dependency as follows
  
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

More Information

https://docs.run.pivotal.io/devguide/deploy-apps/healthchecks.html