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

91 Коммитов

Автор SHA1 Сообщение Дата
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
mpage f3f5027095 [dea] Add env var for specifying ruby18 runtime in CI
Ruby is no longer in the default search path when running inside
a container. To further complicate matters, the DEA starts apps
with 'env -i' preventing it from being added to the environment
when the DEA is started.

Change-Id: I15d2b62a9e26afadb77a926ea00a391f57b33550
2012-03-22 19:08:30 -07:00
Ramnivas Laddad 6d9a9d8850 Update to Tomcat7 (replacing Tomcat6)
- Removed the logic in agent that uses a file to decide if an app is started
  (instead, we use Tomcat7's mechanism that doesn't bind to port until the
  app is started). This makes Java web apps no different than other apps
- Update code to generate server.xml such that the bindOnInit attribute is
  set to false (thus making it wait until the app is ready to bind to the port)
  and remove flags that no longer apply to Tomcat7

Change-Id: If00f30dd636cf50df76fbc3cc99ba3eecb464531
2012-03-21 13:53:43 -07:00
Jesse Zhang 7d46f32821 [fix] Preserve HOME env var for version checks
This is a follow-up to Change Ie3d7f772 , We preserve HOME environment
varialbe in both version check and additional version checking.

  Test plans:
    - Unit tests pass
    - BVT pass on dev_setup
    - BVT pass on dev instance

  Next step: We shouldn't need the additional check, remove this
duplicate.

Change-Id: I3f44a8aa7893ff6bb7a19a7c6855b4d14843bdf5
2012-03-20 10:11:33 -07:00
Jesse Zhang 9ccc238cce [dea] Preserve HOME env var for version checks
I don't understand why Erlang insists on HOME env var being set.
Anyway this accomodates that erlexec quirk when validating runtimes.

Change-Id: Ie3d7f772cb6fa2ed2f8b05a8f854009d871ce24f
2012-03-13 12:12:17 -07:00
Jesse Zhang b13a64b500 [python] Update stock configs
Update example yaml configs to reference Python 2.6 runtime as python2
lieu of Changes I9d5a37af and I513499da. This is more of a documentation
update as these configs are not used by deployed applications.

  Test plan: passed unit tests

Change-Id: Id185299b13dbbb1fdfd4cc3fc67b07b334051798
2012-03-13 12:12:17 -07:00
Maria Shaldybina 9e397681d4 node debugging mode (Martin Lippert)
Change-Id: I96a793b2ae280a90d51e11532c44b62709606c65
2012-02-28 15:32:35 -08:00
Jesse Zhang c337bb74d8 [dea] Temporary fix for CI tests
The functional tests in ruby assumes that /usr/bin/ruby is ruby1.8
which is bad and fails in new CI environment where this executable
doesn't exist. This change assumes /usr/bin/ruby1.8 is ruby1.8, which is
just as bad.

  Next step: only use hardcoded path as fallback and detect some
external configs such as file or env vars.

  Test plan: pass unit and functional tests, make CI happy with DEA
specs.

Change-Id: Ic26d213c3c52b1a5fb00ee43c70530484a240dbe
2012-02-22 10:41:53 -08:00
Tal Garfinkel f7bfecb7dc set predictable defaults for config settings.
Change-Id: I327212a2f154047a17f97ba860a98794504b0f59
2012-02-08 00:43:49 -08:00
Patrick Bozeman 2c0bde7f14 disable dea disk threshold in the unit tests
yes.. I was burned by this. my / mount point is 98% full and
the default value caused the unit tests to fail

Change-Id: I7cbfc8f74967ae196ac9f847514b78c50a376088
2012-02-16 21:17:27 -08:00
Patrick Bozeman 38925a3b59 bump vcap_common to 1.0.8 in dea
Change-Id: I0f1b69bbdfe7e341d8624d625eaf30b55f8ddba4
2012-02-16 20:54:23 -08:00
Tal Garfinkel e6e5c4eab1 dea support for centralized initial placement.
Purpose:

