Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v128
Fetching contributors…

Cannot retrieve contributors at this time

229 lines (194 sloc) 7.387 kb
---
<% cc_props_name = properties.cc_props || 'cc' %>
<% cc_props = properties.send(cc_props_name) %>
<% ccdb_prop_name = properties.db || 'ccdb' %>
<% ccdb = properties.send(ccdb_prop_name) %>
<% db_name = ccdb.databases.find { |db| db.tag == "cc" }.name %>
<% db_role = ccdb.roles.find { |role| role.tag == "admin" } %>
external_uri: <%= cc_props.external_uri || "api." + properties.domain %>
description: <%= properties.description || "VMware's Cloud Application Platform" %>
support_address: <%= properties.support_address || "http://support.cloudfoundry.com" %>
local_route: <%= spec.networks.send(properties.networks.apps).ip %>
<% if cc_props.allow_registration || cc_props.allow_registration == nil %>
allow_registration: true
<% else %>
allow_registration: false
<% end %>
external_port: 9022 #public CC port
<% if cc_props.max_droplet_size %>
max_droplet_size: <%= cc_props.max_droplet_size %>
<% end %>
bulk_api:
auth:
user: bulk_api
password: <%= cc_props.password %>
nginx:
use_nginx: <%= cc_props.use_nginx %> #nginx proxy in front of CC?
instance_socket: /var/vcap/sys/run/cloud_controller/cloud_controller.sock
#insecure_instance_port: 9025 #NOT SECURE -- DEBUG ONLY!!!!
index: <%= spec.index %>
index_page: <%= cc_props.index_page %>
info_file: /var/vcap/packages/cloud_controller/config/cloud_controller-info.json
# Legacy (FIXME REMOVE)
# Can't be removed yet since CC checks to make sure it's present
allow_external_app_uris: false
app_uris:
allow_external: false
reserved_file: /var/vcap/jobs/cloud_controller/config/blacklist.txt
reserved_length: 3
directories:
droplets: /var/vcap/shared/droplets
resources: /var/vcap/shared/resources
staging_manifests: /var/vcap/jobs/cloud_controller/config/staging
tmpdir: /var/vcap/data/cloud_controller/tmp
logging:
file: /var/vcap/sys/log/cloud_controller/cloud_controller.log
<% if properties.syslog_aggregator %>
syslog: vcap.cloud_controller
<% end %>
level: <%= cc_props.logging_level || "info" %>
rails_logging:
file: /var/vcap/sys/log/cloud_controller/rails.log
level: <%= cc_props.rails_logging_level || "info" %>
event_logging:
file: /var/vcap/sys/log/cloud_controller/events.log
keys:
password: <%= cc_props.password %>
token: <%= cc_props.token %>
pid: /var/vcap/sys/run/cloud_controller/cloud_controller.pid
mbus: nats://<%= properties.nats.user %>:<%= properties.nats.password %>@<%= properties.nats.address %>:<%= properties.nats.port %>
rails_environment: production
<% if cc_props.new_initial_placement && spec.index.to_i == 0 %>
new_initial_placement: true
<% else %>
new_initial_placement: false
<% end %>
cc_partition: <%= cc_props.cc_partition || "default" %>
database_environment:
production:
database: <%= db_name %>
host: <%= ccdb.address %>
port: <%= ccdb.port %>
encoding: utf8
username: <%= db_role.name %>
password: <%= db_role.password %>
pool: <%= ccdb.pool_size %>
timeout: 2000
template: template0 # Required for utf8 encoding
adapter: postgresql
<% if cc_props.uaa && properties.uaa.cc %>
uaa:
enabled: <%= cc_props.uaa.enabled %>
url: https://uaa.<%= properties.domain %>
resource_id: <%= cc_props.uaa.resource_id %>
token_secret: <%= properties.uaa.cc.token_secret %>
client_secret: <%= properties.uaa.cc.client_secret %>
token_creation_email_filter: <%= cc_props.uaa.token_creation_email_filter %>
<% else %>
uaa:
enabled: false
url: https://uaa.<%= properties.domain %>
resource_id: cloud_controller
token_secret:
client_secret:
token_creation_email_filter:
<% end %>
<% if properties.vcap_redis %>
redis:
host: <%= properties.vcap_redis.address %>
port: <%= properties.vcap_redis.port %>
password: <%= properties.vcap_redis.password %>
<% end %>
staging:
max_staging_runtime: <%= cc_props.max_staging_runtime || 300 %>
auth:
user: <%= cc_props.staging_upload_user %>
password: <%= cc_props.staging_upload_password %>
allow_debug: <%= cc_props.allow_debug || false %>
admins: [ "<%= cc_props.admins.join('", "') %>" ]
https_required: <%= cc_props.https_required || false %>
https_required_for_admins: <%= cc_props.https_required_for_admins || false %>
<% if cc_props.admin_account_capacity %>
admin_account_capacity:
memory: <%= cc_props.admin_account_capacity.memory || 32 * 1024 %>
app_uris: <%= cc_props.admin_account_capacity.app_uris || 16 %>
services: <%= cc_props.admin_account_capacity.services || 32 %>
apps: <%= cc_props.admin_account_capacity.apps || 200 %>
<% end %>
# Normal users limited to 512M, 4 Services, and 4 URIs per App
default_account_capacity:
<% unless cc_props.default_account_capacity %>
memory: 2048
app_uris: 4
services: 16
apps: 20
<% else %>
memory: <%= cc_props.default_account_capacity.memory || 2048 %>
app_uris: <%= cc_props.default_account_capacity.app_uris || 4 %>
services: <%= cc_props.default_account_capacity.services || 16 %>
apps: <%= cc_props.default_account_capacity.apps || 16 %>
<% end %>
builtin_services:
<% services = ['mysql', 'redis', 'mongodb', 'memcached', 'rabbit', 'postgresql', 'atmos', 'filesystem', 'vblob'] %>
<% for service in services %>
<% service_gateway = "#{service}_gateway" %>
<% if properties.send(service_gateway.to_sym) %>
<% service = 'rabbitmq' if service == 'rabbit'
service = 'blob' if service == 'vblob' %>
<%= "#{service}:"%>
token: <%= properties.send(service_gateway.to_sym).token %>
<% if properties.send(service_gateway.to_sym).token_b %>
token_b: <%= properties.send(service_gateway.to_sym).token_b %>
<% end %>
<% end %>
<% end %>
<% if properties.external_service_tokens %>
<% properties.external_service_tokens.marshal_dump.each do |name,token| %>
<%= name %>:
token: <%= token %>
<% end %>
<% end %>
<%
service_proxy_tokens = []
if properties.service_broker
properties.service_broker.token.each { |tok| service_proxy_tokens << tok }
end
if properties.marketplace_gateway
properties.marketplace_gateway.tokens.each { |tok| service_proxy_tokens << tok }
end
%>
service_proxy:
token: <%= "['#{service_proxy_tokens.join("' , '")}']" %>
<%
if cc_props.service_extension && cc_props.service_extension.service_lifecycle
max_upload_size = cc_props.service_extension.service_lifecycle.max_upload_size || 1
if properties.service_lifecycle
if properties.service_lifecycle.serialization_max_download_size
max_download_size = properties.service_lifecycle.serialization_max_download_size
if max_upload_size.to_i > max_download_size.to_i
max_upload_size = max_download_size.to_i
end
end
sds = properties.service_lifecycle.serialization_data_server
end
if properties.serialization_data_server
sds_port = properties.serialization_data_server.port
upload_token = properties.serialization_data_server.upload_token
upload_timeout = properties.serialization_data_server.upload_timeout
end
sds_port ||= 8080
%>
service_lifecycle:
max_upload_size: <%= max_upload_size %>
upload_token: <%= upload_token %>
<% if upload_timeout %>
upload_timeout: <%=upload_timeout%>
<% end %>
<% if sds %>
serialization_data_server:
<% sds.each do |server| %>
- <%=server%>:<%=sds_port%>
<% end %>
<% end %>
<% end %>
runtimes_file: /var/vcap/jobs/cloud_controller/config/runtimes.yml
Jump to Line
Something went wrong with that request. Please try again.