Граф коммитов

153 Коммитов

Автор SHA1 Сообщение Дата
Jesse Zhang fb6fc2f4f5 Merge "[dev_setup] Chef Installation Clean Up" 2012-03-29 18:26:09 +00:00
Jennifer Hickey e46c15485d Add standalone app support
- Add new standalone framework that supports any runtime

- Allow a framework to not have a default runtime

- Allow sending a start command on app create/update

- Fix cc staging json parsing issue to allow quotes
in start command (EM.system strips escaped backslashes)

- Do not assign a web port if no URLs specified

- Confirm app is started by PID if no web port assigned

Change-Id: Ib4e51abf2495ff72dd586727bae85c0997bac28e
2012-03-28 12:01:49 -07:00
Nicholas Kushmerick 901c9685e9 Merge branch 'services-r9'
Bumped vcap/servics to Services-R9

Conflicts:
	cloud_controller/Gemfile.lock

Change-Id: If7edf506fa8d67fcc0df81120fab9fbde469259d
2012-03-23 08:12:41 -07:00
Ramnivas Laddad 9caf2a2018 Use correct executable for Rack on ruby18/19 in dev_setup
Change-Id: If182b6e6d0fa59230e85aaeed0684a4b0f7b543a
2012-03-21 00:32:44 -07:00
Joel D'sa 08246b2075 Bump the uaa client gem version to 0.0.5.
Additional parameters to support the uaa migration
functionality in dev_setup

Tested using cloud_controller unit tests, dev_setup,
running bvts against bosh deployed dev instance.

Change-Id: I37e25b6d3edaff14f5f2ecaebebabedc739ac517
2012-03-16 14:45:01 -07:00
Anfernee Gui 8eb95241d7 Nginx patch for the zero byte in cstr
See: http://mailman.nginx.org/pipermail/nginx-announce/2012/000076.html

Change-Id: I6c576dac24d6535a11b7380483511c65915f87cf
2012-03-15 23:10:03 -07:00
Tang Rui d06f66cd12 Add timeout configuration for rabbitmq in dev setup
Change-Id: I034042a7a2a20644747c80158d4c814413c3e0e7
2012-03-14 05:56:25 -07:00
Joel D'sa d0504fd94e Changes to the cloud controller to support user creation, deletion
and change password via the uaa.

collected minor config and transition changes
Add database migration config to dev_setup
update uaa submodule

Change-Id: If1b112af24de1434bc68ccc1a65bb41a6212c09b
2012-03-12 17:03:32 -07:00
Cliff Wang 64e7f1df8e Merge branch 'services-r8' into services-r9
Change-Id: Id02fb771cd4d34f4f2841a329700dc34560d89b6
2012-03-08 02:42:16 -07:00
Cliff Wang 627a04d801 neo4j dev_setup compatible with plan
Change-Id: I827f579eb88e407efa55f0b6c274b820b5e7d401
2012-03-07 22:52:01 -07:00
Nicholas Kushmerick 7a092285c2 Merge branch 'services-r8'
Bump vcap/services for Services-R8

Change-Id: I9b427cfda6fafb97b908d75b7de9eeed0d57dc29
2012-03-07 12:42:47 -08:00
Joel D'sa 6ad0e9f06c Merge "Bump the submodule pointer for the ACM. Fix to the acm configuration file for dev setup." 2012-03-05 23:45:23 +00:00
Jesse Zhang 9d3f45176f [dev_setup] Chef Installation Clean Up
- Only add opscode source when it's not present
  - Always run apt-get install as it is idempotent