Replaces discover message and tainting approach in current
implementation. New approach is less sensitive to network
latency fluctuations, thus predictably ensures random app
placement.

DEA:

-dea periodically broadcasts (default: 5 seconds) its relavent placement
stats on dea.advertise.

-dea also sends new advertisements when resources are provisioned (e.g. at
app start) or free'd (at droplet cleanup).

-dea now listens on dea.locate, will response on dea.advertise with its
 stats (id, available_memory, runtimes).

CC:

-new placement protocol can be optionally enabled with
new_initial_placement: field in cloudcontroller.yml (off by default).

-DEAPool keeps a hash of available DEA's based on messages from
dea.advertise.

-CC subscribes to dea.advertise then publishes a dea.locate message
 on startup to initially populate DEAPool's hash.

-DEAPool.find_dea(app) returns a random DEA with sufficient memory and
runtime support from this list, replaces find_dea_for method in
app_manager that relied on use of discover messages.

-DEAPool.find_dea will prune out of date entries from the DEA hash, i.e.
if an DEA's entry is greater than 10 seconds old (2x the advertise
period).

Change-Id: I8c1537103e63eb3b42b22f61ac278eba4c8eef61
2012-02-07 19:56:01 -08:00
Jesse Zhang f7e7990be2 [dea] Kill apps the right way
This addresses a bug introduced by Eduardo Aceituno in commit
2b56b7f1e4 .
  - Correct order of pid in su command
  - Less unreadable command substitution
  - Log the droplet instance state to confirm that we are killing
    slow-starting crashed apps
  - Run runtime check in clean environment

Change-Id: I2c2f5faa969b8e7ccc8e639173e6c2bbefb8b369
2012-02-13 11:27:33 -08:00
mpage 28633367f6 [dea] Refuse to respond to discover/start requests if disk usage is too high.
Previously, the DEA would continue to respond and attempt to fulfill discover/start
requests even if no disk space was available. We track usage for the filesystem
that houses the droplet directory and refuse to respond to said messages if usage
is too high.

Test plan:
- BVTs pass
- Deployed to my dev instance, filled the droplet dir to > 95%, and verified that the
  DEA didn't respond to start/discover requests. Tested both with an actively running
  DEA (to exercise the timer code path) and with a DEA that was just starting up.

Change-Id: Id0817bdccddd932e98eb76eba98a04e6ab14acd1
2012-02-13 11:07:59 -08:00
mpage 01ae461067 Renice processes to default nice value (0) before starting.
This allows the dea to be started with a high priority and not
have that priority inherited by the applications that it starts.

Test plan:
- BVTs pass
- Checked that when started with a high priority, apps have a
  nice value of 0.

Change-Id: Ide3abc0105c6389c6df890a80491caf0ec4df605
2012-02-10 11:22:10 -08:00
mpage 35685818a3 [dea] Execute version checks with a clean environment
Bundler (1.1.rc.5) leaks the following into my environment:
RUBYOPT=-I/home/mpage/.rbenv/versions/1.9.2-p180/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.5/lib -rbundler/setup

This causes the version detection command used during tests ('/usr/bin/ruby -v') to try to
require the gems in the DEA's bundle. This will fail if the version of ruby used when running
the DEA is different from /usr/bin/ruby.

Change-Id: I10fff86fad90cb3136e1ba088f9432cb14b97046
2012-02-10 11:14:39 -08:00
Patrick Bozeman e4fb48772d Revert "bump vcap_common to 1.0.7 in dea"
This reverts commit b2853d37a9.

Change-Id: I8666c24477ff7638f123aa3e7d20d6a2ca0e5ce4
2012-02-06 14:12:20 -08:00
Patrick Bozeman b2853d37a9 bump vcap_common to 1.0.7 in dea
Change-Id: Ib8d22ad5a97d08fee4b3723e79917c2477349487
2012-02-06 11:30:40 -08:00
Nicholas Kushmerick 122a0b912e Merge branch 'services-r7'
Bump version of vcap_{common,staging} gems

