You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/05/10 23:01:02 UTC

[07/11] git commit: [#3854] Install non-default version of mongo during vm build

[#3854] Install non-default version of mongo during vm build

Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/48604f10
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/48604f10
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/48604f10

Branch: refs/heads/master
Commit: 48604f106cccf064b885a145806f6ded518b4b5e
Parents: ac0b252
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Mon Apr 29 22:32:01 2013 -0400
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Fri May 10 20:34:00 2013 +0000

----------------------------------------------------------------------
 vagrant/allura_setup.sh                       |   18 ++++++++++++++++++
 vagrant/manifests/ubuntu-1204-server-amd64.pp |    1 -
 2 files changed, 18 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/48604f10/vagrant/allura_setup.sh
----------------------------------------------------------------------
diff --git a/vagrant/allura_setup.sh b/vagrant/allura_setup.sh
index d744829..e382fac 100755
--- a/vagrant/allura_setup.sh
+++ b/vagrant/allura_setup.sh
@@ -17,6 +17,24 @@
 #       specific language governing permissions and limitations
 #       under the License.
 
+# Install mongodb
+MONGODB_VERSION=2.2.3
+MONGODB_PKG_URL="deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen"
+MONGODB_SRC_LST=/etc/apt/sources.list.d/10gen.list
+if [ $(mongo --version 2>/dev/null | sed 's/.*: //') != $MONGODB_VERSION ]
+then
+  echo "Installing Mongodb $MONGODB_VERSION..."
+  sudo apt-get -y -q purge mongodb mongodb-clients mongodb-server mongodb-dev
+  sudo apt-get -y -q purge mongodb-10gen
+  sudo apt-get -y -q autoremove
+  rm -rf /var/lib/mongodb/* 2>/dev/null
+  apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
+  grep -q "$MONGODB_PKG_URL" $MONGODB_SRC_LST || echo "$MONGODB_PKG_URL" >> $MONGODB_SRC_LST
+  apt-get -y -q update
+  apt-get -y -q install mongodb-10gen=$MONGODB_VERSION
+  echo "mongodb-10gen hold" | dpkg --set-selections
+fi
+
 # Install Solr
 cd /home/vagrant/src
 if [ ! -d solr-4.2.1 ]

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/48604f10/vagrant/manifests/ubuntu-1204-server-amd64.pp
----------------------------------------------------------------------
diff --git a/vagrant/manifests/ubuntu-1204-server-amd64.pp b/vagrant/manifests/ubuntu-1204-server-amd64.pp
index 4031084..e90d374 100644
--- a/vagrant/manifests/ubuntu-1204-server-amd64.pp
+++ b/vagrant/manifests/ubuntu-1204-server-amd64.pp
@@ -38,7 +38,6 @@ $packages = [
  "libsasl2-dev",
  "libjpeg8-dev",
  "zlib1g-dev",
- "mongodb-server",
  "python-pip",
  "libfreetype6-dev",
  "libpng-dev"