Merge lp:~jtv/maas/bug-991553 into lp:~maas-committers/maas/trunk

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: no longer in the source branch.
Merged at revision: 541
Proposed branch: lp:~jtv/maas/bug-991553
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 45 lines (+16/-5)
2 files modified
HACKING.txt (+8/-3)
INSTALL.txt (+8/-2)
To merge this branch: bzr merge lp:~jtv/maas/bug-991553
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve
Review via email: mp+104328@code.launchpad.net

Commit message

Documentation patch: run maas-import-isos with your current http_proxy setting.

Description of the change

As requested by Julian after contribution from Scott. This updates our documentation for the benefit of people who want to run maas-import-isos from behind an http proxy. Running the script in “sudo” gives it an environment without variables such as http_proxy that you might have set in your shell.

Other ways of doing this would include “sudo su” or “sudo -i” (both of which would create a root login environment, including any http_proxy setting from /etc/profile). But what if you run the script on a server that's not normally supposed to talk http to the outside world? The http_proxy setting might be local to your current shell, or might not normally be set for root. Either way, I think this spelling makes the issue explicit. Even if you simply forgot to set http_proxy, this will remind you to set it.

Jeroen

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) wrote :

8 - $ sudo ./scripts/maas-import-isos
9 + $ sudo http_proxy=$http_proxy ./scripts/maas-import-isos

You could do with the same explanation of the proxy here as in INSTALL.txt, otherwise looks great, thanks!

review: Approve
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Added the explanation to HACKING.txt, though as an after-the-fact note so as not to break the flow of instructions (which should generally work anyway).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'HACKING.txt'
2--- HACKING.txt 2012-04-27 12:53:57 +0000
3+++ HACKING.txt 2012-05-02 09:31:19 +0000
4@@ -157,9 +157,14 @@
5 Now run ``maas-import-isos`` to download Ubuntu precise and create the
6 necessary MAAS profiles::
7
8- $ sudo ./scripts/maas-import-isos
9-
10-Add yourself as a user in Cobbler. For convenience, give yourself the
11+ $ sudo http_proxy=$http_proxy ./scripts/maas-import-isos
12+
13+The http_proxy variable is only needed if you're downloading through a
14+proxy; "sudo" wouldn't pass it on to the script without the assignment.
15+Or if you don't have it set but do want to download through a proxy, pass
16+your proxy's URL: "http_proxy=http://proxy.example.com/"
17+
18+Now add yourself as a user in Cobbler. For convenience, give yourself the
19 password ``test``::
20
21 $ sudo htdigest /etc/cobbler/users.digest Cobbler $USER
22
23=== modified file 'INSTALL.txt'
24--- INSTALL.txt 2012-04-11 12:50:17 +0000
25+++ INSTALL.txt 2012-05-02 09:31:19 +0000
26@@ -87,11 +87,17 @@
27 Import the Ubuntu images
28 ========================
29
30-MAAS will check for and download new Ubuntu images once a
31-week. However, you'll need to download them manually the first time::
32+MAAS will check for and download new Ubuntu images once a week.
33+However, you'll need to download them manually the first time::
34
35 $ sudo maas-import-isos
36
37+If you are using an HTTP proxy, bear in mind that the "sudo" will not
38+pass your http_proxy environment variable on to the script. If that is
39+a problem, pass it on explicitly::
40+
41+ $ sudo http_proxy=$http_proxy maas-import-isos
42+
43
44 Next steps
45 ==========