Jcrespo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344108 )

Change subject: install_server: Create db-no-srv-format install recipe
......................................................................

install_server: Create db-no-srv-format install recipe

This recipe allow the reinstall of a server without wiping /srv.
It will be the default recipe for databases unles manually changed
temporarelly to db.cfg (wipe all servers and start from 0).

Change-Id: Ida63e41784df53f9fec0527670eb50286e0930a5
---
M modules/install_server/files/autoinstall/netboot.cfg
A modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg
2 files changed, 54 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/08/344108/1

diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index 94c855a..5c28959 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -64,7 +64,8 @@
         conf200[123]) echo partman/raid1-lvm-ext4-srv.cfg ;; \
         cp1008|cp104[34]|cp300[3-9]|cp301[0-8]) echo 
partman/varnish-oldssd.cfg ;; \
         cp[1234][0-9][0-9][0-9]) echo partman/varnish.cfg ;; \
-        
db[0-8][0-9]|db10[0-8][0-9]|db109[0-5]|db20[0-2][0-9]|db2030|db203[3-9]|db20[4-7][0-9]|dbstore[1-2]00[1-9]|es[1-2]01[1-9])
 echo partman/db.cfg ;; \
+        es2015) echo partman/db.cfg ;; \
+        
db[0-8][0-9]|db10[0-8][0-9]|db109[0-5]|db20[0-2][0-9]|db2030|db203[3-9]|db20[4-7][0-9]|dbstore[1-2]00[1-9]|es[1-2]01[1-9])
 echo partman/db-no-srv-format.cfg ;; \
         d-i-test) echo partman/flat.cfg virtual.cfg ;; \
         druid100[123]) echo partman/druid-4ssd-raid10.cfg ;; \
         eeden|maerlant|multatuli|nescio) echo partman/raid1-1partition.cfg ;; \
diff --git 
a/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg 
b/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg
new file mode 100644
index 0000000..d360f1b
--- /dev/null
+++ b/modules/install_server/files/autoinstall/partman/db-no-srv-format.cfg
@@ -0,0 +1,52 @@
+# configuration to create:
+#  * no RAID (either single disk or hardware raid presenting a single device)
+#  * 40G /
+#  * 8G swap
+#  * the rest formatted with LVM with 90% used
+#  ** the rest as xfs on /srv
+#  ** 10% empty space for later growth
+
+
+d-i    partman-auto/method     string  lvm
+d-i    partman-auto/disk       string  /dev/sda
+
+# the install makes sure we want to wipe the lvm
+d-i    partman-lvm/device_remove_lvm   boolean true
+d-i    partman-lvm/confirm     boolean true
+d-i    partman-lvm/confirm_nooverwrite boolean true
+d-i    partman/confirm boolean true
+
+# standardize vg name for snapshots (otherwise uses hostname)
+d-i    partman-auto-lvm/new_vg_name string tank
+
+d-i    partman-auto/expert_recipe      string  es ::   \
+               40000 40000 40000 ext3          \
+                       $primary{ }             \
+                       $bootable{ }            \
+                       method{ format }        \
+                       format{ }               \
+                       use_filesystem{ }       \
+                       filesystem{ ext3 }      \
+                       mountpoint{ / }         \
+               .                               \
+               8000 8000 8000 linux-swap       \
+                       method{ swap }          \
+                       format{ }               \
+               .                               \
+               64 1000 10000000 xfs            \
+                       lv_name{ data }         \
+                       $defaultignore{ }       \
+                       $lvmok{ }               \
+                       mountpoint{ /srv }      \
+                       options/nobarrier { nobarrier } \
+                       options/noatime { noatime } \
+               .
+
+d-i    partman-auto-lvm/guided_size    string  87%
+
+d-i    partman/choose_partition        \
+               select  finish
+d-i    partman-partitioning/confirm_write_new_label    boolean true
+
+d-i    partman-auto/choose_recipe      es
+d-i    partman/confirm_nooverwrite     boolean true

-- 
To view, visit https://gerrit.wikimedia.org/r/344108
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida63e41784df53f9fec0527670eb50286e0930a5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jcrespo <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to