Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(32)

Issue 83370043: Added script to create and upload a stream

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 1 month ago by hduran
Modified:
10 years, 1 month ago
Reviewers:
mp+213749, dave, fwereade, curtis
Visibility:
Public.

Description

Added script to create and upload a stream The script create_stream.bash is an utility that creates and uploads a stream to a given server, using the current jujud build. This is useful when trying to reproduce production envs with a dev version, without using --upload-tools, which produces an env closer to reality https://code.launchpad.net/~hduran-8/juju-core/add_create_stream_script/+merge/213749 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 13

Patch Set 2 : Added script to create and upload a stream #

Patch Set 3 : Added script to create and upload a stream #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -0 lines) Patch
A [revision details] View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A scripts/create_stream.bash View 1 2 1 chunk +64 lines, -0 lines 6 comments Download

Messages

Total messages: 6
hduran
Please take a look.
10 years, 1 month ago (2014-04-02 00:35:14 UTC) #1
dave_cheney.net
https://codereview.appspot.com/83370043/diff/1/scripts/create_stream.bash File scripts/create_stream.bash (right): https://codereview.appspot.com/83370043/diff/1/scripts/create_stream.bash#newcode1 scripts/create_stream.bash:1: #!/bin/bash set -e https://codereview.appspot.com/83370043/diff/1/scripts/create_stream.bash#newcode2 scripts/create_stream.bash:2: BUILD_FOLDER=/tmp/build_juju should use mktemp ...
10 years, 1 month ago (2014-04-02 00:42:10 UTC) #2
hduran
Please take a look.
10 years, 1 month ago (2014-04-02 00:42:51 UTC) #3
hduran
Please take a look. https://codereview.appspot.com/83370043/diff/1/scripts/create_stream.bash File scripts/create_stream.bash (right): https://codereview.appspot.com/83370043/diff/1/scripts/create_stream.bash#newcode1 scripts/create_stream.bash:1: #!/bin/bash On 2014/04/02 00:42:10, dfc ...
10 years, 1 month ago (2014-04-02 01:53:12 UTC) #4
fwereade
So, --upload-tools surely sucks, and we shouldn't be using it... but I'm not entirely convinced ...
10 years, 1 month ago (2014-04-02 06:34:58 UTC) #5
curtis
10 years, 1 month ago (2014-04-03 00:57:13 UTC) #6
https://codereview.appspot.com/83370043/diff/40001/scripts/create_stream.bash
File scripts/create_stream.bash (right):

https://codereview.appspot.com/83370043/diff/40001/scripts/create_stream.bash...
scripts/create_stream.bash:14: : ${ARCH:="amd64"}
On 2014/04/02 06:34:58, fwereade wrote:
> This *has* to be the arch of the local machine, doesn't it? I see no
> cross-compilation...

Using local machine is better than hard-coding. Juju CI scavenges/repurposes the
jujud's built on the unit-test machines like the ppc64el. We exec commands over
ssh to get the characteristics of the build machine. I think we get most of what
we want by running "jujud version" which yields "1.17.7-trusty-amd64" on my
machine.

VERSION=$(jujud version | cut -d - -f1)
SERIES=$(jujud version | cut -d - -f2)
ARCH=$(jujud version | cut -d - -f3)


to get the version, series, and arch

https://codereview.appspot.com/83370043/diff/40001/scripts/create_stream.bash...
scripts/create_stream.bash:48: JUJU_HOME=~/.juju PATH=$GOPATH/bin:$PATH \
On 2014/04/02 06:34:58, fwereade wrote:
> why do we set a potentially-differing value for JUJU_HOME?

JUJU_HOME isn't doing anything in this case.

This is probably a transcription error from assemble-public-tools.bash. The
script is run on systems without a proper user, without .juju/, and sometimes
without an installed juju. In these cases, the script env is often sets
JUJU_HOME to cloud-city which has a vetted environments.yaml.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b