← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/easier-remote-access into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/easier-remote-access into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/easier-remote-access/+merge/104684

This branch makes it a bit less painful to set up remote access to a Launchpad instance (most commonly from a VM host to a guest). The old instructions are https://dev.launchpad.net/Running/RemoteAccess, the new method is `make LISTEN_ADDRESS=* install`.

Note that I've merged bazaar.launchpad.dev onto the main launchpad.dev IP address. It was previously on a separate IP so it could have a separate HTTPS vhost, but with SNI widely supported by all browsers except IE on Windows XP it's no longer useful.

I also trimmed three hostnames that have been obsolete for more than two years.
-- 
https://code.launchpad.net/~wgrant/launchpad/easier-remote-access/+merge/104684
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/easier-remote-access into lp:launchpad.
=== modified file 'Makefile'
--- Makefile	2012-03-27 17:40:11 +0000
+++ Makefile	2012-05-04 06:08:28 +0000
@@ -17,6 +17,8 @@
 
 LPCONFIG?=development
 
+LISTEN_ADDRESS?=127.0.0.88
+
 ICING=lib/canonical/launchpad/icing
 LP_BUILT_JS_ROOT=${ICING}/build
 
@@ -464,6 +466,7 @@
 	# We insert the absolute path to the branch-rewrite script
 	# into the Apache config as we copy the file into position.
 	sed -e 's,%BRANCH_REWRITE%,$(shell pwd)/scripts/branch-rewrite.py,' \
+		-e 's,%LISTEN_ADDRESS%,$(LISTEN_ADDRESS),' \
 		configs/development/local-launchpad-apache > \
 		/etc/apache2/sites-available/local-launchpad
 	touch /var/tmp/bazaar.launchpad.dev/rewrite.log

=== modified file 'configs/development/local-launchpad-apache'
--- configs/development/local-launchpad-apache	2012-01-18 01:03:20 +0000
+++ configs/development/local-launchpad-apache	2012-05-04 06:08:28 +0000
@@ -1,10 +1,11 @@
-NameVirtualHost 127.0.0.88:80
+NameVirtualHost %LISTEN_ADDRESS%:80
+NameVirtualHost %LISTEN_ADDRESS%:443
 
 RewriteLock /var/tmp/rewrite-lock
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost %LISTEN_ADDRESS%:80>
   ServerName xmlrpc-private.launchpad.dev
-  ServerName xmlrpc.launchpad.dev
+  ServerAlias xmlrpc.launchpad.dev
   <Proxy *>
     Order deny,allow
     Allow from 127.0.0.0/255.0.0.0
@@ -14,7 +15,7 @@
   ProxyPass / http://localhost:8087/ retry=1
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost %LISTEN_ADDRESS%:80>
   ServerName lists.launchpad.dev
   Alias  /   /var/tmp/mailman/mhonarc/
   <Directory /var/tmp/mailman/mhonarc>
@@ -23,7 +24,7 @@
   </Directory>
 </VirtualHost>
 
-<VirtualHost 127.0.0.99:80>
+<VirtualHost %LISTEN_ADDRESS%:80>
   ServerName bazaar.launchpad.dev
   LogLevel debug
 
@@ -54,7 +55,7 @@
   </Location>
 </VirtualHost>
 
-<VirtualHost 127.0.0.99:443>
+<VirtualHost %LISTEN_ADDRESS%:443>
   ServerName bazaar.launchpad.dev
   LogLevel debug
 
@@ -82,7 +83,7 @@
   </Location>
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost %LISTEN_ADDRESS%:80>
   ServerName bazaar-internal.launchpad.dev
   LogLevel debug
 
@@ -97,7 +98,7 @@
   </Directory>
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost %LISTEN_ADDRESS%:80>
   ServerName ppa.launchpad.dev
   ServerAlias private-ppa.launchpad.dev
   LogLevel debug
@@ -112,7 +113,7 @@
   </Directory>
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost %LISTEN_ADDRESS%:80>
   ServerName archive.launchpad.dev
   LogLevel debug
 
@@ -125,7 +126,7 @@
   </Directory>
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:443>
+<VirtualHost %LISTEN_ADDRESS%:443>
   ServerName launchpad.dev
   ServerAlias *.launchpad.dev
   <Proxy *>
@@ -158,7 +159,7 @@
 
 </VirtualHost>
 
-<VirtualHost 127.0.0.88:80>
+<VirtualHost %LISTEN_ADDRESS%:80>
   ServerName launchpad.dev
   ServerAlias *.launchpad.dev
   RewriteEngine On

=== modified file 'utilities/rocketfuel-setup'
--- utilities/rocketfuel-setup	2012-02-02 06:01:27 +0000
+++ utilities/rocketfuel-setup	2012-05-04 06:08:28 +0000
@@ -52,17 +52,14 @@
     answers.launchpad.dev
     archive.launchpad.dev
     api.launchpad.dev
+    bazaar.launchpad.dev
     bazaar-internal.launchpad.dev
-    beta.launchpad.dev
     blueprints.launchpad.dev
     bugs.launchpad.dev
     code.launchpad.dev
     feeds.launchpad.dev
-    id.launchpad.dev
     keyserver.launchpad.dev
     lists.launchpad.dev
-    openid.launchpad.dev
-    ubuntu-openid.launchpad.dev
     ppa.launchpad.dev
     private-ppa.launchpad.dev
     testopenid.dev
@@ -76,14 +73,6 @@
   dev_host;
 done
 
-grep -q "^127.0.0.99" /etc/hosts
-if [ $? -ne 0 ]; then
-  echo "
-127.0.0.99      bazaar.launchpad.dev
-" | sudo tee -a /etc/hosts > /dev/null
-  echo "bazaar.launchpad.dev added to /etc/hosts"
-fi
-
 # Enable relevant Ubuntu package repositories
 grep -q "^deb http:.* ${DISTRIB_CODENAME} .*universe" /etc/apt/sources.list
 if [ $? -ne 0 ]; then

=== modified file 'utilities/setuplxc.py'
--- utilities/setuplxc.py	2012-04-26 19:33:45 +0000
+++ utilities/setuplxc.py	2012-05-04 06:08:28 +0000
@@ -81,14 +81,12 @@
 LXC_HOSTS_CONTENT = (
     ('127.0.0.88',
         'launchpad.dev answers.launchpad.dev archive.launchpad.dev '
-        'api.launchpad.dev bazaar-internal.launchpad.dev beta.launchpad.dev '
+        'api.launchpad.dev bazaar.launchpad.dev bazaar-internal.launchpad.dev'
         'blueprints.launchpad.dev bugs.launchpad.dev code.launchpad.dev '
-        'feeds.launchpad.dev id.launchpad.dev keyserver.launchpad.dev '
-        'lists.launchpad.dev openid.launchpad.dev '
-        'ubuntu-openid.launchpad.dev ppa.launchpad.dev '
-        'private-ppa.launchpad.dev testopenid.dev translations.launchpad.dev '
-        'xmlrpc-private.launchpad.dev xmlrpc.launchpad.dev'),
-    ('127.0.0.99', 'bazaar.launchpad.dev'),
+        'feeds.launchpad.dev keyserver.launchpad.dev lists.launchpad.dev '
+        'ppa.launchpad.dev private-ppa.launchpad.dev testopenid.dev '
+        'translations.launchpad.dev xmlrpc-private.launchpad.dev '
+        'xmlrpc.launchpad.dev'),
     )
 LXC_NAME = 'lptests'
 LXC_OPTIONS = """


Follow ups