Change-Id: Ibc6200a0b1c28f420d42fd10c73d077cf625413d
2012-03-05 14:38:51 -08:00
felixhoo d0623ea983 Merge branch 'master' into services-r9
Change-Id: Ica4547efedd58997f1f84e19702baa37ab97cfcf
2012-03-04 10:47:20 -07:00
Joel D'sa 93b5c7201e Bump the submodule pointer for the ACM. Fix to the acm configuration file for dev setup.
Change-Id: If12f4ac60dae83e9d1e568cac4bc471d694f87d2
2012-03-02 12:12:41 -08:00
Dave Syer 0e9aa87c3b Merge "CFID-116: UAA default varz password should not be in chef recipe" 2012-03-01 08:15:59 +00:00
Tang Rui 75edaea0af Merge "Add rabbitmq service support in dev_setup" into services-r9 2012-03-01 02:32:27 +00:00
Ken Robertson 0f1cdf53b3 Added Rack framework support
Change-Id: If6e06ee705756ae66b13276c2fbc227f2c055ef0
2012-02-29 08:52:23 -08:00
Jesse Zhang 9d1775e120 Merge "[dev_setup] Quieter apt-get update" 2012-02-29 05:55:47 +00:00
Jesse Zhang e961b9c9a2 Merge "[dev_setup] Include deployment attributes" 2012-02-29 05:55:17 +00:00
Dave Syer a361377336 CFID-116: UAA default varz password should not be in chef recipe
Conflicts:

	dev_setup/cookbooks/uaa/templates/default/uaa.yml.erb

Change-Id: I81b04fd42efbd1ac401a3aec12757610d0c3e777
2012-02-28 18:01:19 -08:00
Maria Shaldybina 9e397681d4 node debugging mode (Martin Lippert)
Change-Id: I96a793b2ae280a90d51e11532c44b62709606c65
2012-02-28 15:32:35 -08:00
Dale Olds afbcfc769e Merge "CC changes to work with the UAA" 2012-02-28 21:44:41 +00:00
Tang Rui 66ea962af3 Add rabbitmq service support in dev_setup
Change-Id: I17748d0a102aa3d6e889209ac586ce78c327a058
2012-02-28 02:24:33 -08:00
Joel D'sa 458d5aa33f CC changes to work with the UAA
Removed unnecessary bcrypt. Token match pattern is less aggressive.

Fix bug to maintain the same code flow for uaa or cc tokens.

Incorporated review comments.

Changed the name of the gem.

Minor bug fix. added config changes.

Changes to support JWT tokens for auth and token
decoding in the CC.

Fix for the health manager tests.

Updated the code to use the latest gem

Now includes dev_setup changes

Bumped the uaa submodule pointer, and cf-uaa-client gem

Cherry-picked changes onto master.

bumped uaa and tests submodule pointers to get test fixes
fix uaa_token

add gem and which checks token expiration time

Change-Id: I1b99082f90c97739558b111ffa58b546231e3ac1
2012-02-27 17:57:12 -08:00
anferneeg 4c6e8f106e Fix router v2 bug, trace header should not be included when trace key is wrong.
Update unit test to cover this case, and modify the parameter to speed up unit test.

Change-Id: I3980ff15169c47165eadf02db1614a44a8b9a159
2012-02-22 21:29:47 -08:00
anferneeg 6fad9ecfae Clean up nginx.conf. Move more logics from config file to uls.lua.
Change-Id: Ia97b4a468c03c44e4b1a22c8502a7cbceedbd307
2012-02-22 21:14:52 -08:00
Jesse Zhang 09cc3e6f0b [dev_setup] Include deployment attributes
This wasn't caught earlier because chef run lists were not in a
determined order.

Change-Id: I64f647781511bccff209373a463ac86a1477ecab
2012-02-22 20:44:32 -08:00
Jesse Zhang 814c237588 [dev_setup] Quieter apt-get update
Make apt-get update during dev_setup quieter.

Change-Id: I19da89d25335ea53f6c8ad98786eefda6248a12f
2012-02-22 19:28:17 -08:00
Jesse Zhang 762f8c3f5b [dev_setup] Switch to OpenJDK
The original license to distribute the branded jdk / jre seems to be
discontinued. OpenJDK works just as well.

  Test plan: pass BVTs

