Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v114
Fetching contributors…

Cannot retrieve contributors at this time

222 lines (189 sloc) 7.321 kb
---
<% db = properties.ccdb.databases.find { |db| db.tag == "cc" } %>
<% db_role = properties.ccdb.roles.find { |role| role.tag == "admin" } %>
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 properties.cc.allow_registration || properties.cc.allow_registration == nil %>
allow_registration: true
<% else %>
allow_registration: false
<% end %>
external_port: 9022 #public CC port
<% if properties.cc.max_droplet_size %>
max_droplet_size: <%= properties.cc.max_droplet_size %>
<% end %>
bulk_api:
auth:
user: bulk_api
password: <%= properties.cc.password %>
nginx:
use_nginx: <%= properties.cc.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: <%= properties.cc.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: <%= properties.cc.logging_level || "info" %>
rails_logging:
file: /var/vcap/sys/log/cloud_controller/rails.log
level: <%= properties.cc.rails_logging_level || "info" %>
event_logging:
file: /var/vcap/sys/log/cloud_controller/events.log
keys:
password: <%= properties.cc.password %>
token: <%= properties.cc.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 properties.cc.new_initial_placement && spec.index.to_i == 0 %>
new_initial_placement: true
<% else %>
new_initial_placement: false
<% end %>
database_environment:
production:
database: <%= db.name %>
host: <%= properties.ccdb.address %>
port: <%= properties.ccdb.port %>
encoding: utf8
username: <%= db_role.name %>
password: <%= db_role.password %>
pool: <%= properties.ccdb.pool_size %>
timeout: 2000
template: template0 # Required for utf8 encoding
adapter: postgresql
<% if properties.cc.uaa && properties.uaa.cc %>
uaa:
enabled: <%= properties.cc.uaa.enabled %>
url: https://uaa.<%= properties.domain %>
resource_id: <%= properties.cc.uaa.resource_id %>
token_secret: <%= properties.uaa.cc.token_secret %>
client_secret: <%= properties.uaa.cc.client_secret %>
token_creation_email_filter: <%= properties.cc.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: <%= properties.cc.max_staging_runtime || 120 %>
auth:
user: <%= properties.cc.staging_upload_user %>
password: <%= properties.cc.staging_upload_password %>
allow_debug: <%= properties.cc.allow_debug || false %>
admins: [ "<%= properties.cc.admins.join('", "') %>" ]
https_required: <%= properties.cc.https_required || false %>
https_required_for_admins: <%= properties.cc.https_required_for_admins || false %>
<% if properties.cc.admin_account_capacity %>
admin_account_capacity:
memory: <%= properties.cc.admin_account_capacity.memory || 32 * 1024 %>
app_uris: <%= properties.cc.admin_account_capacity.app_uris || 16 %>
services: <%= properties.cc.admin_account_capacity.services || 32 %>
apps: <%= properties.cc.admin_account_capacity.apps || 200 %>
<% end %>
# Normal users limited to 512M, 4 Services, and 4 URIs per App
default_account_capacity:
<% unless properties.cc.default_account_capacity %>
memory: 2048
app_uris: 4
services: 16
apps: 20
<% else %>
memory: <%= properties.cc.default_account_capacity.memory || 2048 %>
app_uris: <%= properties.cc.default_account_capacity.app_uris || 4 %>
services: <%= properties.cc.default_account_capacity.services || 16 %>
apps: <%= properties.cc.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.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 properties.cc.service_extension && properties.cc.service_extension.service_lifecycle
max_upload_size = properties.cc.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.