Permalink
Browse files

Now using a (forked) version of the official CLoudfoundry cookbook

  • Loading branch information...
1 parent c33273a commit ced3c6848bb2550f01865a770bf27e866c5b8618 @oldpatricka oldpatricka committed Aug 23, 2011
@@ -1,12 +1,67 @@
{
- "username":"${base_username}",
- "groupname":"ubuntu",
- "controller_host":"${controller_host}",
- "vcap_domain":"${vcap_domain}",
- "api_host":"api.${vcap_domain}",
- "vcap_services":"${vcap_services}",
- "recipes":["user", "cf", "cf::dnsmasq", "cf::multi"],
- "name" : "cloud foundry controller",
- "mysql" : { "password" : "${mysql_pw}" },
- "postgres" : { "password" : "${postgres_pw}" }
+ "username": "${base_username}",
+ "vcap_profile": "${vcap_profile}",
+ "vcap_home": "${vcap_home}",
+ "vcap_config": "${vcap_config}",
+ "deployment":{
+ "name": "${deployment_name}",
+ "home": "${deployment_home}",
+ "config_path": "${vcap_config}",
+ "user": "${base_username}",
+ "group": "ubuntu",
+ "profile": "${vcap_profile}"
+ },
+ "cloudfoundry": {
+ "revision": "HEAD",
+ "path": "${vcap_home}"
+ },
+ "ruby": {
+ "version": "${ruby_version}",
+ "path": "${deployment_home}/deploy/rubies/ruby-${ruby_version}"
+ },
+ "ruby18": {
+ "version": "${ruby18_version}",
+ "path": "${deployment_home}/deploy/rubies/ruby-${ruby18_version}"
+ },
+ "rubygems": {
+ "version": "${rubygems_version}",
+ "bundler": {"version": "${bundler_version}"},
+ "rake": {"version": "${rake_version}"}
+ },
+ "mongodb": {
+ "version": "${mongodb_version}",
+ "path": "${deployment_home}/deploy/mongodb"
+ },
+ "redis": {
+ "version": "${redis_version}",
+ "path": "${deployment_home}/deploy/redis"
+ },
+ "nodejs": {
+ "version": "${nodejs_version}",
+ "path": "${deployment_home}/deploy/nodejs"
+ },
+ "mysql": {
+ "server_root_password": "${mysql_pw}",
+ "server_repl_password": "${mysql_pw}",
+ "bind_address": "${mysql_address}"
+ },
+ "postgresql": {
+ "server_root_password": "${postgres_pw}"
+ },
+ "erlang": {
+ "version": "${erlang_version}",
+ "path": "${deployment_home}/deploy/erlang"
+ },
+ "nats": {
+ "user": "nats",
+ "password": "${nats_pw}",
+ "host": "0.0.0.0",
+ "port": "4222"
+ },
+ "cloud_controller": {
+ "local_route": "${controller_hostname}"
+ },
+ "vcap_start": "${vcap_start}",
+ "services": ["redis", "mysql", "mongodb", "postgresql"],
+ "recipes":["role[nats]","role[router]","role[ruby]","role[cloudfoundry]","role[cloud_controller]","role[health_manager]","role[dea]","role[ccdb]","role[redis]","role[mysql]","role[mongodb]","role[postgresql]"]
}
@@ -1,7 +1,23 @@
[deps]
-mysql_pw: monkey
-postgres_pw: monkey
-base_username: cf
-controller_host: ${controller.hostname}
+base_username: ubuntu
+controller_hostname: ${.hostname}
+deployment_name: controller
+deployment_home: /home/${.base_username}/.cloudfoundry/${.deployment_name}
+vcap_config: ${.deployment_home}/config
+vcap_profile: /etc/profile.d/vcap.sh
+vcap_home: /var/vcap
vcap_domain: vcap.me
-vcap_services: cloud_controller health_manager router services
+vcap_start: router cloud_controller health_manager services
+postgres_pw: ham
+mysql_pw: ham
+nats_pw: ham
+mysql_address: 127.0.0.1
+ruby18_version: 1.8.7-p334
+ruby_version: 1.9.2-p180
+rubygems_version: 1.5.2
+bundler_version: 1.0.10
+rake_version: 0.8.7
+mongodb_version: 1.8.1
+redis_version: 2.2.4
+nodejs_version: 0.4.8
+erlang_version: R14B02
@@ -1,8 +1,11 @@
[svc-controller]
bootconf: controller.json
-bootpgm: ../../common/cookbooks.tar.gz
+bootpgm: ../common/chef-solo.sh
deps: deps.conf
+#burned
+image: ami-237bba4a
# unix account name:
+ssh_username: ubuntu
bootpgm_args: controller
-readypgm: cf_ready.sh
+readypgm: ../common/cf_ready.sh
@@ -1,21 +0,0 @@
-#!/bin/bash
-#
-# cloudfoundry_ready.sh - script to test the readyness of Cloud Foundry Services
-
-source bootenv.sh
-
-# List of services to test
-SERVICES="router cloud_controller dea health_manager"
-VCAP="/home/$username/cloudfoundry/vcap/bin/vcap"
-
-if [ -n "$vcap_services" ]; then
- SERVICES="$vcap_services"
-fi
-
-for service in $SERVICES ; do
- sudo -H -i -u $username $VCAP status $service | grep RUNNING || exit 1
-done
-
-sudo -H -i -u $username $VCAP status
-exit $?
-
@@ -1,12 +1,66 @@
{
- "username":"${base_username}",
- "groupname":"ubuntu",
- "controller_host":"${controller_host}",
- "api_host":"api.${vcap_domain}",
- "vcap_domain":"${vcap_domain}",
- "vcap_services":"${vcap_services}",
- "recipes":["user", "cf", "cf::multi"],
- "name" : "cloud foundry dea",
- "mysql" : { "password" : "${mysql_pw}" },
- "postgres" : { "password" : "${postgres_pw}" }
+ "username": "${base_username}",
+ "vcap_profile": "${vcap_profile}",
+ "vcap_home": "${vcap_home}",
+ "vcap_config": "${deployment_config}",
+ "deployment":{
+ "name": "${deployment_name}",
+ "home": "${deployment_home}",
+ "config_path": "${deployment_config}",
+ "user": "${base_username}",
+ "group": "ubuntu",
+ "profile": "${vcap_profile}"
+ },
+ "cloudfoundry": {
+ "revision": "HEAD",
+ "path": "${vcap_home}"
+ },
+ "ruby": {
+ "version": "${ruby_version}",
+ "path": "${deployment_home}/deploy/rubies/ruby-${ruby_version}"
+ },
+ "ruby18": {
+ "version": "${ruby18_version}",
+ "path": "${deployment_home}/deploy/rubies/ruby-${ruby18_version}"
+ },
+ "rubygems": {
+ "version": "${rubygems_version}",
+ "bundler": {"version": "${bundler_version}"},
+ "rake": {"version": "${rake_version}"}
+ },
+ "mongodb": {
+ "version": "${mongodb_version}",
+ "path": "${deployment_home}/deploy/mongodb"
+ },
+ "redis": {
+ "version": "${redis_version}",
+ "path": "${deployment_home}/deploy/redis"
+ },
+ "nodejs": {
+ "version": "${nodejs_version}",
+ "path": "${deployment_home}/deploy/nodejs"
+ },
+ "mysql": {
+ "server_root_password": "${mysql_pw}",
+ "server_repl_password": "${mysql_pw}",
+ "bind_address": "${mysql_address}"
+ },
+ "postgresql": {
+ "server_root_password": "${postgres_pw}"
+ },
+ "erlang": {
+ "version": "${erlang_version}",
+ "path": "${deployment_home}/deploy/erlang"
+ },
+ "nats": {
+ "user": "nats",
+ "password": "${nats_pw}",
+ "host": "${controller_host}",
+ "port": "4222"
+ },
+ "dea": {
+ "local_route": ""
+ },
+ "vcap_start": "dea",
+ "recipes":["role[dea]"]
}
@@ -1,7 +1,21 @@
[deps]
-mysql_pw: monkey
-postgres_pw: monkey
-base_username: cf
controller_host: ${controller.hostname}
-vcap_domain: ${controller.vcap_domain}
-vcap_services: dea
+base_username: ubuntu
+deployment_name: dea
+deployment_home: /home/${.base_username}/.cloudfoundry/${.deployment_name}
+deployment_config: ${.deployment_home}/config
+vcap_profile: /etc/profile.d/vcap.sh
+vcap_home: /var/vcap
+postgres_pw: monkey
+mysql_pw: monkey
+nats_pw: monkey
+mysql_address: 127.0.0.1
+ruby18_version: 1.8.7-p334
+ruby_version: 1.9.2-p180
+rubygems_version: 1.5.2
+bundler_version: 1.0.10
+rake_version: 0.8.7
+mongodb_version: 1.8.1
+redis_version: 2.2.4
+nodejs_version: 0.4.8
+erlang_version: R14B02
@@ -1,8 +1,10 @@
[svc-dea]
bootconf: dea.json
-bootpgm: ../../common/cookbooks.tar.gz
+bootpgm: ../common/chef-solo.sh
deps: deps.conf
replica_count: 4
-
+# burned image
+image: ami-818949e8
# unix account name:
bootpgm_args: dea
+readypgm: ../common/cf_ready.sh
@@ -2,6 +2,8 @@
"username":"${base_username}",
"controller_host":"${controller_host}",
"vcap_domain":"${vcap_domain}",
- "vcap_services":"${vcap_services}",
+ "vcap_home":"${vcap_home}",
+ "vcap_start":"${vcap_start}",
+ "vcap_config":"${vcap_config}",
"api_host":"api.${vcap_domain}"
}
@@ -1,5 +1,7 @@
[deps]
controller_host: ${controller.hostname}
vcap_domain: ${controller.vcap_domain}
-vcap_services: ${controller.vcap_services}
+vcap_home: ${controller.vcap_home}
+vcap_start: ${controller.vcap_start}
+vcap_config: ${controller.vcap_config}
base_username: ${controller.base_username}
@@ -6,10 +6,10 @@ source bootenv.sh
# List of services to test
SERVICES="router cloud_controller dea health_manager"
-VCAP="/home/$username/cloudfoundry/vcap/bin/vcap"
+VCAP="$vcap_home/bin/vcap"
-if [ -n "$vcap_services" ]; then
- SERVICES="$vcap_services"
+if [ -n "$vcap_start" ]; then
+ SERVICES="$vcap_start"
fi
for service in $SERVICES ; do
Oops, something went wrong.

0 comments on commit ced3c68

Please sign in to comment.