Change-Id: I0f727324ae14163d86225aa15c57f11265c08fe0
2012-02-22 10:18:50 -08:00
Cliff Wang f3abed6b14 correct mongorestore path
Change-Id: I8feb1149a02d01ba6d068e8afd63b5168f1ea71b
2012-02-21 19:15:50 -07:00
anferneeg 9df59fd1cd Refactor router v2. Move lua module code into router directory. Remove unused plugins from nginx.
Change-Id: Ia047aaa80a45a3a55e726fe7ef17d45edc3ac516
2012-02-17 04:44:40 -08:00
Cliff Wang 6aa01e23a6 Merge "Merge branch 'master' into services-r8" into services-r8 2012-02-17 02:12:38 +00:00
felixhoo eb8d4ecf41 Add service plan support for dev_setup
Change-Id: If95eb28b57f22642ff1cdb038526824263c9159f
2012-02-15 13:35:13 -07:00
Jesse Zhang 37aad3e41a Deploy Python with Chef
- Use stock versions of python2 and setuptools.
  - Deploy wsgi and django manifests
  - Pip
  - Rename python26 to python2 because python 2.7 will be in 12.04 LTS

  NB: Leaving version patterns sloppy while it works
  Test plan: pass BVTs

Change-Id: I9d5a37af68d7a880e588d2dd6dc2f315144375b2
2012-02-14 15:13:47 -08:00
Dale Olds da3f993411 Reconcile cmd line options with env variables.
Change-Id: Ia829835dc156917d48fa9db55fdf3a9fce756649
2012-02-09 22:04:15 -08:00
Dale Olds 9a6f06d640 Merge "Merge auth_deployment branch into master." 2012-02-03 03:49:14 +00:00
Dale Olds 8e5838b893 Merge auth_deployment branch into master.
don't update old vcap_setup
Amended to address Jesse's review comments.
Amended to remove submodule update for services.

Change-Id: Id22dbb005275b99017d132ed6e50f4035e394206
2012-02-01 21:10:01 -08:00
Jesse Zhang 4f71f72c52 Unique Bash section name for Node.js installation
Chef seems to mess up if two Bash "nodes" have same names...

Change-Id: I43ab527cdd767801daf4223329c3d0929cc49332
2012-01-27 11:26:14 -08:00
Alex Suraci c4bfa24251 bump node to 0.6.8, vcap_staging to 0.1.35
Change-Id: I0ea28c757c23eb800df8700dc9e6ecaeb5e0bcc3
2012-01-25 11:14:07 -08:00
Alex Suraci fd79088d1d add node06 runtime with Node.js 0.6.7
* add node06 alongside node (0.4.12)
* update node cookbooks to install both, + terminology tweaks
  * nodejs -> node or node04 where appropriate
* bump vcap_staging to 0.1.33

Change-Id: Ifaf0b7233c8f58cea49d15d4bb357a3fc79f612b
2012-01-18 11:29:50 -08:00
anferneeg 97f4c8cc28 Use ULS to generate/decrypt sticky session, to be backward compatible with original router
Change-Id: I7d985e61260ba44398c1b88177d34afad15bc790
2012-01-17 20:10:58 +08:00
anferneeg eba096cb73 Fix sticky session decode failure issue. Refactor, with meaningful variable names.
Change-Id: Ic5438b6fb3ff2ef4d1d3e632c9cb4ee78b959d61
2012-01-19 02:00:29 -08:00
anferneeg abe9e5c3f8 Create nginx init.d script for dev_setup
Change-Id: Ibe5f43e5b33df05f5770f1eb732669ed4b2142a2
2012-01-06 05:33:51 -08:00
Patrick Bozeman d6854d2bcb fix nginx false shutdown error in dev_setup
Change-Id: If2d80fb9a5e41ab681df5063323ce3e955cf2489
2012-01-05 17:32:40 -08:00
Patrick Bozeman 8ec1ada7b4 Merge branch 'master' into router_v2_in_gerrit
Conflicts:
	cloud_controller/Rakefile
	dev_setup/cookbooks/nginx/templates/default/ubuntu-nginx.conf.erb
	router/Gemfile.lock

Change-Id: I7cb5e2b65c21926e9875f613db103a026d20125a
2012-01-05 17:31:28 -08:00
anferneeg 9c74f83485 Fix nginx config in dev_setup to support router trace
Change-Id: I165efebd84e0d066ea70c14f8caeddca4f56c42b
2012-01-04 18:36:51 -08:00
anferneeg aac25f77d2 Add healthz authentication header back for http-monitor
Change-Id: I2c3759d96fa99872d4916e91c5f7764a3f9dc402
2011-12-30 20:40:20 -08:00
anferneeg 190bd23f64 Make router ULS server a sinatra app. Remove client_connections from varz.
Remove keep-alive from nginx's subrequest to ULS.

