Consistently use bytes for memory statistics

For some reason, stat_collector assumed rss was reported in kilobytes
instead of bytes and multiplied it by 1024.  The rest of the code then
started to divide the 'used_memory_in_bytes' by 1024 to really get bytes
back.  Very odd.

This change simply removes the hacks that multiply and divide to get
expected data.
Make memory reported match cgroup usage data

The DEA was reporting 'used_memory_in_bytes' as the RSS returned from
warden.  RSS, however, is not what cgroup uses when checking container
memory limits so it's inappropriate memory statistic to report to end
users via cf stats.

The Linux cgroup implementation reports container memory usage in
memory/memory.usage_in_bytes and calculates this by adding
memory/memory.stat:cache and memory/memory.stat:rss so this change will
introduce the same logic to the DEA.  Instead of using cache and rss,
however, total_rss and total_cache will be used as it accounts for child
containers when present.
Refactor staging_task_spec to remove before(:all)

Signed-off-by: Kris Kelly <kkelly@pivotallabs.com>
librarian gem is not being used

Signed-off-by: Andrew Bruce <andrew@camelpunch.com>
upgrade JSON

Attempt to avoid problem deploying through new pipeline tools

Signed-off-by: Andrew Bruce <andrew@camelpunch.com>
Add Container#link_or_raise

  * this method is going to be used in staging task

Signed-off-by: Kris Kelly <kkelly@pivotallabs.com>
Use spawn/link instead of run_script in staging task

  * This will allow dea logging agent to connect to spawned job before it's completed

Signed-off-by: Kris Kelly <kkelly@pivotallabs.com>
Snapshot additional attributes for staging task

 * warden job id, container path, syslog drain urls
that DEA logging agent needs to connect to container's job

[#63400876]
Signed-off-by: Kris Kelly <kkelly@pivotallabs.com>
Update Java Buildpack

This change updates the Java buildpack submodule to version 2.0
Version 2.0 includes the following improvements:

* Output detection changes[1]
* Play Framework 2.2 support
* Spring Insight support[2]
* New Relic zero-touch support now works with user-provided services
  in addition to platform provided services[3]
* AppDynamics support[4]
* New abstractions and test support for building components
* Automatic download of MariaDB and PostgreSQL drivers

[1]: https://github.com/cloudfoundry/java-buildpack/commit/be124ef5a40fdc5e155a93f3f700410bd5687fc6
[2]: https://github.com/cloudfoundry/java-buildpack/blob/master/docs/framework-spring_insight.md
[3]: https://github.com/cloudfoundry/java-buildpack/blob/master/docs/framework-new_relic_agent.md#user-provided-service-optional
[4]: https://github.com/cloudfoundry/java-buildpack/blob/master/docs/framework-app_dynamics_agent.md
Save warden job id to snapshot after staging task was spawned

Signed-off-by: Kris Kelly <kkelly@pivotallabs.com>
Don't emit staging output to loggregator

  * Since DEA logging agent is now listening to container sockets we don't need to emit them twice

[#63400876]
Fix flaky test: regenerate droplet sha1 in start message on every call

  * Starting message sometimes contained sha1 calculated before the app was staged.
This introduced flakiness in running_app_spec.
Newer versions of Vagrant are ok

Signed-off-by: Abhijit Hiremagalur <abhi@pivotallabs.com>
Update bcrypt to work with new heroku buildpack

[#63634414]

Signed-off-by: Michael Maximilien <maxim@us.ibm.com>
Assert that HTTP_PROXY is conveyed to staging env

[#63634414]

Signed-off-by: Michael Maximilien <maxim@us.ibm.com>
Update README.md

Must cd into the dea_ng directory before trying to submodule update.
Stop when shelling out fails

Signed-off-by: Michael Maximilien <maxim@us.ibm.com>
Switch back to latest, vanilla Heroku nodjs buildpack

[#63634414]

Signed-off-by: Michael Maximilien <maxim@us.ibm.com>
Only save logs after crash

Signed-off-by: Maria Shaldibina <mariash@pivotallabs.com>
Fix unit tests

Signed-off-by: Phan Le <ple@pivotallabs.com>