Merge lp:~dave-cheney/juju-core/046-cmd-builddb-quantal into lp:~juju/juju-core/trunk

Proposed by Dave Cheney
Status: Work in progress
Proposed branch: lp:~dave-cheney/juju-core/046-cmd-builddb-quantal
Merge into: lp:~juju/juju-core/trunk
Diff against target: 76 lines (+40/-1)
4 files modified
cmd/builddb/main.go (+2/-1)
cmd/builddb/quantal/builddb/hooks/install (+29/-0)
cmd/builddb/quantal/builddb/hooks/start (+5/-0)
cmd/builddb/quantal/builddb/metadata.yaml (+4/-0)
To merge this branch: bzr merge lp:~dave-cheney/juju-core/046-cmd-builddb-quantal
Reviewer Review Type Date Requested Status
The Go Language Gophers Pending
Review via email: mp+134238@code.launchpad.net

Description of the change

cmd/builddb: add support for quantal

Add support for building a quantal spec mongodb

https://codereview.appspot.com/6853048/

To post a comment you must log in.
719. By Dave Cheney

remove build number subrevision

Revision history for this message
Roger Peppe (rogpeppe) wrote :

On 2012/11/14 04:42:08, dfc wrote:
> Please take a look.

LGTM
seems a pity we have to duplicate the entire charm for a one word
change, but I guess that's where we are.

https://codereview.appspot.com/6853048/

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

On 2012/11/14 09:18:09, rog wrote:
> On 2012/11/14 04:42:08, dfc wrote:
> > Please take a look.

> LGTM
> seems a pity we have to duplicate the entire charm for a one word
change, but I
> guess that's where we are.

You have a good point. You don't have to say LGTM when you disagree.

Dave, can we use symlinks to a single charm, and make the build script
grab the release name from /etc/lsb-release?

https://codereview.appspot.com/6853048/

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

LGTM, but only if the duplication is avoided.

https://codereview.appspot.com/6853048/

Unmerged revisions

719. By Dave Cheney

remove build number subrevision

718. By Dave Cheney

gofmt

717. By Dave Cheney

add quantal

716. By William Reade

uniter_test: snappier waitUniterDead

waitUniterDead was on occasion waiting almost the full 5 seconds before the
uniter happened to notice it was ready to die. We now repeatedly sync state
while waiting, in order to ensure timely detection of state changes on the
uniter side. On this machine, this change speeds up the uniter suite by
roughly 20%.

R=
CC=
https://codereview.appspot.com/6815089

715. By Roger Peppe

environs/jujutest: further refinement

We change to use attributes rather than config.Config.
This enables us to have configuration values drawn from an environment
set up for the test, for instance from a faked-up home directory.

R=fwereade, TheMue
CC=
https://codereview.appspot.com/6851043

714. By Roger Peppe

environs/jujutest: simplify interface

The Environs/Name pair was a relic from when
we couldn't open an environment from its attributes
only. Using attributes makes it easier to
have values that are programmatically generated,
or bulky.

R=john.meinel, fwereade, TheMue
CC=
https://codereview.appspot.com/6849044

713. By Dave Cheney

contrib: add release-public-tools script

Initial cut of a script to turn a release deb into a
set of tools. This may be incorporated into the release
build process later.

R=TheMue, john.meinel
CC=
https://codereview.appspot.com/6818074

712. By Dave Cheney

all: gofmt

rev 57768598a495 of go fmt now trims trailing whitespace. This has no impact on people using 1.0.x or go tip prior to 57768598a495.

R=john.meinel, aram
CC=
https://codereview.appspot.com/6810065

711. By Gustavo Niemeyer

testing: improve a bit sample charm situation

Make dummy-v2 trivial and rename it to format.

Rename old/new from sample to upgrade, and name their
directories properly.

R=fwereade
CC=
https://codereview.appspot.com/6823050

710. By Gustavo Niemeyer

state: handle unassignments on MachineUnitsWatcher

R=fwereade, aram, <email address hidden>
CC=
https://codereview.appspot.com/6775076

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmd/builddb/main.go'
2--- cmd/builddb/main.go 2012-10-11 17:40:17 +0000
3+++ cmd/builddb/main.go 2012-11-14 04:43:20 +0000
4@@ -6,6 +6,7 @@
5 "launchpad.net/juju-core/juju"
6 "launchpad.net/juju-core/log"
7 "launchpad.net/juju-core/state"
8+ "launchpad.net/juju-core/version"
9 corelog "log"
10 "os"
11 "path/filepath"
12@@ -36,7 +37,7 @@
13 return err
14 }
15 repo := &charm.LocalRepository{filepath.Dir(os.Args[0])}
16- curl := charm.MustParseURL("local:precise/builddb")
17+ curl := charm.MustParseURL("local:" + version.Current.Series + "/builddb")
18 ch, err := conn.PutCharm(curl, repo, false)
19 if err != nil {
20 return err
21
22=== added directory 'cmd/builddb/quantal'
23=== added directory 'cmd/builddb/quantal/builddb'
24=== added directory 'cmd/builddb/quantal/builddb/hooks'
25=== added file 'cmd/builddb/quantal/builddb/hooks/install'
26--- cmd/builddb/quantal/builddb/hooks/install 1970-01-01 00:00:00 +0000
27+++ cmd/builddb/quantal/builddb/hooks/install 2012-11-14 04:43:20 +0000
28@@ -0,0 +1,29 @@
29+#!/bin/sh
30+
31+set -e
32+
33+VERSION=2.2.0
34+RELEASE=quantal
35+ARCH=amd64
36+
37+BASE=$PWD
38+
39+apt-get install -y git-core build-essential scons nginx libssl-dev
40+
41+# Grab the source code.
42+git clone https://github.com/mongodb/mongo.git
43+cd mongo
44+git checkout r$VERSION
45+
46+# Build it with SSL enabled and mostly statically.
47+mkdir $BASE/opt
48+scons install --64 --ssl --release --prefix=$BASE/opt/mongo
49+
50+# Pack it up.
51+cd $BASE/opt
52+tar cjvf mongo-$VERSION-$RELEASE-$ARCH.tgz mongo/bin
53+
54+# Publish it at nginx's root and enable autoindexing.
55+rm -rf /usr/share/nginx/www/*
56+cp mongo-*.tgz /usr/share/nginx/www
57+sed -i 's/index .*index.html.*/autoindex on;/' /etc/nginx/sites-available/default
58
59=== added file 'cmd/builddb/quantal/builddb/hooks/start'
60--- cmd/builddb/quantal/builddb/hooks/start 1970-01-01 00:00:00 +0000
61+++ cmd/builddb/quantal/builddb/hooks/start 2012-11-14 04:43:20 +0000
62@@ -0,0 +1,5 @@
63+#!/bin/sh
64+
65+/etc/init.d/nginx restart
66+
67+open-port 80
68
69=== added file 'cmd/builddb/quantal/builddb/metadata.yaml'
70--- cmd/builddb/quantal/builddb/metadata.yaml 1970-01-01 00:00:00 +0000
71+++ cmd/builddb/quantal/builddb/metadata.yaml 2012-11-14 04:43:20 +0000
72@@ -0,0 +1,4 @@
73+name: builddb
74+summary: Abusive charm that builds MongoDB from source
75+description: |
76+ Abusive charm that builds MongoDB from source.

Subscribers

People subscribed via source and target branches