Change-Id: I89a3b6a59ffba37d25f7f238cbec5ad7793645f8
2011-12-30 20:39:41 -08:00
Dr Nic Williams a7a5735faa don't restrict nginx to custom domain; use _ to allow external URIs
Change-Id: Ic77021458086c8730e25c60b0948af3a0c13950b
2011-12-20 11:30:27 -08:00
Dr Nic Williams 30daf099ff add a section in dev_setup README for custom domains
Change-Id: I1fb957ce5f9e2b239f20bbebc16a2e3e5a527a21
2011-12-20 11:30:27 -08:00
Dr Nic Williams bd3983b9d4 Tell getops to parse -D flag on vcap_dev_setup
Change-Id: I7a03a59b818da94570da73149ac8dc3e1d5c932e
2011-12-19 10:22:11 -08:00
Dr Nic Williams d45b8ae774 bin/vcap_dev_setup & chefsolo_launch.rb take a -D flag to override the domain (instead of vcap.me)
Change-Id: If6b6cc63e21f9cbd20c3787ec0e2d159932ec477
2011-12-19 10:22:11 -08:00
Mahesh 8e47fd4ffe Merge "Fix ruby installs, take 2" 2011-12-16 21:11:37 +00:00
anferneeg 4c570676e3 First pass for router v2 implementation. The init version of router v2 is done by
Jun Xiao, polished by Anfernee with a couple of bug fixes and enhancement.

router v2 decouples control and data path to some extent, it's a logic router
including both nginx and uls (upstream location server) parts.

uls (aka control plane) is based on legacy router:
- all communications with nats are kept the same as before
- client facing interface (actually connected to nginx) is simplified to
  handle the location query/stats update from nginx only.
- the original app facing interface is totally removed.

nginx (aka data plane)
- package lua in nginx so most functionalities can be implemented with it.
- for each request, nginx will generate a subrequest (to fit in nginx
  single thread event model) which carries location query/stats info to uls,
  the response of the subrequest will return backend addr and also an
  opaque tags (only known by uls), and the corresponding main request will
  also be awaked and routed to the backend server, when a response from backend
  is returned back, the counter associated with the particular opaque tags
  will be incremented accoring to the response code. The next incoming
  request will always help to carry not-synced stats to uls along with
  its location query.
- sticky session and trace header are also implemented here,
  also their key related config are moved to nginx part.

testing
- "rake spec" will only test uls, while "rake test" will run both unit test and
  integration test with nginx
- integration test requires nginx with lua module installed running

Change-Id: I9b25b24c449b0421754e541ab5ba60a00c551da9
2011-12-16 10:45:18 -08:00
AB Srinivasan 85e0eabd3b Upgrade Node to v0.4.12.
Change-Id: I7d9d67b30acab80b0b36f221c4f4d1aa65ffff3e
2011-12-16 09:18:13 -08:00
Mahesh 734c7bd77c Fix ruby installs, take 2
The current recipes seem to work with chef-solo version 0.10.4 but version
0.10.6+  needs unique names for the bash code blocks.

Change-Id: I282abaad0f7a40ec2e7f0de1663da735e839104e
2011-12-15 17:09:07 -08:00
Mahesh f458bb0041 Fix ruby install recipes
Added a new library function cf_ruby_install that abstracts the ruby
installation. The current recipes were a hack.

Also fixed rake db:migrate to use bundle exec in dev_setup/bin/vcap.

Note for reviewers, This new library function is a straight copy of the
existing code in ruby/recipes/default.rb with the ruby versions and paths passed
in as parameters i.e. No new real code was added, existing code was moved and
abstracted in a more chef compliant manner.

Testing Done: Deployed a single host cloud.

