CFCD Study Guide
CFCD Study Guide
This guide will help you prepare for the Cloud Foundry Certified Developer examination. The
guide is not meant to be inclusive of all topics, but rather encourage you to further study and
learn.
This guide is designed to help you prepare for the exam by asking open ended questions. The
guide does not include answers. You are responsible for researching the answers in the
documentation (docs.cloudfoundry.org), the Cloud Foundry for Developers course and using
other online resources. We recommend you try the examples provided in a Cloud Foundry
environment. This is especially helpful for the troubleshooting questions.
Basics
1. How do you deploy an application to Cloud Foundry with multiple instances, on a
non-default domain?
2. How do you set an environment variable for an application already running in Cloud
Foundry? How do you ensure the application can see the new environment variable?
3. How do you change the amount of memory already allocated to an application running in
Cloud Foundry?
4. How do you assign a new route to an application already running in Cloud Foundry?
5. You are in a space with a ruby app deployed called “myapp”. Do the following: `cf push
myapp -p java.jar`. What happens?
6. Assume you have an app accessible at myapp.example.com and you do the following:
`cf push anotherapp -n myapp -d example.com`. What happens?
2. In a browser, you access a URL you believe should be running in Cloud Foundry. You
see the following error: `404 Not Found: Requested route ('myapp.example.com') does
not exist.` What are the possible causes?
3. In a browser, you access a URL you believe should be running in Cloud Foundry. You
see the following error: `502 Bad Gateway: Registered endpoint failed to handle the
request.` What are the possible causes?
4. What is the difference between the following timeout related environment variables and
flags: `CF_STAGING_TIMEOUTE`, `CF_STARTUP_TIMEOUT` and `cf push -t
TIMEOUT`?
5. If you ssh into a container, what should you do after terminating the session? Why?
Security
1. What is the name of the default OAuth2 provider in Cloud Foundry?
Services
1. What is the difference between a User Defined Service and a Managed Service?
5. When more than one service broker exists in a Cloud Foundry instance, what values
need to be unique for each broker?
6. What is the difference between the following commands: `cf bind-service` and `cf
bind-route-service`?
7. When binding a route service to a route, do you need to restart applications bound to the
route? Why or why not?
8. What service broker API endpoint should generate and return credentials for a service
binding?
10. How do you export logs from an application running in Cloud Foundry to an external log
analysis tool?
11. How do you create a log drain? Why is a log drain necessary in Cloud Foundry?
App Management
1. What are the two types of scaling? What are the differences between the two? What
happens in Cloud Foundry when you use each type of scaling?
2. Assume you have version 1.0 of an application running in a space. You need to deploy a
new version, v1.1 of this application without impacting users. How can you do this in
Cloud Foundry? What is the requirement for schema changes between v1.0 and v1.1 for
this to work?
3. What are the two default domains every cloud foundry instance has?
4. When pushing and application, what domain does the application receive a route on
(assuming you do not specify one)?
6. What roles exist for spaces? What roles exist for orgs?
7. What component of Cloud Foundry is the aggregated stream of metrics and logs?
8. When can you restart an application and when do you need to restage?
10. If you run `cf logs --recent some-app`, what do you see?
11. Assuming the app ‘some-app’ hasn’t generated any logs in a week, what you likely see
when running `cf logs --recent some-app`? Why?
12. Given the following files in the current directory you are in: manifest.yml. What happens
when you run `cf push` from that directory?
13. Given the following files in your current directory: app-manifest.yml. What happens when
you run: `cf push` from that directory?
---
applications:
- name: my-app
memory: 512M
instances: 2
What is the value of the app name, amount of memory and number of instances when
you run `cf push my-app -m 1G -i 4`?
---
applications:
- name: my-app
memory: 512M
instances: 2
What is the value of the app name, memory and number of instances for your deployed
application when you run `cf push -m 1G -i 4 --no-manifest`?
16. What is container to container networking in Cloud Foundry? Why would you use it?
Application Design
1. What are 12 factor application best practices? Which are most important for applications
running in Cloud Foundry?
2. What is the circuit breaker pattern used for in cloud native applications?
3. Assuming you have a RESTful web service running in Cloud Foundry, describe two
ways you could version the API to support v1.0 and v2.0.
2. How can you test a custom buildpack not installed in your Cloud Foundry instance as a
system buildpack?
4. Assuming you are an app developer, how would you ensure your application uses a
specific version of your language of choice?
5. What is the difference between the following push statements: `cf push -o` and `cf push
-p`? What is different about the staging process of each?