← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~andreserl/maas/maas_preseeds_related into lp:maas

 

Andres Rodriguez has proposed merging lp:~andreserl/maas/maas_preseeds_related into lp:maas.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #956047 in MAAS: "maas-import-isos improvements"
  https://bugs.launchpad.net/maas/+bug/956047
  Bug #956510 in MAAS: "Use profile names of the form "profile-$arch-maas"."
  https://bugs.launchpad.net/maas/+bug/956510

For more details, see:
https://code.launchpad.net/~andreserl/maas/maas_preseeds_related/+merge/97908
-- 
https://code.launchpad.net/~andreserl/maas/maas_preseeds_related/+merge/97908
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~andreserl/maas/maas_preseeds_related into lp:maas.
=== added directory 'contrib/preseeds'
=== added file 'contrib/preseeds/maas-enlist.preseed'
--- contrib/preseeds/maas-enlist.preseed	1970-01-01 00:00:00 +0000
+++ contrib/preseeds/maas-enlist.preseed	2012-03-16 15:39:28 +0000
@@ -0,0 +1,3 @@
+d-i preseed/early_command string anna-install maas-enlist-udeb
+d-i maas-enlist/maas-server-address string @@server@@
+d-i maas-enlist/host-name string

=== added file 'contrib/preseeds/maas.preseed'
--- contrib/preseeds/maas.preseed	1970-01-01 00:00:00 +0000
+++ contrib/preseeds/maas.preseed	2012-03-16 15:39:28 +0000
@@ -0,0 +1,89 @@
+# MAAS - Ubuntu Server Installation
+# * Minimal install 
+# * Cloud-init for bare-metal
+# * maas_preseed snippet is expanded to provide cloud-init preseed data
+
+# Locale 
+d-i     debian-installer/locale string en_US.UTF-8
+
+# No splash
+d-i     debian-installer/splash boolean false
+
+# Keyboard layout
+d-i     console-setup/ask_detect        boolean false
+d-i     console-setup/layoutcode        string us
+d-i     console-setup/variantcode       string
+
+# Network configuration
+d-i     netcfg/get_nameservers  string
+d-i     netcfg/get_ipaddress    string
+d-i     netcfg/get_netmask      string 255.255.255.0
+d-i     netcfg/get_gateway      string
+d-i     netcfg/confirm_static   boolean true
+
+# Local clock (set to UTC and use ntp)
+d-i     clock-setup/utc boolean true
+d-i     clock-setup/ntp boolean true
+d-i     clock-setup/ntp-server  string ntp.ubuntu.com
+
+# Partitioning
+d-i     partman/early_command string debconf-set partman-auto/disk `list-devices disk | head -n1`
+d-i     partman-iscsi/mainmenu string finish
+d-i     partman-auto/method string regular
+d-i     partman-lvm/device_remove_lvm boolean true
+d-i     partman-lvm/confirm boolean true
+d-i     partman/confirm_write_new_label boolean true
+d-i     partman/choose_partition        select Finish partitioning and write changes to disk
+d-i     partman/confirm boolean true
+d-i     partman/confirm_nooverwrite boolean true
+d-i     partman/default_filesystem string ext4
+
+# Use server kernel
+d-i     base-installer/kernel/image     string linux-server
+
+# User Setup
+d-i	passwd/root-login	boolean false
+d-i	passwd/make-user	boolean true
+d-i	passwd/user-fullname	string ubuntu
+d-i	passwd/username	string ubuntu
+d-i	passwd/user-password-crypted password $6$.1eHH0iY$ArGzKX2YeQ3G6U.mlOO3A.NaL22Ewgz8Fi4qqz.Ns7EMKjEJRIW2Pm/TikDptZpuu7I92frytmk5YeL.9fRY4.
+d-i	passwd/user-uid	string 
+d-i	user-setup/allow-password-weak	boolean false
+d-i	user-setup/encrypt-home	boolean false
+d-i	passwd/user-default-groups	string adm cdrom dialout lpadmin plugdev sambashare
+
+# APT
+$SNIPPET('maas_proxy')
+
+# By default the installer requires that repositories be authenticated
+# using a known gpg key. This setting can be used to disable that
+# authentication. Warning: Insecure, not recommended.
+d-i debian-installer/allow_unauthenticated string false
+
+# Lang
+d-i     pkgsel/language-packs   multiselect en
+d-i     pkgsel/update-policy    select none
+d-i     pkgsel/updatedb boolean true
+
+# Boot-loader
+d-i     grub-installer/skip     boolean false
+d-i     lilo-installer/skip     boolean false
+d-i     grub-installer/only_debian      boolean true
+d-i     grub-installer/with_other_os    boolean true
+d-i     finish-install/keep-consoles    boolean false
+d-i     finish-install/reboot_in_progress       note
+
+# Eject cdrom
+d-i     cdrom-detect/eject      boolean true
+
+# Do not halt/poweroff after install
+d-i     debian-installer/exit/halt      boolean false
+d-i     debian-installer/exit/poweroff  boolean false
+
+# maas_preseed
+$SNIPPET('maas_preseed')
+
+# Post scripts. Executes late command and disables PXE
+d-i	preseed/late_command string true && \
+   	$SNIPPET('maas_disable_pxe') && \
+   	true

=== added directory 'contrib/snippets'
=== added file 'contrib/snippets/maas_disable_pxe'
--- contrib/snippets/maas_disable_pxe	1970-01-01 00:00:00 +0000
+++ contrib/snippets/maas_disable_pxe	2012-03-16 15:39:28 +0000
@@ -0,0 +1,1 @@
+wget "http://$http_server:$http_port/cblr/svc/op/nopxe/system/$system_name"; -O /dev/null \

