bosh-cloudfoundry 0.6.1 → 0.7.0.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -1
- data/.rspec +1 -1
- data/.travis.yml +9 -3
- data/ChangeLog.md +12 -47
- data/Gemfile +11 -5
- data/Guardfile +4 -7
- data/LICENSE.txt +2 -2
- data/README.md +62 -178
- data/Rakefile +40 -16
- data/bosh-cloudfoundry.gemspec +19 -27
- data/bosh_release/.final_builds/.gitattributes +1 -0
- data/bosh_release/.final_builds/jobs/acm/index.yml +10 -0
- data/bosh_release/.final_builds/jobs/atmos_gateway/index.yml +58 -0
- data/bosh_release/.final_builds/jobs/backup_manager/index.yml +66 -0
- data/bosh_release/.final_builds/jobs/ccdb/index.yml +6 -0
- data/bosh_release/.final_builds/jobs/ccdb_postgres/index.yml +31 -0
- data/bosh_release/.final_builds/jobs/cloud_controller/index.yml +230 -0
- data/bosh_release/.final_builds/jobs/cloud_controller_ng/index.yml +31 -0
- data/bosh_release/.final_builds/jobs/collector/index.yml +27 -0
- data/bosh_release/.final_builds/jobs/dashboard/index.yml +43 -0
- data/bosh_release/.final_builds/jobs/dea/index.yml +86 -0
- data/bosh_release/.final_builds/jobs/dea_next/index.yml +51 -0
- data/bosh_release/.final_builds/jobs/debian_nfs_server/index.yml +30 -0
- data/bosh_release/.final_builds/jobs/filesystem_gateway/index.yml +54 -0
- data/bosh_release/.final_builds/jobs/gorouter/index.yml +11 -0
- data/bosh_release/.final_builds/jobs/hbase_master/index.yml +6 -0
- data/bosh_release/.final_builds/jobs/hbase_slave/index.yml +10 -0
- data/bosh_release/.final_builds/jobs/health_manager/index.yml +82 -0
- data/bosh_release/.final_builds/jobs/health_manager_next/index.yml +31 -0
- data/bosh_release/.final_builds/jobs/login/index.yml +47 -0
- data/bosh_release/.final_builds/jobs/marketplace_gateway/index.yml +38 -0
- data/bosh_release/.final_builds/jobs/memcached_gateway/index.yml +50 -0
- data/bosh_release/.final_builds/jobs/memcached_node/index.yml +22 -0
- data/bosh_release/.final_builds/jobs/memcached_node_ng/index.yml +50 -0
- data/bosh_release/.final_builds/jobs/micro/index.yml +374 -0
- data/bosh_release/.final_builds/jobs/mongodb_gateway/index.yml +126 -0
- data/bosh_release/.final_builds/jobs/mongodb_node/index.yml +110 -0
- data/bosh_release/.final_builds/jobs/mongodb_node_ng/index.yml +66 -0
- data/bosh_release/.final_builds/jobs/mysql_gateway/index.yml +110 -0
- data/bosh_release/.final_builds/jobs/mysql_node/index.yml +126 -0
- data/bosh_release/.final_builds/jobs/mysql_node_ng/index.yml +58 -0
- data/bosh_release/.final_builds/jobs/nats/index.yml +43 -0
- data/bosh_release/.final_builds/jobs/oauth2_gateway/index.yml +10 -0
- data/bosh_release/.final_builds/jobs/opentsdb/index.yml +62 -0
- data/bosh_release/.final_builds/jobs/postgres/index.yml +19 -0
- data/bosh_release/.final_builds/jobs/postgresql_gateway/index.yml +106 -0
- data/bosh_release/.final_builds/jobs/postgresql_node/index.yml +90 -0
- data/bosh_release/.final_builds/jobs/postgresql_node_ng/index.yml +62 -0
- data/bosh_release/.final_builds/jobs/rabbit_gateway/index.yml +82 -0
- data/bosh_release/.final_builds/jobs/rabbit_node/index.yml +86 -0
- data/bosh_release/.final_builds/jobs/rabbit_node_ng/index.yml +58 -0
- data/bosh_release/.final_builds/jobs/rabbitmq_srs_gateway/index.yml +22 -0
- data/bosh_release/.final_builds/jobs/rabbitmq_srs_node/index.yml +18 -0
- data/bosh_release/.final_builds/jobs/rabbitmq_srs_service/index.yml +22 -0
- data/bosh_release/.final_builds/jobs/redis_gateway/index.yml +102 -0
- data/bosh_release/.final_builds/jobs/redis_node/index.yml +98 -0
- data/bosh_release/.final_builds/jobs/redis_node_ng/index.yml +58 -0
- data/bosh_release/.final_builds/jobs/router/index.yml +78 -0
- data/bosh_release/.final_builds/jobs/router_next/index.yml +38 -0
- data/bosh_release/.final_builds/jobs/routerv2/index.yml +30 -0
- data/bosh_release/.final_builds/jobs/serialization_data_server/index.yml +38 -0
- data/bosh_release/.final_builds/jobs/service_broker/index.yml +34 -0
- data/bosh_release/.final_builds/jobs/service_utilities/index.yml +14 -0
- data/bosh_release/.final_builds/jobs/stager/index.yml +94 -0
- data/bosh_release/.final_builds/jobs/syslog_aggregator/index.yml +43 -0
- data/bosh_release/.final_builds/jobs/uaa/index.yml +111 -0
- data/bosh_release/.final_builds/jobs/vblob_gateway/index.yml +62 -0
- data/bosh_release/.final_builds/jobs/vblob_node/index.yml +34 -0
- data/bosh_release/.final_builds/jobs/vblob_node_ng/index.yml +54 -0
- data/bosh_release/.final_builds/jobs/vcap_redis/index.yml +26 -0
- data/bosh_release/.final_builds/jobs/warden/index.yml +30 -0
- data/bosh_release/.final_builds/packages/acm/index.yml +46 -0
- data/bosh_release/.final_builds/packages/atmos_gateway/index.yml +146 -0
- data/bosh_release/.final_builds/packages/backup_manager/index.yml +158 -0
- data/bosh_release/.final_builds/packages/bandwidth_proxy/index.yml +10 -0
- data/bosh_release/.final_builds/packages/buildpack_cache/index.yml +7 -0
- data/bosh_release/.final_builds/packages/cloud_controller/index.yml +306 -0
- data/bosh_release/.final_builds/packages/cloud_controller_ng/index.yml +55 -0
- data/bosh_release/.final_builds/packages/collector/index.yml +35 -0
- data/bosh_release/.final_builds/packages/common/index.yml +22 -0
- data/bosh_release/.final_builds/packages/dashboard/index.yml +59 -0
- data/bosh_release/.final_builds/packages/daylimit/index.yml +22 -0
- data/bosh_release/.final_builds/packages/dea/index.yml +214 -0
- data/bosh_release/.final_builds/packages/dea_jvm/index.yml +19 -0
- data/bosh_release/.final_builds/packages/dea_jvm7/index.yml +6 -0
- data/bosh_release/.final_builds/packages/dea_next/index.yml +67 -0
- data/bosh_release/.final_builds/packages/dea_node/index.yml +18 -0
- data/bosh_release/.final_builds/packages/dea_node04/index.yml +14 -0
- data/bosh_release/.final_builds/packages/dea_node06/index.yml +14 -0
- data/bosh_release/.final_builds/packages/dea_node08/index.yml +6 -0
- data/bosh_release/.final_builds/packages/dea_ruby18/index.yml +34 -0
- data/bosh_release/.final_builds/packages/dea_ruby19/index.yml +30 -0
- data/bosh_release/.final_builds/packages/dea_seed/index.yml +34 -0
- data/bosh_release/.final_builds/packages/dea_transition/index.yml +18 -0
- data/bosh_release/.final_builds/packages/debian_nfs_server/index.yml +14 -0
- data/bosh_release/.final_builds/packages/erlang/index.yml +14 -0
- data/bosh_release/.final_builds/packages/filesystem_gateway/index.yml +114 -0
- data/bosh_release/.final_builds/packages/git/index.yml +6 -0
- data/bosh_release/.final_builds/packages/golang/index.yml +11 -0
- data/bosh_release/.final_builds/packages/gorouter/index.yml +19 -0
- data/bosh_release/.final_builds/packages/hadoop/index.yml +6 -0
- data/bosh_release/.final_builds/packages/hbase/index.yml +18 -0
- data/bosh_release/.final_builds/packages/health_manager_next/index.yml +75 -0
- data/bosh_release/.final_builds/packages/imagemagick/index.yml +10 -0
- data/bosh_release/.final_builds/packages/insight_agent/index.yml +10 -0
- data/bosh_release/.final_builds/packages/libpq/index.yml +23 -0
- data/bosh_release/.final_builds/packages/libyaml/index.yml +7 -0
- data/bosh_release/.final_builds/packages/login/index.yml +55 -0
- data/bosh_release/.final_builds/packages/marketplace/index.yml +58 -0
- data/bosh_release/.final_builds/packages/memcached/index.yml +6 -0
- data/bosh_release/.final_builds/packages/memcached_gateway/index.yml +102 -0
- data/bosh_release/.final_builds/packages/memcached_node/index.yml +90 -0
- data/bosh_release/.final_builds/packages/memcached_node_ng/index.yml +58 -0
- data/bosh_release/.final_builds/packages/micro/index.yml +22 -0
- data/bosh_release/.final_builds/packages/mongodb/index.yml +22 -0
- data/bosh_release/.final_builds/packages/mongodb18/index.yml +6 -0
- data/bosh_release/.final_builds/packages/mongodb20/index.yml +11 -0
- data/bosh_release/.final_builds/packages/mongodb22/index.yml +6 -0
- data/bosh_release/.final_builds/packages/mongodb_gateway/index.yml +226 -0
- data/bosh_release/.final_builds/packages/mongodb_node/index.yml +214 -0
- data/bosh_release/.final_builds/packages/mongodb_node_ng/index.yml +58 -0
- data/bosh_release/.final_builds/packages/mongodb_proxy/index.yml +38 -0
- data/bosh_release/.final_builds/packages/mysql/index.yml +54 -0
- data/bosh_release/.final_builds/packages/mysql55/index.yml +26 -0
- data/bosh_release/.final_builds/packages/mysql_gateway/index.yml +246 -0
- data/bosh_release/.final_builds/packages/mysql_node/index.yml +230 -0
- data/bosh_release/.final_builds/packages/mysql_node_ng/index.yml +62 -0
- data/bosh_release/.final_builds/packages/mysqlclient/index.yml +14 -0
- data/bosh_release/.final_builds/packages/nats/index.yml +34 -0
- data/bosh_release/.final_builds/packages/nginx/index.yml +38 -0
- data/bosh_release/.final_builds/packages/nginx_next/index.yml +6 -0
- data/bosh_release/.final_builds/packages/node/index.yml +10 -0
- data/bosh_release/.final_builds/packages/oauth2_gateway/index.yml +18 -0
- data/bosh_release/.final_builds/packages/opentsdb/index.yml +18 -0
- data/bosh_release/.final_builds/packages/postgres/index.yml +18 -0
- data/bosh_release/.final_builds/packages/postgresql/index.yml +31 -0
- data/bosh_release/.final_builds/packages/postgresql91/index.yml +10 -0
- data/bosh_release/.final_builds/packages/postgresql_gateway/index.yml +178 -0
- data/bosh_release/.final_builds/packages/postgresql_node/index.yml +162 -0
- data/bosh_release/.final_builds/packages/postgresql_node_ng/index.yml +58 -0
- data/bosh_release/.final_builds/packages/rabbit/index.yml +14 -0
- data/bosh_release/.final_builds/packages/rabbit_gateway/index.yml +210 -0
- data/bosh_release/.final_builds/packages/rabbit_node/index.yml +194 -0
- data/bosh_release/.final_builds/packages/rabbit_node_ng/index.yml +58 -0
- data/bosh_release/.final_builds/packages/rabbitmq-2.4/index.yml +6 -0
- data/bosh_release/.final_builds/packages/rabbitmq-2.8/index.yml +6 -0
- data/bosh_release/.final_builds/packages/rabbitmq/index.yml +18 -0
- data/bosh_release/.final_builds/packages/rabbitmq_srs/index.yml +14 -0
- data/bosh_release/.final_builds/packages/rabbitmq_srs_builds/index.yml +10 -0
- data/bosh_release/.final_builds/packages/redis/index.yml +18 -0
- data/bosh_release/.final_builds/packages/redis22/index.yml +6 -0
- data/bosh_release/.final_builds/packages/redis24/index.yml +6 -0
- data/bosh_release/.final_builds/packages/redis26/index.yml +6 -0
- data/bosh_release/.final_builds/packages/redis_gateway/index.yml +230 -0
- data/bosh_release/.final_builds/packages/redis_node/index.yml +218 -0
- data/bosh_release/.final_builds/packages/redis_node_ng/index.yml +62 -0
- data/bosh_release/.final_builds/packages/rootfs_lucid64/index.yml +7 -0
- data/bosh_release/.final_builds/packages/router/index.yml +178 -0
- data/bosh_release/.final_builds/packages/routerv2/index.yml +18 -0
- data/bosh_release/.final_builds/packages/ruby/index.yml +35 -0
- data/bosh_release/.final_builds/packages/ruby_next/index.yml +15 -0
- data/bosh_release/.final_builds/packages/serialization_data_server/index.yml +66 -0
- data/bosh_release/.final_builds/packages/service_broker/index.yml +138 -0
- data/bosh_release/.final_builds/packages/service_utilities/index.yml +34 -0
- data/bosh_release/.final_builds/packages/sqlite/index.yml +14 -0
- data/bosh_release/.final_builds/packages/stager/index.yml +194 -0
- data/bosh_release/.final_builds/packages/syslog_aggregator/index.yml +19 -0
- data/bosh_release/.final_builds/packages/uaa/index.yml +99 -0
- data/bosh_release/.final_builds/packages/vblob/index.yml +22 -0
- data/bosh_release/.final_builds/packages/vblob_gateway/index.yml +106 -0
- data/bosh_release/.final_builds/packages/vblob_node/index.yml +94 -0
- data/bosh_release/.final_builds/packages/vblob_node_ng/index.yml +54 -0
- data/bosh_release/.final_builds/packages/warden/index.yml +107 -0
- data/{spec/assets → bosh_release/config}/.gitkeep +0 -0
- data/bosh_release/config/final.yml +7 -0
- data/{spec/functional → bosh_release/jobs}/.gitkeep +0 -0
- data/{spec/unit → bosh_release/packages}/.gitkeep +0 -0
- data/bosh_release/releases/appcloud-10.yml +232 -0
- data/bosh_release/releases/appcloud-100.yml +512 -0
- data/bosh_release/releases/appcloud-101.yml +523 -0
- data/bosh_release/releases/appcloud-102.yml +523 -0
- data/bosh_release/releases/appcloud-103.yml +532 -0
- data/bosh_release/releases/appcloud-104.yml +541 -0
- data/bosh_release/releases/appcloud-105.yml +547 -0
- data/bosh_release/releases/appcloud-106.yml +547 -0
- data/bosh_release/releases/appcloud-107.yml +547 -0
- data/bosh_release/releases/appcloud-108.yml +547 -0
- data/bosh_release/releases/appcloud-109.yml +612 -0
- data/bosh_release/releases/appcloud-11.yml +232 -0
- data/bosh_release/releases/appcloud-110.yml +612 -0
- data/bosh_release/releases/appcloud-111.yml +743 -0
- data/bosh_release/releases/appcloud-112.yml +617 -0
- data/bosh_release/releases/appcloud-113.yml +627 -0
- data/bosh_release/releases/appcloud-114.yml +627 -0
- data/bosh_release/releases/appcloud-115.yml +627 -0
- data/bosh_release/releases/appcloud-116.yml +627 -0
- data/bosh_release/releases/appcloud-117.yml +637 -0
- data/bosh_release/releases/appcloud-118.yml +637 -0
- data/bosh_release/releases/appcloud-119.yml +642 -0
- data/bosh_release/releases/appcloud-12.yml +232 -0
- data/bosh_release/releases/appcloud-120.yml +791 -0
- data/bosh_release/releases/appcloud-121.yml +791 -0
- data/bosh_release/releases/appcloud-122.yml +799 -0
- data/bosh_release/releases/appcloud-123.yml +799 -0
- data/bosh_release/releases/appcloud-124.yml +810 -0
- data/bosh_release/releases/appcloud-125.yml +810 -0
- data/bosh_release/releases/appcloud-126.yml +810 -0
- data/bosh_release/releases/appcloud-127.yml +816 -0
- data/bosh_release/releases/appcloud-128.yml +812 -0
- data/bosh_release/releases/appcloud-129.yml +811 -0
- data/bosh_release/releases/appcloud-13.yml +232 -0
- data/bosh_release/releases/appcloud-130.yml +811 -0
- data/bosh_release/releases/appcloud-131.yml +811 -0
- data/bosh_release/releases/appcloud-14.yml +232 -0
- data/bosh_release/releases/appcloud-15.yml +232 -0
- data/bosh_release/releases/appcloud-16.yml +232 -0
- data/bosh_release/releases/appcloud-17.yml +232 -0
- data/bosh_release/releases/appcloud-18.yml +232 -0
- data/bosh_release/releases/appcloud-19.yml +256 -0
- data/bosh_release/releases/appcloud-20.yml +256 -0
- data/bosh_release/releases/appcloud-21.yml +256 -0
- data/bosh_release/releases/appcloud-22.yml +286 -0
- data/bosh_release/releases/appcloud-23.yml +294 -0
- data/bosh_release/releases/appcloud-24.yml +297 -0
- data/bosh_release/releases/appcloud-25.yml +297 -0
- data/bosh_release/releases/appcloud-26.yml +297 -0
- data/bosh_release/releases/appcloud-27.yml +297 -0
- data/bosh_release/releases/appcloud-28.yml +297 -0
- data/bosh_release/releases/appcloud-29.yml +297 -0
- data/bosh_release/releases/appcloud-30.yml +299 -0
- data/bosh_release/releases/appcloud-31.yml +299 -0
- data/bosh_release/releases/appcloud-32.yml +299 -0
- data/bosh_release/releases/appcloud-33.yml +299 -0
- data/bosh_release/releases/appcloud-34.yml +299 -0
- data/bosh_release/releases/appcloud-35.yml +299 -0
- data/bosh_release/releases/appcloud-36.yml +299 -0
- data/bosh_release/releases/appcloud-37.yml +332 -0
- data/bosh_release/releases/appcloud-38.yml +343 -0
- data/bosh_release/releases/appcloud-39.yml +360 -0
- data/bosh_release/releases/appcloud-40.yml +360 -0
- data/bosh_release/releases/appcloud-41.yml +367 -0
- data/bosh_release/releases/appcloud-42.yml +372 -0
- data/bosh_release/releases/appcloud-43.yml +372 -0
- data/bosh_release/releases/appcloud-44.yml +372 -0
- data/bosh_release/releases/appcloud-45.yml +381 -0
- data/bosh_release/releases/appcloud-46.yml +381 -0
- data/bosh_release/releases/appcloud-47.yml +381 -0
- data/bosh_release/releases/appcloud-48.yml +381 -0
- data/bosh_release/releases/appcloud-49.yml +381 -0
- data/bosh_release/releases/appcloud-50.yml +381 -0
- data/bosh_release/releases/appcloud-51.yml +381 -0
- data/bosh_release/releases/appcloud-52.yml +389 -0
- data/bosh_release/releases/appcloud-53.yml +389 -0
- data/bosh_release/releases/appcloud-54.yml +397 -0
- data/bosh_release/releases/appcloud-55.yml +402 -0
- data/bosh_release/releases/appcloud-56.yml +428 -0
- data/bosh_release/releases/appcloud-57.yml +428 -0
- data/bosh_release/releases/appcloud-58.yml +428 -0
- data/bosh_release/releases/appcloud-59.yml +428 -0
- data/bosh_release/releases/appcloud-60.yml +428 -0
- data/bosh_release/releases/appcloud-61.yml +433 -0
- data/bosh_release/releases/appcloud-62.yml +433 -0
- data/bosh_release/releases/appcloud-63.yml +428 -0
- data/bosh_release/releases/appcloud-64.yml +451 -0
- data/bosh_release/releases/appcloud-65.yml +451 -0
- data/bosh_release/releases/appcloud-66.yml +451 -0
- data/bosh_release/releases/appcloud-67.yml +451 -0
- data/bosh_release/releases/appcloud-68.yml +460 -0
- data/bosh_release/releases/appcloud-69.yml +460 -0
- data/bosh_release/releases/appcloud-70.yml +460 -0
- data/bosh_release/releases/appcloud-71.yml +442 -0
- data/bosh_release/releases/appcloud-72.yml +442 -0
- data/bosh_release/releases/appcloud-73.yml +442 -0
- data/bosh_release/releases/appcloud-74.yml +442 -0
- data/bosh_release/releases/appcloud-75.yml +450 -0
- data/bosh_release/releases/appcloud-76.yml +450 -0
- data/bosh_release/releases/appcloud-77.yml +473 -0
- data/bosh_release/releases/appcloud-78.yml +473 -0
- data/bosh_release/releases/appcloud-79.yml +473 -0
- data/bosh_release/releases/appcloud-80.yml +473 -0
- data/bosh_release/releases/appcloud-81.yml +473 -0
- data/bosh_release/releases/appcloud-82.yml +473 -0
- data/bosh_release/releases/appcloud-83.yml +468 -0
- data/bosh_release/releases/appcloud-84.yml +478 -0
- data/bosh_release/releases/appcloud-85.yml +478 -0
- data/bosh_release/releases/appcloud-86.yml +478 -0
- data/bosh_release/releases/appcloud-87.yml +488 -0
- data/bosh_release/releases/appcloud-88.yml +488 -0
- data/bosh_release/releases/appcloud-89.yml +488 -0
- data/bosh_release/releases/appcloud-90.yml +488 -0
- data/bosh_release/releases/appcloud-91.yml +493 -0
- data/bosh_release/releases/appcloud-92.yml +493 -0
- data/bosh_release/releases/appcloud-93.yml +493 -0
- data/bosh_release/releases/appcloud-94.yml +493 -0
- data/bosh_release/releases/appcloud-95.yml +502 -0
- data/bosh_release/releases/appcloud-96.yml +502 -0
- data/bosh_release/releases/appcloud-97.yml +502 -0
- data/bosh_release/releases/appcloud-98.yml +512 -0
- data/bosh_release/releases/appcloud-99.yml +512 -0
- data/bosh_release/releases/cf-release-132.yml +305 -0
- data/bosh_release/releases/index.yml +266 -0
- data/bosh_release/src/.gitkeep +0 -0
- data/lib/bosh/cli/commands/cf.rb +173 -560
- data/lib/bosh/cloudfoundry.rb +4 -0
- data/lib/bosh/cloudfoundry/deployment_attributes.rb +124 -0
- data/lib/bosh/cloudfoundry/release_versioned_template.rb +48 -0
- data/spec/plugin_spec.rb +115 -0
- data/spec/release_versioned_template_spec.rb +12 -0
- data/spec/spec_helper.rb +33 -9
- data/templates/README.md +21 -0
- data/templates/v132/aws/dev/deployment_file.yml.erb +372 -0
- data/templates/v132/aws/dev/spec +6 -0
- data/templates/v132/openstack/dev/deployment_file.yml.erb +372 -0
- data/templates/v132/openstack/dev/spec +6 -0
- metadata +326 -102
- data/config/defaults.yml +0 -6
- data/docs/BOSH-cf-initial-create.png +0 -0
- data/docs/BOSH-cf-scaled.png +0 -0
- data/docs/concept.md +0 -141
- data/lib/bosh-cloudfoundry.rb +0 -33
- data/lib/bosh-cloudfoundry/bosh_release_manager.rb +0 -156
- data/lib/bosh-cloudfoundry/config.rb +0 -6
- data/lib/bosh-cloudfoundry/config/common_config.rb +0 -27
- data/lib/bosh-cloudfoundry/config/dea_config.rb +0 -161
- data/lib/bosh-cloudfoundry/config/microbosh_config.rb +0 -119
- data/lib/bosh-cloudfoundry/config/postgresql_service_config.rb +0 -185
- data/lib/bosh-cloudfoundry/config/redis_service_config.rb +0 -179
- data/lib/bosh-cloudfoundry/config/system_config.rb +0 -66
- data/lib/bosh-cloudfoundry/config_options.rb +0 -403
- data/lib/bosh-cloudfoundry/providers.rb +0 -22
- data/lib/bosh-cloudfoundry/providers/aws.rb +0 -75
- data/lib/bosh-cloudfoundry/providers/openstack.rb +0 -69
- data/lib/bosh-cloudfoundry/system_deployment_manifest_renderer.rb +0 -296
- data/lib/bosh-cloudfoundry/version.rb +0 -5
- data/spec/assets/cf-release/jobs/cloud_controller/templates/runtimes.yml +0 -150
- data/spec/assets/deployments/aws-core-1-m1.small-free-redis.yml +0 -226
- data/spec/assets/deployments/aws-core-1-m1.xlarge-free-postgresql-2-m1.small-free-postgresql.yml +0 -253
- data/spec/assets/deployments/aws-core-2-m1.xlarge-dea.yml +0 -200
- data/spec/assets/deployments/aws-core-only.yml +0 -183
- data/spec/assets/deployments/aws-core-with-nfs.yml +0 -192
- data/spec/assets/deployments/openstack-core-only.yml +0 -204
- data/spec/unit/bosh_release_manager_spec.rb +0 -67
- data/spec/unit/cf_command_spec.rb +0 -307
- data/spec/unit/config/common_config_spec.rb +0 -21
- data/spec/unit/config/dea_config_spec.rb +0 -95
- data/spec/unit/config/microbosh_config_spec.rb +0 -11
- data/spec/unit/config/postgresql_service_config_spec.rb +0 -103
- data/spec/unit/config/redis_service_config_spec.rb +0 -103
- data/spec/unit/config/system_config_spec.rb +0 -29
- data/spec/unit/config_options_spec.rb +0 -60
- data/spec/unit/system_deployment_manifest_renderer_spec.rb +0 -99
data/config/defaults.yml
DELETED
Binary file
|
data/docs/BOSH-cf-scaled.png
DELETED
Binary file
|
data/docs/concept.md
DELETED
@@ -1,141 +0,0 @@
|
|
1
|
-
If you're new to BOSH, Cloud Foundry and PaaS in general you might find this as confusing as I did. So I'll try to explain some of the concepts.
|
2
|
-
|
3
|
-
# The parts
|
4
|
-
There are several parts in action here. Let me take you for a quick tour.
|
5
|
-
|
6
|
-
## Cloud Foundry
|
7
|
-
|
8
|
-
[Cloud Foundry](http://cloudfoundry.org) is a Open Source PaaS solution. It is available as a public cloud at [http://cloudfoundry.com](http://cloudfoundry.com) operated by VMWare, but it is also a solution you can bring in-house and install on your own servers, or even operate on Amazon like [AppFog](http://appfog.com) does.
|
9
|
-
|
10
|
-
* __Cloud Controller__ is the main component in Cloud Foundry and the server you point your vmc command to. It can be split up into separate VMs, but this bootstrap keeps it all on one instance.
|
11
|
-
* __DEA__ is the compute instance. In the initial setup the Cloud Controller is also a DEA. But you can basically view it as VMs that will handle and serve your applications.
|
12
|
-
* __Service__ is the concept Cloud Foundry uses to describe added functionality to your application like Postgres or MongoDB.
|
13
|
-
|
14
|
-
|
15
|
-
## BOSH
|
16
|
-
|
17
|
-
[BOSH](https://github.com/cloudfoundry/bosh) is a cloud oriented tool chain for releasing, deployment and lifecycle management of applications. It abstracts away the underlying IaaS solution (AWS, OpenStack, VMWare) and performs requests for new virtual machines etc. It also handles the distribution of "Jobs" to the virtual machines in the BOSH setup. In some ways you can say that it eliminates the need for Puppet/Chef, but it uses some different concepts. It also covers more, like the provisioning of virtual machines.
|
18
|
-
|
19
|
-
* __Job__ is BOSH's concept of grouping functionality together. In the normal instance you can think of a Job as a composition of installed software and configuration that a virtual machine will have. So two virtual machines with the same Job attached will be identical.
|
20
|
-
* __Template__ is BOSH's concept for defining a software setup. CloudController is one such template, and dea is another one.
|
21
|
-
* __Stemcell__ is BOSH's concept for a virtual machine image. For Amazon it equals and AMI. It is a template that is booted and becoms an instance of an virtual machine.
|
22
|
-
* __Resource Pool__ is basically a collection of virtual machines, that you can reference/assign jobs to. The have the same stemcell and configuration (eg. AWS size).
|
23
|
-
* __Compilation instance__ is instances that BOSH uses when deploying a new part. At first it is used to compile everything that is needed for VCAP and DEA. If you add a template like Postgres you'll see that it compiles the components used for that. I think this is something that resembles rpm or deb packages, and that they get compiled on your Stemcells to ensure compatibility when running on your cloud.
|
24
|
-
|
25
|
-
## Inception VM
|
26
|
-
Inception VM is a Virtual Machine used for bootstrapping BOSH.
|
27
|
-
|
28
|
-
# Building a runnable Cloud Foundry
|
29
|
-
This Bootstrap takes you throug the steps needed to have Cloud Foundry running and serving requests. It launches BOSH which then is used to deploy Cloud Foundry. BOSH is the only officially supported way of deploying Cloud Foundry, even though Chef scripts is maintained by the community.
|
30
|
-
|
31
|
-
The way it operates is illustrated in the figure below:
|
32
|
-
|
33
|
-
![BOSH-CF initial deploy](BOSH-cf-initial-create.png)
|
34
|
-
|
35
|
-
1. The bosh-bootstrap gem on "My Computer" creates an Inception virtual machine from an Ubuntu image.
|
36
|
-
2. The Inception VM creates the BOSH controller
|
37
|
-
3. The BOSH controller creates virtual machines for Cloud Foundry
|
38
|
-
4. The BOSH controller deploys Jobs to the separate instances
|
39
|
-
|
40
|
-
In the initial configuration the Cloud Controller acts as both a controller and a compute instance where your applications run.
|
41
|
-
|
42
|
-
# Scaling
|
43
|
-
Now if the above description was crystal clear, you'll know where the scaling happens. ;) It happens to the far right. The figure below shows how everything looks when I've added a couple of compute instances.
|
44
|
-
|
45
|
-
![BOSH-CF scaled deploy](BOSH-cf-scaled.png)
|
46
|
-
|
47
|
-
In the case above we have three resource pools. They are called core, DEA and postgres. This is that standard way that the BOSH cf plugin does it. The following has been done here:
|
48
|
-
|
49
|
-
* ```bosh cf change deas 3``` creates a pool with 3 virtual machines and assigns the DEA job to them. It also removes the DEA template from the core job.
|
50
|
-
* ```bosh cf add service postgresql 2``` creates a pool with 2 virtual machines and assigns the postgresql job to them.
|
51
|
-
* The dotted boxes above are compile instances that BOSH will create temporarily to compile the necessary components. See the BOSH description above.
|
52
|
-
|
53
|
-
With BOSH it is possible to allocate the postgres templates on the already existing DEA instances and thus save costs on Amazon. It all comes down to what kind of scale you need, and also separation from load issues.
|
54
|
-
|
55
|
-
It is the responsibility of the separate application to handle clustering and communication between the instances.
|
56
|
-
|
57
|
-
## Implementation
|
58
|
-
|
59
|
-
```bosh cf change deas 1``` will add a resource pool and set up jobs. This is from the cf plugin to BOSH.
|
60
|
-
|
61
|
-
It adds a resource pool:
|
62
|
-
|
63
|
-
```
|
64
|
-
- name: dea
|
65
|
-
network: default
|
66
|
-
size: 2
|
67
|
-
stemcell:
|
68
|
-
name: bosh-stemcell
|
69
|
-
version: 0.7.0
|
70
|
-
cloud_properties:
|
71
|
-
region: eu-west-1
|
72
|
-
availability_zone: eu-west-1b
|
73
|
-
instance_type: m1.large
|
74
|
-
```
|
75
|
-
|
76
|
-
Size 2 specifies to launch two virtual machines for this pool.
|
77
|
-
|
78
|
-
It then sets up a job:
|
79
|
-
|
80
|
-
```
|
81
|
-
- name: dea
|
82
|
-
template:
|
83
|
-
- dea
|
84
|
-
instances: 2
|
85
|
-
resource_pool: dea
|
86
|
-
networks:
|
87
|
-
- name: default
|
88
|
-
default:
|
89
|
-
- dns
|
90
|
-
- gateway
|
91
|
-
```
|
92
|
-
|
93
|
-
The instances setting tells it to use two instances in the dea resource pool. For our case this matches the size of the pool exactly.
|
94
|
-
|
95
|
-
After the changes has been done a ```bosh deploy``` will perform the needed changes to your BOSH setup.
|
96
|
-
|
97
|
-
### Using your Cloud Controller as a compute instance
|
98
|
-
|
99
|
-
If you take a look at the job named "core" before you do the adding of DEAs you will see that it has a template named dea. If you leave that in the list your Cloud Controller will also be a compute instance serving deployed applications.
|
100
|
-
|
101
|
-
# Tips
|
102
|
-
|
103
|
-
* Provision an Elastic IP from Amazon as early as possible and assign a DNS entry with wildcard. Example: *.cf.mydomain.com . It will take some time for the DNS to propagate (actually your old *.mydomain.com record to time out if you have one).
|
104
|
-
* If you're deploying to a different region than us-east-1 check out [this bug.](https://github.com/StarkAndWayne/bosh-cloudfoundry/issues/100) Make the changes to the configuration just before you do ```bosh deploy```.
|
105
|
-
* If you want to scale out by adding more instances you need to tweak the FW rules. Check [this bug.](https://github.com/StarkAndWayne/bosh-cloudfoundry/issues/112)
|
106
|
-
* You might need to reduce the number of compile instances to avoid Amazon API errors. Check [this bug.](https://github.com/StarkAndWayne/bosh-cloudfoundry/issues/111)
|
107
|
-
* If you're having problems with ```vmc push``` check out [this bug.](https://github.com/StarkAndWayne/bosh-cloudfoundry/issues/49)
|
108
|
-
* Once you're up and running [test your setup with a simple Sinatra application](http://docs.cloudfoundry.com/tools/vmc/installing-vmc.html#creating-a-simple-sinatra-application).
|
109
|
-
|
110
|
-
# Some resources
|
111
|
-
|
112
|
-
Use these for some pointers for in depth understanding. The rest of this document tries to explain the basic concepts without getting into the really deep details.
|
113
|
-
|
114
|
-
## Documentation
|
115
|
-
|
116
|
-
* [Cloud Foundry documentation](http://cloudfoundry.github.com/)
|
117
|
-
* [Cloud Foundry public cloud (commercial version) docs](http://docs.cloudfoundry.com/getting-started.html)
|
118
|
-
* [Cloud Foundry community wiki](https://github.com/mrdavidlaing/cf-docs-contrib/wiki)
|
119
|
-
|
120
|
-
## Community
|
121
|
-
|
122
|
-
* [BOSH users Mailinglist](https://groups.google.com/a/cloudfoundry.org/forum/#!forum/bosh-users)
|
123
|
-
* [Cloud Foundry Mailinglist](https://groups.google.com/a/cloudfoundry.org/forum/#!forum/vcap-dev)
|
124
|
-
|
125
|
-
## Source code
|
126
|
-
|
127
|
-
* [Cloud Foundry release](https://github.com/cloudfoundry/cf-release)
|
128
|
-
* [Cloud Foundry jobs (within the release repo)](https://github.com/cloudfoundry/cf-release/tree/master/jobs)
|
129
|
-
* [Cloud Foundry VCAP (core component)](https://github.com/cloudfoundry/vcap)
|
130
|
-
|
131
|
-
# TODO/Questions
|
132
|
-
|
133
|
-
* Is the BOSH controller a MicroBosh? Another name?
|
134
|
-
* What is a microbosh?
|
135
|
-
* Is the BOSH controller a part of BOSH, or something that just controls it?
|
136
|
-
* Does the core Cloud Foundry instances scale out?
|
137
|
-
* How do you enable HA for the core?
|
138
|
-
* You run BOSH commands on the Inception VM, not BOSH Controller. Is it meant to be run on your computer? Is network the reason it isn't?
|
139
|
-
* Add some nice to know commands
|
140
|
-
* How can we lock this to a certain "release"?
|
141
|
-
* Can we describe how the source is fetched and what happens to it?
|
data/lib/bosh-cloudfoundry.rb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
require "bosh-cloudfoundry/version"
|
2
|
-
|
3
|
-
module Bosh; module CloudFoundry; end; end
|
4
|
-
|
5
|
-
require "logger"
|
6
|
-
require "common/common"
|
7
|
-
require "common/thread_formatter"
|
8
|
-
require "cli"
|
9
|
-
|
10
|
-
# for generating password
|
11
|
-
require 'openssl'
|
12
|
-
|
13
|
-
# for the #sh helper
|
14
|
-
require "rake"
|
15
|
-
require "rake/file_utils"
|
16
|
-
|
17
|
-
# for validating DNS -> IP setups
|
18
|
-
require 'net/dns'
|
19
|
-
|
20
|
-
# for:
|
21
|
-
# * validating compute flavors
|
22
|
-
# * provisioning IP addresses
|
23
|
-
require "fog"
|
24
|
-
require 'fog/aws/models/compute/flavors'
|
25
|
-
|
26
|
-
# CLI mixins
|
27
|
-
require "bosh-cloudfoundry/config_options"
|
28
|
-
require "bosh-cloudfoundry/bosh_release_manager"
|
29
|
-
|
30
|
-
require "bosh-cloudfoundry/config"
|
31
|
-
require "bosh-cloudfoundry/providers"
|
32
|
-
|
33
|
-
require "bosh-cloudfoundry/system_deployment_manifest_renderer"
|
@@ -1,156 +0,0 @@
|
|
1
|
-
# Copyright (c) 2012-2013 Stark & Wayne, LLC
|
2
|
-
|
3
|
-
module Bosh; module CloudFoundry; end; end
|
4
|
-
|
5
|
-
# There are two concepts of "latest".
|
6
|
-
# * for upload: "latest" is the highest release in cf-release
|
7
|
-
# * for manifest creation: "latest" is the highest release already uploaded to the BOSH
|
8
|
-
module Bosh::CloudFoundry::BoshReleaseManager
|
9
|
-
|
10
|
-
# @return [Array] BOSH releases available in target BOSH
|
11
|
-
# [{"name"=>"appcloud", "versions"=>["124", "126"], "in_use"=>[]}]
|
12
|
-
def bosh_releases
|
13
|
-
@bosh_releases ||= releases = director.list_releases
|
14
|
-
end
|
15
|
-
|
16
|
-
# @return [Array] BOSH release names available in target BOSH
|
17
|
-
def bosh_release_names
|
18
|
-
@bosh_release_names ||= bosh_releases.map { |rel| rel["name"] }
|
19
|
-
end
|
20
|
-
|
21
|
-
# @return [Array] BOSH release versions for specific release name in target BOSH
|
22
|
-
def bosh_release_versions(release_name)
|
23
|
-
if release = bosh_releases.find { |rel| rel["name"] == release_name }
|
24
|
-
release["versions"]
|
25
|
-
else
|
26
|
-
[]
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def release_name_version
|
31
|
-
"#{release_name}/#{release_version}"
|
32
|
-
end
|
33
|
-
|
34
|
-
# @return [Version String] BOSH version number; converts 'latest' into actual version
|
35
|
-
# TODO implement this; map "latest" to highest uploaded release in BOSH
|
36
|
-
# return "unknown" if BOSH has no releases of this name yet
|
37
|
-
def effective_release_version
|
38
|
-
release_version.to_s
|
39
|
-
end
|
40
|
-
|
41
|
-
# for upload, "latest" is the newest release in cf-release
|
42
|
-
def upload_final_release
|
43
|
-
release_number = use_latest_release? ?
|
44
|
-
latest_uploadable_final_release_number :
|
45
|
-
release_version
|
46
|
-
chdir(cf_release_branch_dir) do
|
47
|
-
bosh_cmd "upload release releases/appcloud-#{release_number}.yml"
|
48
|
-
end
|
49
|
-
@bosh_releases = nil # reset cache
|
50
|
-
end
|
51
|
-
|
52
|
-
# Looks at the last line of releases/index.yml in cf-release
|
53
|
-
# for the latest release number that could be uploaded
|
54
|
-
# @returns [String] a number such as "126"
|
55
|
-
def latest_uploadable_final_release_number
|
56
|
-
chdir(cf_release_branch_dir) do
|
57
|
-
return `tail -n 1 releases/index.yml | awk '{print $2}'`.strip
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
# Looks at the last line of releases/index.yml in cf-release
|
62
|
-
# for the latest release number that could be uploaded
|
63
|
-
# @returns [String] a dev release code such as "126.8-dev"
|
64
|
-
def latest_uploadable_dev_release_number
|
65
|
-
chdir(cf_release_branch_dir) do
|
66
|
-
return `tail -n 1 dev_releases/index.yml | awk '{print $2}'`.strip
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
# @returns [String] absolute path to latest release to be uploaded
|
71
|
-
def latest_dev_release_filename
|
72
|
-
dev_release_number = latest_uploadable_dev_release_number
|
73
|
-
return nil unless dev_release_number.size > 0
|
74
|
-
File.join(cf_release_dir, "#{release_name}-#{dev_release_number}.yml")
|
75
|
-
end
|
76
|
-
|
77
|
-
def create_and_upload_dev_release
|
78
|
-
release_name = default_dev_release_name
|
79
|
-
chdir(cf_release_branch_dir) do
|
80
|
-
write_dev_config_file(release_name)
|
81
|
-
sh "bosh -n --color create release --with-tarball --force"
|
82
|
-
sh "bosh -n --color upload release"
|
83
|
-
end
|
84
|
-
@bosh_releases = nil # reset cache
|
85
|
-
end
|
86
|
-
|
87
|
-
def write_dev_config_file(release_name)
|
88
|
-
dev_config_file = "config/dev.yml"
|
89
|
-
if File.exist?(dev_config_file)
|
90
|
-
dev_config = YAML.load_file(dev_config_file)
|
91
|
-
else
|
92
|
-
dev_config = {}
|
93
|
-
end
|
94
|
-
dev_config["dev_name"] = release_name
|
95
|
-
File.open(dev_config_file, "w") { |file| file << dev_config.to_yaml }
|
96
|
-
end
|
97
|
-
|
98
|
-
# clones or updates cf-release for a specific branch
|
99
|
-
# For all defaults, clones into:
|
100
|
-
# * /var/vcap/store/releases/cf-release/master (cf_release_branch_dir)
|
101
|
-
#
|
102
|
-
# Uses:
|
103
|
-
# * releases_dir (e.g. '/var/vcap/store/releases')
|
104
|
-
# * cf_release_branch (e.g. 'staging')
|
105
|
-
# * cf_release_branch_dir (e.g. '/var/vcap/store/releases/cf-release/staging')
|
106
|
-
def clone_or_update_cf_release
|
107
|
-
raise "invoke #set_cf_release_branch(branch) first" unless cf_release_branch_dir
|
108
|
-
if File.directory?(cf_release_branch_dir)
|
109
|
-
chdir(cf_release_branch_dir) do
|
110
|
-
sh "git pull origin #{cf_release_branch}" # recursive is below
|
111
|
-
end
|
112
|
-
else
|
113
|
-
chdir(releases_dir) do
|
114
|
-
sh "git clone -b #{cf_release_branch} #{cf_release_git_repo} #{cf_release_branch_dir}"
|
115
|
-
chdir(cf_release_branch_dir) do
|
116
|
-
sh "git update-index --assume-unchanged config/final.yml 2>/dev/null"
|
117
|
-
end
|
118
|
-
end
|
119
|
-
end
|
120
|
-
end
|
121
|
-
|
122
|
-
# when creating a dev release, need to pull down submodules
|
123
|
-
def prepare_cf_release_for_dev_release
|
124
|
-
chdir(cf_release_branch_dir) do
|
125
|
-
say "Rewriting all git:// & git@ to https:// ..."
|
126
|
-
# Snippet written by Mike Reeves <swampfoxmr@gmail.com> on bosh-users mailing list
|
127
|
-
# Date 2012-12-06
|
128
|
-
sh "sed -i 's#git@github.com:#https://github.com/#g' .gitmodules"
|
129
|
-
sh "sed -i 's#git://github.com#https://github.com#g' .gitmodules"
|
130
|
-
sh "git submodule update --init --recursive"
|
131
|
-
end
|
132
|
-
end
|
133
|
-
|
134
|
-
def default_release_name
|
135
|
-
"appcloud"
|
136
|
-
end
|
137
|
-
|
138
|
-
def default_dev_release_name(branch_name=cf_release_branch)
|
139
|
-
suffix = "-#{branch_name || 'dev'}"
|
140
|
-
default_release_name + suffix
|
141
|
-
end
|
142
|
-
|
143
|
-
def switch_to_development_release
|
144
|
-
system_config.release_name = default_dev_release_name(cf_release_branch)
|
145
|
-
system_config.release_version = "latest"
|
146
|
-
system_config.release_type = "dev"
|
147
|
-
system_config.save
|
148
|
-
end
|
149
|
-
|
150
|
-
def switch_to_final_release
|
151
|
-
system_config.release_name = default_release_name
|
152
|
-
system_config.release_version = "latest"
|
153
|
-
system_config.release_type = "final"
|
154
|
-
system_config.save
|
155
|
-
end
|
156
|
-
end
|
@@ -1,6 +0,0 @@
|
|
1
|
-
require "bosh-cloudfoundry/config/common_config"
|
2
|
-
require "bosh-cloudfoundry/config/system_config"
|
3
|
-
require "bosh-cloudfoundry/config/microbosh_config"
|
4
|
-
require "bosh-cloudfoundry/config/dea_config"
|
5
|
-
require "bosh-cloudfoundry/config/postgresql_service_config"
|
6
|
-
require "bosh-cloudfoundry/config/redis_service_config"
|
@@ -1,27 +0,0 @@
|
|
1
|
-
# Copyright (c) 2012-2013 Stark & Wayne, LLC
|
2
|
-
|
3
|
-
require "cli"
|
4
|
-
|
5
|
-
module Bosh; module CloudFoundry; module Config; end; end; end
|
6
|
-
|
7
|
-
module Bosh::CloudFoundry::Config
|
8
|
-
class CommonConfig < Bosh::Cli::Config
|
9
|
-
|
10
|
-
[
|
11
|
-
:base_systems_dir, # e.g. /var/vcap/store/systems
|
12
|
-
:target_system, # e.g. /var/vcap/store/systems/production
|
13
|
-
:bosh_git_repo, # e.g. "git://github.com/cloudfoundry/bosh.git"
|
14
|
-
:releases_dir, # e.g. /var/vcap/store/releases
|
15
|
-
:stemcells_dir, # e.g. /var/vcap/store/stemcells
|
16
|
-
:repos_dir, # e.g. /var/vcap/store/repos
|
17
|
-
].each do |attr|
|
18
|
-
define_method attr do
|
19
|
-
read(attr, false)
|
20
|
-
end
|
21
|
-
|
22
|
-
define_method "#{attr}=" do |value|
|
23
|
-
write_global(attr, value)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,161 +0,0 @@
|
|
1
|
-
# Copyright (c) 2012-2013 Stark & Wayne, LLC
|
2
|
-
|
3
|
-
module Bosh; module CloudFoundry; module Config; end; end; end
|
4
|
-
|
5
|
-
class Bosh::CloudFoundry::Config::DeaConfig
|
6
|
-
attr_reader :system_config
|
7
|
-
|
8
|
-
def initialize(system_config)
|
9
|
-
@system_config = system_config
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.build_from_system_config(system_config)
|
13
|
-
system_config.dea ||= {}
|
14
|
-
new(system_config)
|
15
|
-
end
|
16
|
-
|
17
|
-
def bosh_provider_name
|
18
|
-
@system_config.bosh_provider
|
19
|
-
end
|
20
|
-
|
21
|
-
def update_count_and_flavor(server_count, server_flavor)
|
22
|
-
self.dea_server_count = server_count.to_i
|
23
|
-
self.dea_server_flavor = server_flavor.to_s
|
24
|
-
self.save
|
25
|
-
end
|
26
|
-
|
27
|
-
# Determine ow many DEA servers are required
|
28
|
-
# based on the system configuration
|
29
|
-
def dea_server_count
|
30
|
-
@system_config.dea["count"] || 0
|
31
|
-
end
|
32
|
-
|
33
|
-
def dea_server_count=(count)
|
34
|
-
@system_config.dea["count"] = count
|
35
|
-
end
|
36
|
-
|
37
|
-
def dea_server_flavor
|
38
|
-
@system_config.dea["flavor"]
|
39
|
-
end
|
40
|
-
|
41
|
-
def dea_server_flavor=(flavor)
|
42
|
-
@system_config.dea["flavor"] = flavor
|
43
|
-
end
|
44
|
-
|
45
|
-
def save
|
46
|
-
@system_config.save
|
47
|
-
end
|
48
|
-
|
49
|
-
# Adds additional cf-release jobs into the core server (the core job in the manifest)
|
50
|
-
def add_core_jobs_to_manifest(manifest)
|
51
|
-
if dea_server_count == 0
|
52
|
-
@core_job ||= manifest["jobs"].find { |job| job["name"] == "core" }
|
53
|
-
@core_job["template"] << "dea"
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
# Adds resource pools to the target manifest, if dea_server_count > 0
|
58
|
-
#
|
59
|
-
# - name: dea
|
60
|
-
# network: default
|
61
|
-
# size: 2
|
62
|
-
# stemcell:
|
63
|
-
# name: bosh-stemcell
|
64
|
-
# version: 0.7.0
|
65
|
-
# cloud_properties:
|
66
|
-
# instance_type: m1.xlarge
|
67
|
-
def add_resource_pools_to_manifest(manifest)
|
68
|
-
if dea_server_count > 0
|
69
|
-
resource_pool = {
|
70
|
-
"name" => "dea",
|
71
|
-
"network" => "default",
|
72
|
-
"size" => dea_server_count,
|
73
|
-
"stemcell" => {
|
74
|
-
"name" => @system_config.stemcell_name,
|
75
|
-
"version" => @system_config.stemcell_version
|
76
|
-
},
|
77
|
-
# TODO how to create "cloud_properties" per-provider?
|
78
|
-
"cloud_properties" => {
|
79
|
-
"instance_type" => dea_server_flavor
|
80
|
-
}
|
81
|
-
}
|
82
|
-
manifest["resource_pools"] << resource_pool
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
# Jobs to add to the target manifest
|
87
|
-
#
|
88
|
-
# - name: dea
|
89
|
-
# template:
|
90
|
-
# - dea
|
91
|
-
# instances: 2
|
92
|
-
# resource_pool: dea
|
93
|
-
# networks:
|
94
|
-
# - name: default
|
95
|
-
# default:
|
96
|
-
# - dns
|
97
|
-
# - gateway
|
98
|
-
def add_jobs_to_manifest(manifest)
|
99
|
-
if dea_server_count > 0
|
100
|
-
job = {
|
101
|
-
"name" => "dea",
|
102
|
-
"template" => ["dea"],
|
103
|
-
"instances" => dea_server_count,
|
104
|
-
"resource_pool" => "dea",
|
105
|
-
# TODO are these AWS-specific networks?
|
106
|
-
"networks" => [{
|
107
|
-
"name" => "default",
|
108
|
-
"default" => ["dns", "gateway"]
|
109
|
-
}]
|
110
|
-
}
|
111
|
-
manifest["jobs"] << job
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
|
-
# Add extra configuration properties into the manifest
|
116
|
-
# to configure the allocation of RAM to the DEA
|
117
|
-
def merge_manifest_properties(manifest)
|
118
|
-
manifest["properties"]["dea"] ||= {}
|
119
|
-
manifest["properties"]["dea"] = {
|
120
|
-
"max_memory" => max_memory
|
121
|
-
}
|
122
|
-
end
|
123
|
-
|
124
|
-
# The RAM for a dedicated DEA node
|
125
|
-
# else the RAM of the core/0 VM
|
126
|
-
# minus the +preallocated_ram+.
|
127
|
-
def max_memory
|
128
|
-
if dea_server_count > 0
|
129
|
-
max_memory_for_dedicated_dea
|
130
|
-
else
|
131
|
-
dea_ram_for_core_vm_flavor
|
132
|
-
end
|
133
|
-
end
|
134
|
-
|
135
|
-
# @return [Integer] available ram for running CloudFoundry apps
|
136
|
-
def max_memory_for_dedicated_dea
|
137
|
-
ram_for_server_flavor - preallocated_ram
|
138
|
-
end
|
139
|
-
|
140
|
-
# @return [Integer] the ballpark ram for DEA, BOSH agent, etc
|
141
|
-
def preallocated_ram
|
142
|
-
300
|
143
|
-
end
|
144
|
-
|
145
|
-
def dea_ram_for_core_vm_flavor
|
146
|
-
ram_for_core_vm_flavor - preallocated_ram
|
147
|
-
end
|
148
|
-
|
149
|
-
def ram_for_core_vm_flavor
|
150
|
-
provider.ram_for_server_flavor(system_config.core_server_flavor)
|
151
|
-
end
|
152
|
-
|
153
|
-
def ram_for_server_flavor
|
154
|
-
provider.ram_for_server_flavor(dea_server_flavor)
|
155
|
-
end
|
156
|
-
|
157
|
-
# a helper object for the target BOSH provider
|
158
|
-
def provider
|
159
|
-
@provider ||= Bosh::CloudFoundry::Providers.for_bosh_provider_name(system_config)
|
160
|
-
end
|
161
|
-
end
|