Change-Id: I0d9ba26e0fb5abc6ebe8add00c857faf2e797c26
2011-12-15 12:00:47 -08:00
Katsunori Kawaguchi 824774f8fc Fix bug to create correct yaml to load
Change-Id: Id6a2491e55a4d3e412a65437944fcdda8f2cf147
2011-12-07 14:49:34 -08:00
Alex Pop 4445693257 Added VCAP_REPO_BRANCH optional argument to help install VCAP based on a point in time version of the repository
Change-Id: I2b81daee4d62bd940cbaca780bdb327d4b318b38
2011-12-07 14:49:34 -08:00
Mahesh 1509ee3924 Fix a typo
QA ran into an issue where they could not run more than one app.

Change-Id: I9e9aaea8d924717c19f44b28070bc9cd12d67abc
2011-12-07 10:35:48 -08:00
Mahesh 3251dbf910 Fix Issue CF-260
We shouldnt be running bundle install in vcap/common.

Change-Id: Ibc152a4e0545758d0af09a05d7369b5353c58dd1
2011-11-29 15:03:40 -08:00
mpage 455c335f1b Remove 'local_register_only' and add 'allow_registration'.
The existing implementation of 'local_register_only' had a security hole.
Moreover, I'm not sure that it's possible to implement the intent of 'local_register_only'
in Rails/EM safely. We would need to grab the socket for the current request and call getpeername()
on it.

We attempt to provide similar functionality to 'local_register_only' by allowing users to disable
registration and provide seed users to be created at startup. The seed users can then be used to
register additional users.

Test plan:
- New unit tests pass
- Ran CC locally with/without allow_registration set and verified the correct behaviour with vmc.
- BVTs pass locally
- BVTs pass on my deployment

Change-Id: Ib1c96304f7a7364b913a8a09f7178f85857cd46d
2011-11-17 17:14:12 -08:00
Albert Choi 1b1591ffe4 Feature/php recipes
We have been using these chef recipes internally at AppFog to deploy our PHP
environment and wanted to share.

Other points of interest:
* Gems built by staging's Rakefile are gitignored
* Removed an errant PHP staging spec from the cloud_controller tree
* Cloud Controller's welcome message and database adapter are configurable
* Some DEA configuration values are now configurable by chef (defaults are
* preserved)

(Note: this is a squashed commit of pull request 118 with
some edits by CF.com (e.g. add the ccdb adapter attribute))

Change-Id: I619d83e2898994714e1c4972ff9ae360d03b4d79
2011-11-16 15:53:38 -08:00
Tang Rui 772343da76 Chef recipes: add max_clients to config
Change-Id: Id0c73113ecdcd5ed88008809a9b3a1cf93b0655e
2011-10-26 22:59:00 -07:00
Tang Rui 9b99e1f022 Chef recipes: add command_rename_prefix to config
Change-Id: I59ac03fdd193534abb322814bd75559f94856ae5
2011-10-24 19:46:31 -07:00
rtang 214ca636f3 Chef recipes: add redis_log_dif to config
Change-Id: I95fa9bea943f1195c3e99a3124e61cdb1c33fdef
2011-10-24 19:44:58 -07:00
Mahesh c429c6291d Run cloud foundry components installed by chef scripts
If the ENV variable CLOUD_FOUNDRY_CONFIG_PATH is defined, config files are
picked up from that location. This allows components installed by the chef scripts to be
run by hand. i.e. without using the wrapper vcap/dev_setup/bin/vcap_dev <start/stop>

Change-Id: Ib6c971c6642bcb3b24186169e1c768ee70ba8d7b
2011-10-19 16:09:23 -07:00
Alex Suraci dd4e26fbb9 rename 'wait' debug mode to 'suspend' for clarity's sake
Change-Id: I8ddf1845b1c62009f8db879a372d110a45f8fa4a
2011-10-14 15:16:28 -07:00
Alex Suraci f2859f5ecb Update chef cookbook to include debugging configs, enabled by default
Change-Id: I88b64ffb3e1c3d19625cae5111cf245c4c8fd25f
2011-10-14 11:21:44 -07:00
AB Srinivasan 2d6e6944c5 Include java_web manifest / ref in dev_setup.
Change-Id: I321080dcf9b97e4ffb345fde7e9a5e96de39e55d
2011-10-11 20:36:08 -07:00
Patrick Bozeman 4f268b3e37 fix -d without -n vcap_dev bug
This commit fixes a but that happens if you run vcap_dev
with a -d option but not a -n option.  (The old
code would leave options["name"] uninitialized)