Conflicts:
	cloud_controller/vendor/cache/vcap_common-1.0.4.gem
	health_manager/Gemfile
	health_manager/Gemfile.lock
	health_manager/vendor/cache/vcap_common-1.0.4.gem
	package_cache/Gemfile
	package_cache/Gemfile.lock
	package_cache_client/vendor/cache/vcap_common-1.0.3.gem
	staging/Gemfile.lock
	staging/vcap_staging.gemspec

Change-Id: I965209a184ac06319ac23f490fba9069e5defa8f
2012-02-01 09:47:21 -08:00
Jennifer Hickey 564a744c73 Add rails console support
Change-Id: Icc15b46121f903780673467e195c1cfca88a74f9
2012-01-31 13:26:33 -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
Bob Nugmanov 81ce529aa3 added :dea=>uuid to heartbeat
Change-Id: I9e3ca4e3d49c8b82cebdbb24c5df38f59c0b7e94
2012-01-18 15:56:30 -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
felixhoo 8e271367fe Rebuild vcap_common gem for nats update
Change-Id: Iad190ced66d49172a6a1e00b31d8299bb637cf76
2012-01-04 21:16:26 -08:00
felixhoo 14d5fba773 Merge branch 'master' into services-r7
Conflicts:
	cloud_controller/Gemfile
	cloud_controller/Gemfile.lock
	dea/Gemfile.lock
	dea/vendor/cache/vcap_common-1.0.3.gem
	health_manager/Gemfile
	health_manager/Gemfile.lock
	health_manager/vendor/cache/vcap_common-1.0.3.gem
	package_cache/vendor/cache/vcap_common-1.0.3.gem
	router/Gemfile.lock
	stager/Gemfile.lock
	staging/Gemfile.lock
	staging/vendor/cache/vcap_common-1.0.3.gem

Change-Id: I58bb9fa584811e65e3f64189ab7110449d3ce139
2012-01-04 21:04:46 -08:00
Patrick Bozeman 2c883a9631 update dea to latest gems
including:
* vcap_common 1.0.3
* nats 0.4.22.beta.4
* thin 1.3.1

Change-Id: Id0bbf677fb6114488544a0e394b8b9e7b657bd25
2012-01-04 11:25:29 -08:00
felixhoo c287b575f1 Rebuild vcap_common gem
Change-Id: I5eacb758098fa9d81aab8de5aa06b27d5b1ae036
2012-01-03 22:46:14 -08:00
felixhoo dd726fa396 Merge branch 'master' into services-r7
Conflicts:
	cloud_controller/Rakefile

Change-Id: I1de97fe409ad2a1194edf345d928cc9f72507af9
2012-01-03 22:30:59 -08:00
kparikh 7f1c81237b Add ci-reporter task to generate test reports in junit xml format
Change-Id: Idd2c7cd9c0fc44aa3786d7e2f6aa140c1102a8ae
2011-12-29 19:46:38 -08:00
kparikh d883e55fd6 Add ci-reporter task to generate test reports in junit xml format
Change-Id: Idd2c7cd9c0fc44aa3786d7e2f6aa140c1102a8ae
2011-12-21 22:36:53 -08:00
Patrick Bozeman 9e93ab2955 Merge "refactoring of dea app port managment" 2011-12-20 19:27:10 +00:00
Patrick Bozeman 866a67d264 Merge "remove dead DEA#grab_ephemeral_port code" 2011-12-20 19:27:05 +00:00
Patrick Bozeman d008880fc1 refactoring of dea app port managment
This was done to support pull request
https://github.com/cloudfoundry/vcap/pull/100

That request wasn't pulled for other reasons,
but when it gets resubmitted, it can drop
into the DEA#grab_port method