=== added file 'contrib/snippets/maas_preseed'
--- contrib/snippets/maas_preseed	1970-01-01 00:00:00 +0000
+++ contrib/snippets/maas_preseed	2012-03-16 15:39:28 +0000
@@ -0,0 +1,3 @@
+#import base64
+#set $maas_preseed_data = base64.b64decode($getVar("MAAS_PRESEED",""))
+$maas_preseed_data

=== added file 'contrib/snippets/maas_proxy'
--- contrib/snippets/maas_proxy	1970-01-01 00:00:00 +0000
+++ contrib/snippets/maas_proxy	2012-03-16 15:39:28 +0000
@@ -0,0 +1,4 @@
+d-i     mirror/country string manual
+d-i     mirror/http/hostname string archive.ubuntu.com
+d-i     mirror/http/directory string /ubuntu
+d-i     mirror/http/proxy string http://@@server@@:8000/

=== modified file 'scripts/maas-import-isos'
--- scripts/maas-import-isos	2012-03-15 13:58:32 +0000
+++ scripts/maas-import-isos	2012-03-16 15:39:28 +0000
@@ -8,6 +8,7 @@
 #		Marc Cluet <marc.cluet@xxxxxxxxxxxxx>
 #		Dustin Kirkland <kirkland@xxxxxxxxxxxxx>
 #		Andres Rodriguez <andres.rodriguez@xxxxxxxxxxxxx>
+#		Scott Moser <scott.moser@xxxxxxxxxxxxx>
 #
 #    This program is free software: you can redistribute it and/or modify
 #    it under the terms of the GNU Affero General Public License as
@@ -34,11 +35,9 @@
 [ -n "$KSDIR" ] || KSDIR="/var/lib/cobbler/kickstarts"
 [ -n "$PRIORITY" ] || PRIORITY="critical"
 [ -n "$LOCALE" ] || LOCALE="en_US"
-[ -n "$MGMTCLASS_AVAILABLE" ] || MGMTCLASS_AVAILABLE="maas-juju-available"
-[ -n "$MGMTCLASS_ACQUIRED" ] || MGMTCLASS_ACQUIRED="maas-juju-acquired"
 [ -n "$INTERFACE" ] || INTERFACE="auto"
 [ -n "$KOPTS" ] || KOPTS="priority=$PRIORITY locale=$LOCALE netcfg/choose_interface=$INTERFACE"
-[ -n "$ENLIST_PROFILE" ] || ENLIST_PROFILE="ubuntu-enlist"
+[ -n "$ENLIST_PROFILE" ] || ENLIST_PROFILE="maas-enlist"
 if [ -n "$SERVER_IP" ]; then
 	KOPTS="$KOPTS log_host=$SERVER_IP log_port=514"
 else
@@ -80,30 +79,20 @@
 			if ! (cobbler distro list | grep -qs " $profile$"); then
 				# Import the iso
 				cobbler-ubuntu-import $profile
-				cobbler profile edit --name="$profile" --kopts="$KOPTS" --kickstart="$KSDIR/maas.preseed"
 			else
 				# check archive for an updated ISO, update our cache if necessary
 				cobbler-ubuntu-import -c $profile && cobbler-ubuntu-import -u $profile
-				# Make sure the profile is using the MAAS preseed
-				cobbler profile edit --name="$profile" --kickstart="$KSDIR/maas.preseed"
 
 			fi
 			# Skip if cobbler already has this distro/arch profile
-			if ! (cobbler profile list | grep -qs " $profile-juju$"); then
+			if ! (cobbler profile list | grep -qs " maas-$profile$"); then
 				# Add JuJu sub-profile based on the name of the imported ISO
-				cobbler profile add --name="$profile-juju" --parent="$profile" --kickstart="$KSDIR/juju.preseed"
+				cobbler profile add --name="maas-$profile" --parent="$profile" --kopts="$KOPTS" --kickstart="$KSDIR/maas.preseed"
 			fi
 		done
 	done
 }
 
-add_mgmt_classes(){
-	# Add Management Classes for JuJu
-	for m in $MGMTCLASS_AVAILABLE $MGMTCLASS_ACQUIRED; do
-		(cobbler mgmtclass list | grep -qs " $m$") || cobbler mgmtclass add --name="$m"
-	done
-}
-
 add_enlist_profile(){
         STABLE=$(distro-info --stable)
         DEVEL=$(distro-info --devel)
@@ -120,7 +109,7 @@
         if cobbler profile list | grep -qs " $ENLIST_PROFILE"; then
                 cobbler profile edit --name="$ENLIST_PROFILE" --parent="$PARENT_PROFILE"
         else
-                cobbler profile add --name="$ENLIST_PROFILE" --parent="$PARENT_PROFILE" --kickstart="$KSDIR/ubuntu-enlist.preseed"
+                cobbler profile add --name="$ENLIST_PROFILE" --parent="$PARENT_PROFILE" --kickstart="$KSDIR/maas-enlist.preseed"
         fi
 
         # Add 'default' system if doesn't exist.
@@ -187,9 +176,6 @@
 $do_import_isos && import_isos 
 $do_update_settings && update_settings 
 
-# Add management classes if new have being defined.
-add_mgmt_classes
-
 # Add enlist profile if doesn't exist
 add_enlist_profile
 


Follow ups