Change-Id: I820a7fd5ce10f11af96b15f970d3a0b358fec49c
2011-10-03 15:25:28 -07:00
Nicholas Kushmerick 15d9413a78 Chef recipes: add mongod_log_dir to config
Change-Id: I540770bb6a50ca08117d932312b01721ae6d9b59
2011-09-29 19:41:30 -07:00
Mahesh 6e94cd89f3 Add neo4j support + Misc changes
Change-Id: Ib81996a84b0283fd6afc7bb0109d12c620bbcce8

- Add neo4j support
- Save the last deployment in a deployment target file under $HOME
- Change service name i.e. make mysql => mysql_node etc
- Point out the profile file at the end of a deployment, has paths to run vmc
- Audit admin list
- Remove some packages from essentials list
- Increase timeout in bin/vcap that checks if a component is started

patch 3 - Fixed olegs comments.

Testing Done:
   Ran Neo4j feature bvt test
   Ran single host deployment
   Ran multi host mongodb deployment

Change-Id: Id96757bfe109af2f89b9a25e35a669a41c2d259c
2011-09-21 16:21:33 -07:00
Woon Jung 99ba8536b2 Merge "Change the cookbook to match the service config file changes." 2011-09-09 19:06:52 +00:00
Mahesh 7f1305d2bd Make dea runtimes configurable
patch 2 - install only the selected components
patch 3 - resolve merge conflict

Change-Id: I5eb5f31ea457542290ac4f87e4e11c371be007f6
2011-09-09 11:58:31 -07:00
Mahesh 46ef1a1608 Merge "Add a high level README explaining how to use the chef scripts" 2011-09-09 18:50:33 +00:00
Woon Jung ef6bdf3ca4 Change the cookbook to match the service config file changes.
Recent change the dev_setup cookbook this change fixex the error.

e.g:
in mysql_node
vcap_logging-0.1.0/lib/vcap/logging.rb:82:in `setup_from_config': undefined method `[]' for nil:NilClass (NoMethodError)

Change-Id: I7706fc01e1a1743bb27de60cf8f89d182f4c18bf
2011-09-09 11:17:31 -07:00
Mahesh 85306c24e1 Add some description to cloud foundry configy files.
These are my stabs at describing these fields, dont be too surprised if some of
the descriptions are somewhat off from the real use.

In addition to these I looked at the service node and gateway files but they dont seem
to have many interesting fields that need specific descriptions.

patch 3 - know -> known (Thansk Oleg)
patch 4 - added the same comments to files under vcap/{cloud_controller,health_manager,router,dea}
patch 5 - Fixed review comments.

Change-Id: I65185ddc6c08eecf4516944b960367dcb9b1011d
2011-09-08 22:41:54 -07:00
Mahesh 0403871406 Add a high level README explaining how to use the chef scripts
Also updated the deployment readme to document the currently supported multihost
setup.

patch 3 - fix review comments
patch 4 - Fix the readme with the right paths for custom deployments
patch 5 - Fix Vadims comments
patch 6 - Replace 'o' -> '-' :)

Change-Id: Ie2f330248d0c23b900925b0ee54b6e366843713d
2011-09-08 22:38:19 -07:00
Patrick Bozeman ed7aed484e Merge changes Ia7b7fd5f,I3f73e4e2
* changes:
  Add optional profile.sh file to ease deployment
  Fixed rvm problem with root installation, and removed the "Fixing init scripts" block because it's already fixed in rvm.
2011-09-07 18:45:56 +00:00
Mahesh bf9dca4415 Fix couple of bugs
o vcap stop used to fail trying to load config file for components that were
never running on this host
o Start cloud controller before the health manager.

Change-Id: I103685396e332faf0a7eeb9173e2ca6721fdd744
2011-09-06 13:25:27 -07:00
Patrick Armstrong f285541475 Add optional profile.sh file to ease deployment
Change-Id: Ia7b7fd5fe995b66d81fa3bde20c7e283b2c9b49e
2011-09-02 12:39:30 -07:00
Mahesh dff7ffa463 Setup cf logs under deployment home directory.
In addtion this change also includes the following changes.
o Remove all backup service related scripts/templates.
o Simple fix to change the deployment name for mulithost mongodb deployment.

