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
=== modified file 'HACKING.txt'
--- HACKING.txt 2012-04-27 12:53:57 +0000
+++ HACKING.txt 2012-05-02 09:31:19 +0000
@@ -157,9 +157,14 @@
157Now run ``maas-import-isos`` to download Ubuntu precise and create the157Now run ``maas-import-isos`` to download Ubuntu precise and create the
158necessary MAAS profiles::158necessary MAAS profiles::
159159
160 $ sudo ./scripts/maas-import-isos160 $ sudo http_proxy=$http_proxy ./scripts/maas-import-isos
161161
162Add yourself as a user in Cobbler. For convenience, give yourself the162The http_proxy variable is only needed if you're downloading through a
163proxy; "sudo" wouldn't pass it on to the script without the assignment.
164Or if you don't have it set but do want to download through a proxy, pass
165your proxy's URL: "http_proxy=http://proxy.example.com/"
166
167Now add yourself as a user in Cobbler. For convenience, give yourself the
163password ``test``::168password ``test``::
164169
165 $ sudo htdigest /etc/cobbler/users.digest Cobbler $USER170 $ sudo htdigest /etc/cobbler/users.digest Cobbler $USER
166171
=== modified file 'INSTALL.txt'
--- INSTALL.txt 2012-04-11 12:50:17 +0000
+++ INSTALL.txt 2012-05-02 09:31:19 +0000
@@ -87,11 +87,17 @@
87Import the Ubuntu images87Import the Ubuntu images
88========================88========================
8989
90MAAS will check for and download new Ubuntu images once a90MAAS will check for and download new Ubuntu images once a week.
91week. However, you'll need to download them manually the first time::91However, you'll need to download them manually the first time::
9292
93 $ sudo maas-import-isos93 $ sudo maas-import-isos
9494
95If you are using an HTTP proxy, bear in mind that the "sudo" will not
96pass your http_proxy environment variable on to the script. If that is
97a problem, pass it on explicitly::
98
99 $ sudo http_proxy=$http_proxy maas-import-isos
100
95101
96Next steps102Next steps
97==========103==========