Merge lp:~arosales/charms/trusty/mongodb/jay-wren-faster-install into lp:charms/trusty/mongodb

Proposed by Antonio Rosales
Status: Work in progress
Proposed branch: lp:~arosales/charms/trusty/mongodb/jay-wren-faster-install
Merge into: lp:charms/trusty/mongodb
Diff against target: 13 lines (+2/-1)
1 file modified
hooks/hooks.py (+2/-1)
To merge this branch: bzr merge lp:~arosales/charms/trusty/mongodb/jay-wren-faster-install
Reviewer Review Type Date Requested Status
Matt Bruzek (community) Needs Information
Review Queue (community) cbt Needs Fixing
Review via email: mp+234241@code.launchpad.net

Description of the change

Refactor Jay Wren's MP: https://code.launchpad.net/~evarlast/charms/precise/mysql/encoding/+merge/226538

Note, MongoDB tests are still not passing and thus this merge needs additional review once charm tests are passing again.

-thanks,
Antonio

To post a comment you must log in.
Revision history for this message
Review Queue (review-queue) wrote :

This items has failed automated testing! Results available here http://reports.vapour.ws/charm-tests/charm-bundle-test-972-results

review: Needs Fixing (cbt)
Revision history for this message
Matt Bruzek (mbruzek) wrote :

Hello Antonio,

Thanks for submitting this merge proposal but I am not convinced that it will be any faster. I deployed mongodb and it deploys with this new install line. As a test I deployed the ubuntu charm twice (juju deploy ubuntu ubuntu1; juju deploy ubuntu ubuntu2) then sshed to each system.

On ubuntu1 I tested the new apt-get install option with --no-install-recommends. Here is the result.
$ sudo apt-get install mongodb-server mongodb-clients python-yaml --no-install-recommends
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-yaml is already the newest version.
The following packages were automatically installed and are no longer required:
  libfreetype6 os-prober
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libboost-filesystem1.54.0 libboost-program-options1.54.0
  libboost-system1.54.0 libboost-thread1.54.0 libgoogle-perftools4 libpcrecpp0
  libsnappy1 libtcmalloc-minimal4 libunwind8 libv8-3.14.5
The following NEW packages will be installed:
  libboost-filesystem1.54.0 libboost-program-options1.54.0
  libboost-system1.54.0 libboost-thread1.54.0 libgoogle-perftools4 libpcrecpp0
  libsnappy1 libtcmalloc-minimal4 libunwind8 libv8-3.14.5 mongodb-clients
  mongodb-server
0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.6 MB of archives.
After this operation, 114 MB of additional disk space will be used.
Do you want to continue? [Y/n]

On the second system, ubuntu2 I tested without the flag.
$ sudo apt-get install mongodb-server mongodb-clients python-yaml
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-yaml is already the newest version.
The following packages were automatically installed and are no longer required:
  libfreetype6 os-prober
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libboost-filesystem1.54.0 libboost-program-options1.54.0
  libboost-system1.54.0 libboost-thread1.54.0 libgoogle-perftools4 libpcrecpp0
  libsnappy1 libtcmalloc-minimal4 libunwind8 libv8-3.14.5
The following NEW packages will be installed:
  libboost-filesystem1.54.0 libboost-program-options1.54.0
  libboost-system1.54.0 libboost-thread1.54.0 libgoogle-perftools4 libpcrecpp0
  libsnappy1 libtcmalloc-minimal4 libunwind8 libv8-3.14.5 mongodb-clients
  mongodb-server
0 upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.6 MB of archives.
After this operation, 114 MB of additional disk space will be used.
Do you want to continue? [Y/n]

According to this test the same packages would get installed. What makes this change faster?

review: Needs Information

Unmerged revisions

54. By Antonio Rosales

Refactor Jay Wren's MP:230978 for a faster deploy time.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/hooks.py'
2--- hooks/hooks.py 2014-08-20 23:48:43 +0000
3+++ hooks/hooks.py 2014-09-11 01:40:06 +0000
4@@ -727,7 +727,8 @@
5 juju_log("Installing mongodb")
6 add_source(config('source'), config('key'))
7 apt_update(fatal=True)
8- apt_install(packages=['mongodb', 'python-yaml'], fatal=True)
9+ apt_install(packages=['mongodb-server', 'mongodb-clients', 'python-yaml'],
10+ options=['--no-install-recommends'], fatal=True)
11
12
13 @hooks.hook('config-changed')

Subscribers

People subscribed via source and target branches