Testing Done: verified single host deployment, checked presence of log files in
the new location.

Change-Id: I2b96246da62fe44a3e7de5ca86ca0bf49a20b9c3
2011-08-24 13:57:49 -07:00
Mahesh d4521d1c5a Split services into each service.
Also bumped up the verision of rubygems and bundler.

Testing Done: tested single host setup. Will test multihost setup before
submitting the change.

Change-Id: Ib7ab913f5bf27e90962b5bade2a9b9a7b51cecfd
2011-08-23 18:48:32 -07:00
Mahesh f773c3ed2b Bug fix. add not_if to package resource.
Change-Id: I79db7886eb71ed1c574ca01ca86de67c51803003
2011-08-23 17:37:06 -07:00
Patrick Bozeman 73764cf570 Merge "Add libpg-dev package to the ruby recipe so pg gem can be installed." 2011-08-23 00:38:27 +00:00
Mahesh afc2589405 Merge "Add external_uri support" 2011-08-22 23:44:23 +00:00
Mahesh bfec8bfaa7 Add external_uri support
Tested my changes with cc and services configured to go against my dev23 setup
i.e.  "appcloud23.dev.mozycloud.com"

Ran BVTs.

Change-Id: I4e3c97a06c4348c31d610957af6e74cf953ad5c5
2011-08-22 16:32:27 -07:00
Mahesh 826f31619c Merge "Trivial - do not install java if it already exists" 2011-08-22 23:31:52 +00:00
Mahesh 146e6cb179 Merge "Cleanup deployment config file handling + some sample multihost deployment config files" 2011-08-22 23:14:38 +00:00
Patrick Armstrong 71b25effbf Add libpg-dev package to the ruby recipe so pg gem can be installed.
Fixes problem where gem complains that the pg_config isn't available.

Change-Id: I1463e2139c4c79fdab8dcc4037bc1ae9386f204e
2011-08-22 15:20:50 -07:00
Mahesh 2def5489b3 Trivial - do not install java if it already exists
Fix for issue cf-135. Usually the pakcage command does the right thing but that
would only work if the same version of java is installed, if openjdk or some
other flavour is installed the package command fails misreably in this case
because it cant find the right repo.

Change-Id: I1aef325e557d338141e68dbd91a070b438f62563
2011-08-22 09:10:11 -07:00
Mahesh 4dda4c0554 Misc simple bug fixes
bin/vcap - fix a bug where the specified config file was not being used to
lookup properties.

bin/vcap_dev_setup - check for git clone failures

job_manager.rb - remove postgresql as a services

patch 2 - fix $configdir => $config_dir

Change-Id: Ie0214ce340f62f585f6233a7c7de1e78cc6e1ad8
2011-08-18 19:21:11 -07:00
Mahesh addd8f66c5 Cleanup deployment config file handling + some sample multihost deployment config files
The deployment config file doesnt need to be an .erb file anymore. Removed some
old code that was using it as an erb file. Also remove the old config samples in
deployments/multihost.

patch 3
Added: sample config files for multihost redis

patch 4
Remove more old/outdated sample files

patch 5
Hit myself on the head.(Added white space remover to vi)

Change-Id: I402e5de08eb9a1fa26c6489ca138d5da7229cf14
2011-08-18 19:17:04 -07:00
Mahesh 59983692da Multi host part 2 + changes to allow deployment like bash < <(curl vcap_dev_setup_url)
Change
  This review has changes related to the following 3 things.
  1. Move all the default config (that was embeded in
      vcap_dev/vcap_dev_setup/job_manager) into chef cookbooks.
  2. Add postgres CCDB.
  3. Multi host setup for services and dea. This meant separating service
  gateway from service nodes. To this effect we added a service gateway role.

Overall a lot of files have changed, most of those changes are related to
moving all the default config values from the various wrapper scripts to the
cookbooks, especially the new cookbook called deployment which is the holding
place for all the deployment related config options.

