cloudfoundry/cloud_controller_ng — pull request #269 by nota-ja (2014-07-01 23:19:29+00:00)
Title: Extend "zone" function

This pull request adds below features to the "zone" functionaliy:

- Finer logic to distribute instances of an app
- Beside to current logic considering stack, memory and disk, it distributes instances of an app
- not only across zones, but also across DEAs in a zone

(DEAs having fewer instance(s) of the app to deploy is preferred)
- with respect to number of instances of all apps
- With this feature, more availability of an app and more balanced status between DEAs / zones are achieved
- "Zone validation" to enhance manageability
- Only DEAs having the "valid" zones can stage / start an app.
- The valid zones are defined in CC configuration
- This feature enables to avoide deploying instance(s) of an app to wrong / old DEAs
- "Main zone", which is the prior place where the first instance of an app will be deployed
- The "main zone" is determined by the priority given in CC configuration
- A probable use case is that:
- There is a CF environment built across on-premise / public IaaS
- A user of the CF prefers to deploy instances of an app to the on-premise DEAs, but when the resources become tight, app instances may be deployed to the public DEAs
- Enable a user to specify a single zone to deploy (all instances of) an app
- A probable use case is that:
- Network latency to a database service differs between zones
- A user prefers to deploy an app to the zone with the minimal latency

This pull request is a part of a pull request set. It depends on https://github.com/cloudfoundry/dea_ng/pull/137 .

And in this pull request, while each of the latter 3 commits ( https://github.com/nttlabs/cloud_controller_ng/commit/7d63340401be3e08572ce0d35dfb8623ed784280 , https://github.com/nttlabs/cloud_controller_ng/commit/9531b7bb4e29549bbeab84c39edfd850df4bdcc3 , https://github.com/nttlabs/cloud_controller_ng/commit/582c6296ceb14b0beedfad89ad8d85fec1c5f374 ) depends on the first commit ( https://github.com/nttlabs/cloud_controller_ng/commit/e6181d5b2437a83977cefd1facfafe858a773b89 ), they are (essentially) independent to each other.