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

Issue 32760043: Install missing packages for add-apt-repository.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by frankban
Modified:
10 years, 5 months ago
Reviewers:
bac, rharding, mp+196692
Visibility:
Public.

Description

Install missing packages for add-apt-repository. Also use absolute paths to commands executed with sudo privileges. Tests: `make check` QA: 1) Create a saucy LXC sharing your home directory, e.g. `sudo lxc-create -t ubuntu -n quickstart -f <MY-TEMPLATE> \ -- -r saucy -a amd64 -b $USER` where "quickstart" is the name of the container, "-r" is used to specify the release to use, "-b" binds the home directory of the specified user, and <MY-TEMPLATE> is a file with the following contents: lxc.network.type=veth lxc.network.link=lxcbr0 lxc.network.flags=up I assume you already have: - a juju home containing the environments.yaml file configured with an "ec2" ec2 environment; - your ssh keys properly set up; - run the tests with `make check` as described above. So at this point the container does not have juju installed, but the juju home and ssh keys are available, and so the branch with a configured testing virtualenv. We already have cards for environment creation and ssh keys handling. 2) Start the LXC instance (`sudo lxc-start -n quickstart`). 3) Open a console inside the LXC with `sudo lxc-console -n quickstart`, log in using your user credentials, and cd into the directory where you checked out this branch. 4) Run `.venv/bin/python juju-quickstart -e ec2 --no-browser`. You should be asked the sudo password in order to add the missing PPA and install juju-core and lxc. Note that installing the packages can take some minutes. The process will then proceed as usual. 5) Run `.venv/bin/python juju-quickstart -e ec2 --no-browser` again: this time no packages installation should be required, and quickstart just reuses the existing environment. 6) From the host, stop and destroy the LXC container: `sudo lxc-stop -n quickstart` and `sudo lxc-destroy -n quickstart`. 7) Destroy your ec2 environment. Thank you! https://code.launchpad.net/~frankban/juju-quickstart/sudo-fixes/+merge/196692 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Install missing packages for add-apt-repository. #

Total comments: 2

Patch Set 3 : Install missing packages for add-apt-repository. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+268 lines, -105 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M quickstart/__init__.py View 1 chunk +1 line, -1 line 0 comments Download
M quickstart/app.py View 1 4 chunks +21 lines, -24 lines 0 comments Download
M quickstart/tests/helpers.py View 1 chunk +4 lines, -0 lines 0 comments Download
M quickstart/tests/test_app.py View 1 15 chunks +111 lines, -78 lines 0 comments Download
M quickstart/tests/test_manage.py View 2 chunks +2 lines, -2 lines 0 comments Download
M quickstart/tests/test_utils.py View 2 chunks +90 lines, -0 lines 0 comments Download
M quickstart/utils.py View 2 chunks +37 lines, -0 lines 0 comments Download

Messages

Total messages: 6
frankban
Please take a look.
10 years, 5 months ago (2013-11-26 10:54:24 UTC) #1
frankban
Please take a look.
10 years, 5 months ago (2013-11-26 14:09:13 UTC) #2
bac
Code LGTM. QA had one problem, which you've already fixed. QA on patch was successful.
10 years, 5 months ago (2013-11-26 14:26:24 UTC) #3
rharding
LGTM with a question and suggestion. https://codereview.appspot.com/32760043/diff/20001/quickstart/app.py File quickstart/app.py (right): https://codereview.appspot.com/32760043/diff/20001/quickstart/app.py#newcode63 quickstart/app.py:63: # The lxc ...
10 years, 5 months ago (2013-11-26 14:36:25 UTC) #4
frankban
On 2013/11/26 14:36:25, rharding wrote: > LGTM with a question and suggestion. > > https://codereview.appspot.com/32760043/diff/20001/quickstart/app.py ...
10 years, 5 months ago (2013-11-26 15:10:15 UTC) #5
frankban
10 years, 5 months ago (2013-11-26 15:12:44 UTC) #6
*** Submitted:

Install missing packages for add-apt-repository.

Also use absolute paths to commands executed
with sudo privileges.

Tests: `make check`

QA:

1)  Create a saucy LXC sharing your home directory,
    e.g. `sudo lxc-create -t ubuntu -n quickstart -f <MY-TEMPLATE> \ 
          -- -r saucy -a amd64 -b $USER` 
    where "quickstart" is the name of the container,
    "-r" is used to specify the release to use,
    "-b" binds the home directory of the specified user,
    and <MY-TEMPLATE> is a file with the following contents:
        lxc.network.type=veth
        lxc.network.link=lxcbr0
        lxc.network.flags=up
    I assume you already have:
      - a juju home containing the environments.yaml file 
        configured with an "ec2" ec2 environment;
      - your ssh keys properly set up;
      - run the tests with `make check` as described above.
    So at this point the container does not have juju
    installed, but the juju home and ssh keys are
    available, and so the branch with a configured testing
    virtualenv. We already have cards for environment
    creation and ssh keys handling.
2)  Start the LXC instance (`sudo lxc-start -n quickstart`).
3)  Open a console inside the LXC with
    `sudo lxc-console -n quickstart`, log in using your user
    credentials, and cd into the directory where you checked 
    out this branch.
4)  Run `.venv/bin/python juju-quickstart -e ec2 --no-browser`.
    You should be asked the sudo password in order to add
    the missing PPA and install juju-core and lxc.
    Note that installing the packages can take some minutes.
    The process will then proceed as usual.
5)  Run `.venv/bin/python juju-quickstart -e ec2 --no-browser`
    again: this time no packages installation should be required,
    and quickstart just reuses the existing environment.
6)  From the host, stop and destroy the LXC container:
    `sudo lxc-stop -n quickstart` and `sudo lxc-destroy -n quickstart`.
7)  Destroy your ec2 environment.

Thank you!

R=bac, rharding
CC=
https://codereview.appspot.com/32760043
Sign in to reply to this message.

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