* dev_setup/bin/vcap:
  Added vcap to dev_setup/bin instead of just changing bin/vcap. The reason for
  this is that opensource CF code will not be in sync with the
  private repo and internal testing of CF dev_setup scrips would not work if it
  relied on the version of vcap in the opensource repo i.e. bin/vcap. So now we
  just package vcap with dev_setup.

* vcap_dev
  * Since all defaults are now maintained in chef scripts. The chef "deployment"
  * role/recipe creates a deployment info file that is consumed by this vcap_dev
  * script.
  * The vcap_dev_setup file now saves the list of components that were installed
    for a deployment. This script only starts the components included in that
    list.
  * Uses the vcap binary from dev_setup/bin

* vcap_dev_setup
  Moved a bunch of directory creating code to the deployment cookbook

* Added a CCDB role/recipe.
  * Creates and Configures the CC postgres database.

* Added deployment cookbook
  * Moves all the comon directory creation code here. Note, we should go back
    and see if we really do need all these various directories and probably come
    up with a well designed directory layout.

Testing:
* Ran BVTS. Lift BVT failure needs investigating (I will fix/get to the bottom
  of it before i submit this change)
* Tested the following multi host setup.
  1. Ran mysql database with mysql node on 2 VMs. On a 3rd VM ran everything
  else. Verified that BVTs passed.
  2. Ran dea on 2 different VMs. Ran everything else on a 3rd VM. Verified
  that BVTs passed.

    Note: I have only tested the multihost setup with mysql. I will test mongodb
    and redis before submitting this change, I expect those to run without any
    glitches.

Change-Id: I6a084be09a81bf920eebc62be8d7aa6625cc17e9
2011-08-16 22:54:44 -07:00
Mahesh 74518d71de Simple change to fix deployments that should not download vcap repo
Setting a default value for REVISION was incorrect. nil is the right default for
this property.

Change-Id: Iaf2d636cb508c4e3469f479663f9ade8ecf9f895
2011-08-09 11:40:57 -07:00
Mahesh ff4c25516b Multi host setup scripts
All deployments (multi host and single host) are driven through a templated
config file. Look at dev_setup/deployments/sample* for an example of what this
config file looks like. There is sufficient documentation inside the configs.
But at a high level the user specifes "jobs" to "install" and jobs that are
"installed". The "installed" jobs have properties associated with them which are
used by jobs that are in the "install" list. e.g. nats could be an installed job
and its properties like host/port will be used by the jobs in the install list.
  The deployment code now goes through this config file, does sanity checking to
verify valid job names, valid properties etc. It leverages "rake" to manage
dependencies between jobs, look at dev_setup/lib/job_*. So we enforce that all
dependent jobs for a given job are either in the "installed" list or in the
"install" list.  Once all job specs are verified, we generate the chef runlist
on the fly and the deployment proceeds to install the required components using
chef.

NOTE:
1. For now, multi host service deployment is limited to only selecting a service
say "redis" and the scripts will install the service node, gateway and the redis
software itself on the same host. We can add more flexibility to this later.
2. For now, we use roles to enforce chef recipe dependencies. It seems to be
working well for what we have right now and I like the fact that there is one
location that maintains the chef dependencies for a given component.
3. For now, not all configurations of multi host are tested. In fact, I have
only
verified NATS. The config file template changes for all the other components
will be added in later changes. e.g. with this change you cannot run ccdb on a
separate host and expect cloud controller to work. But the changes to make it
work are more about adding the right templated fields and testing those changes.

Testing Done: I have verified that I can install "nats" on one box and the rest
of the components on a different box and things work fine.

Change-Id: I165b01fd65e4283748cf2cf9b2438369ae6332ce
2011-08-03 13:54:48 -07:00
Mahesh ff543c0f03 Templates for CF config files. Also change deployment config from json to yml.
Added template files for all cf components including services.
Add comments to the deployment yaml config file. Cleanup some of the scripts.

Change-Id: I9209749ab9ca50a2bd894189c571e1b4c33bc77b
2011-07-29 11:46:37 -07:00
Mahesh b088a41bcf More license fixes
Change-Id: I74502d897bce163486755662a39fc3ce733030f5
2011-07-22 14:50:57 -07:00