summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-sysadm/attachments/20110820
diff options
context:
space:
mode:
Diffstat (limited to 'zarb-ml/mageia-sysadm/attachments/20110820')
-rw-r--r--zarb-ml/mageia-sysadm/attachments/20110820/9829e7be/attachment-0001.bin173
-rw-r--r--zarb-ml/mageia-sysadm/attachments/20110820/9829e7be/attachment.bin173
2 files changed, 346 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/attachments/20110820/9829e7be/attachment-0001.bin b/zarb-ml/mageia-sysadm/attachments/20110820/9829e7be/attachment-0001.bin
new file mode 100644
index 000000000..5c44dc090
--- /dev/null
+++ b/zarb-ml/mageia-sysadm/attachments/20110820/9829e7be/attachment-0001.bin
@@ -0,0 +1,173 @@
+#!/bin/bash
+
+# adapted from http://kashyapc.wordpress.com/2011/08/18/unattended-guest-install-with-a-local-kickstart/
+set -x
+ARCH="i586"
+VERSION="2010.1"
+SERVER="distrib-coffee.ipsl.jussieu.fr"
+
+
+
+DIRECTORY="/pub/linux/MandrivaLinux/official/$VERSION/$ARCH"
+TREE="http://$SERVER$DIRECTORY"
+
+TMP_DIR=$(mktemp -d /tmp/auto_inst_vm_XXXXX)
+
+# based on http://www.zarb.org/~guillomovitch/installation_automatique.html
+cat > $TMP_DIR/auto_inst.cfg.pl <<EOF
+#!/usr/bin/perl -cw
+#
+# You should check the syntax of this file before using it in an auto-install.
+# You can do this with 'perl -cw auto_inst.cfg.pl' or by executing this file
+# (note the '#!/usr/bin/perl -cw' on the first line).
+\$o = {
+ 'timezone' => {
+ 'ntp' => undef,
+ 'timezone' => 'Europe/Paris',
+ 'UTC' => 1
+ },
+ 'default_packages' => [
+ 'urpmi',
+ 'basesystem',
+ 'puppet',
+ 'openssh-server',
+ 'man-pages',
+ 'info',
+ 'locales-fr',
+ 'curl',
+ 'dhcp-client',
+ 'iputils',
+ ],
+
+ 'no_suggests' => 1,
+ 'users' => [
+ {
+ 'icon' => 'default',
+ 'realname' => 'Michael Scherer',
+ 'uid' => undef,
+ 'groups' => [],
+ 'name' => 'misc',
+ 'shell' => '/bin/bash',
+ 'gid' => undef
+ }
+ ],
+ 'locale' => {
+ 'country' => 'FR',
+ 'lang' => 'fr',
+ 'langs' => {
+ 'fr' => 1
+ },
+ 'utf8' => 1
+ },
+ 'net' => {
+ 'resolv' => {
+ 'DOMAINNAME' => 'nameserver',
+ 'dnsServer' => '192.168.122.1',
+ 'DOMAINNAME2' => '192.168.122.1',
+ 'dnsServer2' => undef,
+ 'DOMAINNAME3' => undef,
+ 'dnsServer3' => undef
+ },
+ 'network' => {
+ 'NETWORKING' => 'yes',
+ 'GATEWAY' => '192.168.122.1',
+ 'FORWARD_IPV4' => 'false'
+ },
+ 'ethernet' => {},
+ 'ifcfg' => {
+ 'eth0' => {
+ 'BROADCAST' => '',
+ 'isUp' => 1,
+ 'BOOTPROTO' => 'dhcp',
+ 'isPtp' => '',
+ 'NETWORK' => '',
+ 'HWADDR' => undef,
+ 'DEVICE' => 'eth0',
+ 'METRIC' => 10
+ }
+ },
+ 'net_interface' => 'eth0',
+ 'type' => 'ethernet',
+ 'PROFILE' => 'default'
+ },
+ 'authentication' => {
+ 'shadow' => 1,
+ 'blowfish' => 1
+ },
+ 'partitions' => [
+ {
+ 'fs_type' => 'ext4',
+ 'mntpoint' => '/',
+ 'size' => 7700000
+ },
+ {
+ 'fs_type' => 'swap',
+ 'mntpoint' => 'swap',
+ 'size' => 256000
+ },
+ ],
+ 'partitioning' => {
+ 'auto_allocate' => 1,
+ 'clearall' => 1,
+ 'eraseBadPartitions' => 1
+ },
+ 'superuser' => {
+ 'password' => 'aaaa',
+ 'realname' => 'root',
+ 'uid' => '0',
+ 'shell' => '/bin/bash',
+ 'home' => '/root',
+ 'gid' => '0'
+ },
+ 'security' => 1,
+ 'interactiveSteps' => [
+# 'doPartitionDisks',
+# 'formatPartitions'
+ ],
+ 'autoExitInstall' => 1,
+ 'keyboard' => {
+ 'GRP_TOGGLE' => '',
+ 'KEYBOARD' => 'fr'
+ },
+ 'postInstall' => '
+# TODO improve :
+# - automated puppet deployment
+perl -pi -e "s/^PermitRootLogin.*/PermitRootLogin yes/" /etc/ssh/sshd_config
+chkconfig --add sshd
+
+ ',
+ 'rpmsrate_flags_chosen' => {
+ },
+
+ 'compssListLevel' => 5,
+ # to not pull mandi and shorewall
+ 'security' => 0,
+ 'firewall_ports' => undef,
+ 'keep_unrequested_dependencies' => 0,
+ };
+EOF
+
+# --os-type and --os-variant are likely needed to find the
+# proper layout on the mirror, do not modify it
+# also, the documentation about auto installation is wrong on mandriva wiki,
+# net is different from netw
+
+# use --no-graphics for fully autmated installation, or see the option about
+# console
+virt-install --connect=qemu:///system \
+ --network=network=default \
+ --initrd-inject=$TMP_DIR/auto_inst.cfg.pl \
+ --extra-args="text kickstart=/auto_inst.cfg.pl automatic=met:http,network:dhcp,ser:$server,dir:$directory" \
+ --name=mdv_base \
+ --disk /var/lib/libvirt/images/mdv_base.img,size=8 \
+ --ram 1024 \
+ --vcpus=1 \
+ --check-cpu \
+ --location=$tree/ \
+ --hvm \
+ --accelerate \
+ --os-type=linux \
+ --os-variant=mandriva2010 \
+
+# TODO use trap
+rm -Rf $TMP_DIR
diff --git a/zarb-ml/mageia-sysadm/attachments/20110820/9829e7be/attachment.bin b/zarb-ml/mageia-sysadm/attachments/20110820/9829e7be/attachment.bin
new file mode 100644
index 000000000..5c44dc090
--- /dev/null
+++ b/zarb-ml/mageia-sysadm/attachments/20110820/9829e7be/attachment.bin
@@ -0,0 +1,173 @@
+#!/bin/bash
+
+# adapted from http://kashyapc.wordpress.com/2011/08/18/unattended-guest-install-with-a-local-kickstart/
+set -x
+ARCH="i586"
+VERSION="2010.1"
+SERVER="distrib-coffee.ipsl.jussieu.fr"
+
+
+
+DIRECTORY="/pub/linux/MandrivaLinux/official/$VERSION/$ARCH"
+TREE="http://$SERVER$DIRECTORY"
+
+TMP_DIR=$(mktemp -d /tmp/auto_inst_vm_XXXXX)
+
+# based on http://www.zarb.org/~guillomovitch/installation_automatique.html
+cat > $TMP_DIR/auto_inst.cfg.pl <<EOF
+#!/usr/bin/perl -cw
+#
+# You should check the syntax of this file before using it in an auto-install.
+# You can do this with 'perl -cw auto_inst.cfg.pl' or by executing this file
+# (note the '#!/usr/bin/perl -cw' on the first line).
+\$o = {
+ 'timezone' => {
+ 'ntp' => undef,
+ 'timezone' => 'Europe/Paris',
+ 'UTC' => 1
+ },
+ 'default_packages' => [
+ 'urpmi',
+ 'basesystem',
+ 'puppet',
+ 'openssh-server',
+ 'man-pages',
+ 'info',
+ 'locales-fr',
+ 'curl',
+ 'dhcp-client',
+ 'iputils',
+ ],
+
+ 'no_suggests' => 1,
+ 'users' => [
+ {
+ 'icon' => 'default',
+ 'realname' => 'Michael Scherer',
+ 'uid' => undef,
+ 'groups' => [],
+ 'name' => 'misc',
+ 'shell' => '/bin/bash',
+ 'gid' => undef
+ }
+ ],
+ 'locale' => {
+ 'country' => 'FR',
+ 'lang' => 'fr',
+ 'langs' => {
+ 'fr' => 1
+ },
+ 'utf8' => 1
+ },
+ 'net' => {
+ 'resolv' => {
+ 'DOMAINNAME' => 'nameserver',
+ 'dnsServer' => '192.168.122.1',
+ 'DOMAINNAME2' => '192.168.122.1',
+ 'dnsServer2' => undef,
+ 'DOMAINNAME3' => undef,
+ 'dnsServer3' => undef
+ },
+ 'network' => {
+ 'NETWORKING' => 'yes',
+ 'GATEWAY' => '192.168.122.1',
+ 'FORWARD_IPV4' => 'false'
+ },
+ 'ethernet' => {},
+ 'ifcfg' => {
+ 'eth0' => {
+ 'BROADCAST' => '',
+ 'isUp' => 1,
+ 'BOOTPROTO' => 'dhcp',
+ 'isPtp' => '',
+ 'NETWORK' => '',
+ 'HWADDR' => undef,
+ 'DEVICE' => 'eth0',
+ 'METRIC' => 10
+ }
+ },
+ 'net_interface' => 'eth0',
+ 'type' => 'ethernet',
+ 'PROFILE' => 'default'
+ },
+ 'authentication' => {
+ 'shadow' => 1,
+ 'blowfish' => 1
+ },
+ 'partitions' => [
+ {
+ 'fs_type' => 'ext4',
+ 'mntpoint' => '/',
+ 'size' => 7700000
+ },
+ {
+ 'fs_type' => 'swap',
+ 'mntpoint' => 'swap',
+ 'size' => 256000
+ },
+ ],
+ 'partitioning' => {
+ 'auto_allocate' => 1,
+ 'clearall' => 1,
+ 'eraseBadPartitions' => 1
+ },
+ 'superuser' => {
+ 'password' => 'aaaa',
+ 'realname' => 'root',
+ 'uid' => '0',
+ 'shell' => '/bin/bash',
+ 'home' => '/root',
+ 'gid' => '0'
+ },
+ 'security' => 1,
+ 'interactiveSteps' => [
+# 'doPartitionDisks',
+# 'formatPartitions'
+ ],
+ 'autoExitInstall' => 1,
+ 'keyboard' => {
+ 'GRP_TOGGLE' => '',
+ 'KEYBOARD' => 'fr'
+ },
+ 'postInstall' => '
+# TODO improve :
+# - automated puppet deployment
+perl -pi -e "s/^PermitRootLogin.*/PermitRootLogin yes/" /etc/ssh/sshd_config
+chkconfig --add sshd
+
+ ',
+ 'rpmsrate_flags_chosen' => {
+ },
+
+ 'compssListLevel' => 5,
+ # to not pull mandi and shorewall
+ 'security' => 0,
+ 'firewall_ports' => undef,
+ 'keep_unrequested_dependencies' => 0,
+ };
+EOF
+
+# --os-type and --os-variant are likely needed to find the
+# proper layout on the mirror, do not modify it
+# also, the documentation about auto installation is wrong on mandriva wiki,
+# net is different from netw
+
+# use --no-graphics for fully autmated installation, or see the option about
+# console
+virt-install --connect=qemu:///system \
+ --network=network=default \
+ --initrd-inject=$TMP_DIR/auto_inst.cfg.pl \
+ --extra-args="text kickstart=/auto_inst.cfg.pl automatic=met:http,network:dhcp,ser:$server,dir:$directory" \
+ --name=mdv_base \
+ --disk /var/lib/libvirt/images/mdv_base.img,size=8 \
+ --ram 1024 \
+ --vcpus=1 \
+ --check-cpu \
+ --location=$tree/ \
+ --hvm \
+ --accelerate \
+ --os-type=linux \
+ --os-variant=mandriva2010 \
+
+# TODO use trap
+rm -Rf $TMP_DIR