Change-Id: I1a230fffd5ff5ec177e9e97f2a31cb4c6cb4013a
2011-12-19 10:17:35 -08:00
AB Srinivasan 85e0eabd3b Upgrade Node to v0.4.12.
Change-Id: I7d9d67b30acab80b0b36f221c4f4d1aa65ffff3e
2011-12-16 09:18:13 -08:00
Patrick Bozeman e8b01d40f7 remove dead DEA#grab_ephemeral_port code
Change-Id: Ifa89b5c07d600f6c97ed594f2a6026dbc372f4ae
2011-12-15 16:44:36 -08:00
felixhoo bb5a8298fa Move vcap/lib to vcap/common
Change-Id: Ic17db70f75e8b0ec5f3c8820cf3689520d49656b
2011-12-13 22:55:27 -08:00
Patrick Bozeman dd3333832e vendor vcap_common in all core components
* stop requring it via :path ../common
* includes a dependency on em.0.12.11.cf.3 with a fixed up
gemspec to avoid the syck::defaultkey issue.
* bump staging and stager gems after taking new dependencies
* lock 3rd party gems to minor versions in the Gemfiles

Change-Id: I92648154036f8771400578a2ac14904c2c179d6c
2011-12-13 15:08:22 -08:00
Patrick Bozeman 846ca4eb00 bump eventmachine to 0.12.11.cf.2
Change-Id: I6e8d25e731b353cbb2e59ca02e9a78489ce21dbe
2011-11-08 16:18:25 -08:00
Eduardo Aceituno 2b56b7f1e4 homogenize start/stop generator script
Conflicts:
	cloud_controller/app/models/app.rb
	cloud_controller/staging/common.rb
	dea/config/dea.yml
	docs/php.md

Conflicts:
	cloud_controller/Gemfile.lock
	cloud_controller/vendor/cache/vcap_staging-0.1.2.gem
	staging/lib/vcap/staging/plugin/common.rb
	staging/lib/vcap/staging/version.rb
	staging/spec/unit/spring_spec.rb

Change-Id: Ia8a1d138bb5961f501b195f9bb6dcfe26d8ba93d
2011-11-08 11:52:36 -08:00
Patrick Bozeman 0a31777b19 Merge branch 'em-and-hm-fix'
Change-Id: I7993490d99c2cacfe8cf3c47d74b09fcb208d472
2011-11-06 16:05:08 -08:00
Patrick Bozeman 1cef5d4e72 vendor new vcap_logging gem to fix syslog issue
Change-Id: Iff5c1d0f0f2df81dee25997cab2cee2977667cc8
2011-11-06 15:41:30 -08:00
Patrick Bozeman e54564136d bump eventmachine to 0.12.11.cloudfoundry.1
Change-Id: Ie4d48312f05e0712035a0d08c3573056ba1f615b
2011-11-01 11:00:49 -07:00
Anton Panasenko 4a54ead7d2 Merge of "Fix passing params to status server"
Conflicts:
	cloud_controller/config/cloud_controller.yml
	tests

Change-Id: I39a8da8d509d153205d5b82c44ea63ee19322e07
2011-10-27 19:18:54 -07:00
Patrick Bozeman 25fbb1a932 bump eventmachine to 0.12.11.cloudfoundry.1
Change-Id: Ie4d48312f05e0712035a0d08c3573056ba1f615b
2011-10-26 15:14:11 -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
Oleg Shaldybin b5a3531ea8 Bringing back recently reverted debugging changes.
This reverts commit 22e92b3959.

Change-Id: I2d0a03547fbffa9aa3d6122ebd7bfa81d40f4f05
2011-10-17 15:08:50 -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
Oleg Shaldybin 22e92b3959 Revert "debugging: provide the public address along with the debug port to attach to"
This temporarily reverts commit cab9f17d7a to avoid
our build tools triggering the new DEA build.

Change-Id: Ibce8e9ccb9cd23078ee4dbbda236f1be5d42a995
2011-10-11 15:03:55 -07:00
Alex Suraci cab9f17d7a debugging: provide the public address along with the debug port to attach to
Change-Id: I5e46641aed09f0c64935c228b0a24daa26f0a61b
2011-09-26 15:54:09 -07:00
Woon Jung 9d24ccab02 Merge "race condition (cleanup_droplet and stop_cmd)" 2011-09-12 16:45:10 +00:00