From f8c70440e1106d620212d96163179f7d96519b76 Mon Sep 17 00:00:00 2001 From: Iwan Clement Date: Tue, 28 Dec 2021 18:12:09 +0100 Subject: [PATCH] files creation --- data/ubuntu-20.04/meta-data | 0 data/ubuntu-20.04/user-data | 113 ++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 data/ubuntu-20.04/meta-data create mode 100644 data/ubuntu-20.04/user-data diff --git a/data/ubuntu-20.04/meta-data b/data/ubuntu-20.04/meta-data new file mode 100644 index 0000000..e69de29 diff --git a/data/ubuntu-20.04/user-data b/data/ubuntu-20.04/user-data new file mode 100644 index 0000000..471cb48 --- /dev/null +++ b/data/ubuntu-20.04/user-data @@ -0,0 +1,113 @@ +#cloud-config +autoinstall: + version: 1 + early-commands: + - systemctl stop ssh # otherwise packer tries to connect and exceed max attempts + + network: + network: + version: 2 + ethernets: + ens224: + dhcp4: yes + dhcp-identifier: mac + + identity: + hostname: IRIS-UBU-2004 + username: solvay + password: '$6$d28IFiwkfMelDeva$EGDc02Bh7OTxHzuaIATs2j1s4rf//5DFeE0Y9EwcctqQX3LXHxUoqZuciF7QCJRFQ1BJK7g67ZfUwUdXNFIV80' + + locale: en_US.UTF-8 +# keyboard: +# layout: fr +# variant: fr + + apt: + preserve_sources_list: false + primary: + - arches: [amd64] + uri: "http://gahs-repomanager.eua.solvay.com:8081/repository/ubuntu-focal" + geoip: false + + ssh: + install-server: yes + allow-pw: yes + authorized-keys: + - 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCtU6xfYuiempKawFvFIs+bQTR8PvyBEYvspiuAPOCN7dPQK83mZHu8z8uNm1Jq4icH2GYkI9Xic8+aHTYdwDx1t9THqbHwgKA3BgGJ2VATjo0rZDknNzPklDp84/hhHX938ztVldoSrnUcJbCSON3hQzX6w3OT34EDtNftVJE0TisUNFHj6T0HLwu+cxNHW7hkdDY7uWvDYeHSRh9lxms0oPqNqpYMrRaKWXXwE6+ubuF6hBu5oGsDD+tnhm/q/D3+oYmOBZVVdCBMlnpAcNBPN2kUzLRmQkfyMs38UJWbChg70muMgGtqIS8orW8IoC14zSdfAJaplaV6p37aj1tzz5RDFS5e6RBh3IVfsj0ofGufj2rI17yLRAHgO8DmZljXPLxKHva7+XcbapuIcHkcja/Yv96EGckR1ZwfnWpYCAlLMcuQD0pBm2JDDLKHlvVVI3Zdc3iDmHnW3ei7hcPPwDYsfggj3qOGVv2mneag7fjHc12nrWBbVQzI/ahaNik= adms-iclement@frcivttdk02' + - 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkmhk6YsYft22PanlIFUqbDDPPzFw8Ei83i0eG/zmIfcN30nFnTFThIq4WEEnndgOtstLL6HTijmmCO7uwPGKvVElRj+HfiGSCRNIk6LeUsFp4wkUv40wNhj8r6q25tJc1S69PPeYzkKumo44ZyNH7k6BMCtF6KafqS/PN/gvQoZNpFAnkFvUcaTpsi4nUJkZEGopomUheWGIRuY8K9EClY0iH7mqec7aIVWlrO/g8KNUfsmAbFLw52eyI4qzDVgGGiFuoxki8udHe7A9AecVmjRMXabHu9JGMHL2Q6uS+hLf0cj5NPaeYrpvti7uWbMwUc6hSCHpvXZTWIMGX4HTL eua\iclement@W-514051' + + user-data: + disable_root: false + + late-commands: + - echo 'solvay ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/solvay + - sed -i 's/^#*\(send dhcp-client-identifier\).*$/\1 = hardware;/' /target/etc/dhcp/dhclient.conf +# - 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/" /target/etc/netplan/00-installer-config.yaml' + - rm -fv /var/lib/dhcp/* +# - systemctl restart networking +# - curtin in-target --target=/target -- apt update +# - curtin in-target --target=/target -- apt upgrade -y +# - curtin in-target --target=/target -- apt dist-upgrade -y +# # - sed -ie 's/GRUB_TIMEOUT=.*/GRUB_TIMEOUT=30/' /target/etc/default/grub + + storage: + config: + - {grub_device: true, id: disk-sda, name: '', path: /dev/sda, preserve: false, ptable: gpt, type: disk, wipe: superblock} + - {device: disk-sda, flag: bios_grub, id: partition-boot, number: 1, preserve: false, size: 1048576, type: partition} + - {device: disk-sda, flag: '', id: boot-part, number: 2, preserve: false, size: 805306368, type: partition, wipe: superblock} + - {fstype: ext4, id: format-boot, preserve: false, type: format, volume: boot-part, label: BOOT} + - {device: disk-sda, flag: '', id: lvm-part, number: 3, preserve: false, size: -1, type: partition, wipe: superblock} + - {devices: [lvm-part], id: lv_root, name: system-vg, preserve: false, type: lvm_volgroup} + - {device: format-boot, id: mount-boot, path: /boot, type: mount} + # / + - {id: lvm_part_root, name: root-lv, preserve: false, size: 268435456, type: lvm_partition, volgroup: lv_root} + - {fstype: ext4, id: format-root, preserve: false, type: format, volume: lvm_part_root, label: ROOT} + - {device: format-root, id: mount-root, path: /, type: mount} + # /var + - {id: lvm_part_var, name: var-lv, preserve: false, size: 536870912, type: lvm_partition, volgroup: lv_root} + - {fstype: ext4, id: format-var, preserve: false, type: format, volume: lvm_part_var, label: VAR} + - {device: format-var, id: mount-var, path: /var,type: mount} + # /var/log + - {id: lvm_part_varlog, name: varlog-lv, preserve: false, size: 2147483648, type: lvm_partition, volgroup: lv_root} + - {fstype: ext4, id: format-varlog, preserve: false, type: format, volume: lvm_part_varlog, label: VARLOG} + - {device: format-varlog, id: mount-varlog, path: /var/log, type: mount} + # /var/lib + - {id: lvm_part_varlib, name: varlib-lv, preserve: false, size: 2147483648, type: lvm_partition, volgroup: lv_root} + - {fstype: ext4, id: format-varlib, preserve: false, type: format, volume: lvm_part_varlib, label: VARLIB} + - {device: format-varlib, id: mount-varlib, path: /var/lib, type: mount} + # /var/cache + - {id: lvm_part_varcache, name: varcache-lv, preserve: false, size: 2147483648, type: lvm_partition, volgroup: lv_root} + - {fstype: ext4, id: format-varcache, preserve: false, type: format, volume: lvm_part_varcache, label: VARCACHE} + - {device: format-varcache, id: mount-varcache, path: /var/cache, type: mount} + # /home + - {id: lvm_part_home, name: home-lv, preserve: false, size: 2147483648, type: lvm_partition, volgroup: lv_root} + - {fstype: ext4, id: format-home, preserve: false, type: format, volume: lvm_part_home, label: HOME} + - {device: format-home, id: mount-home, path: /home, type: mount} + # /tmp + - {id: lvm_part_tmp, name: tmp-lv, preserve: false, size: 2147483648, type: lvm_partition, volgroup: lv_root} + - {fstype: ext4, id: format-tmp, preserve: false, type: format, volume: lvm_part_tmp, label: TMP} + - {device: format-tmp, id: mount-tmp, path: /tmp, type: mount} + # /usr + - {id: lvm_part_usr, name: usr-lv, preserve: false, size: 5368709120, type: lvm_partition, volgroup: lv_root} + - {fstype: ext4, id: format-usr, preserve: false, type: format, volume: lvm_part_usr, label: USR} + - {device: format-usr, id: mount-usr, path: /usr, type: mount} + # /opt + - {id: lvm_part_opt, name: opt-lv, preserve: false, size: 6442450944, type: lvm_partition, volgroup: lv_root} + - {fstype: ext4, id: format-opt, preserve: false, type: format, volume: lvm_part_opt, label: OPT} + - {device: format-opt, id: mount-opt, path: /opt, type: mount} + # /var/tmp + - {id: lvm_part_vartmp, name: vartmp-lv, preserve: false, size: 2147483648, type: lvm_partition, volgroup: lv_root} + - {fstype: ext4, id: format-vartmp, preserve: false, type: format, volume: lvm_part_vartmp, label: VARTMP} + - {device: format-vartmp, id: mount-vartmp, path: /var/tmp, type: mount} + # swap + - {id: lvm_part_swap, flag: swap, name: swap-lv, preserve: false, size: 4294967296, type: lvm_partition, volgroup: lv_root} + - {fstype: swap, id: format-swap, preserve: false, type: format, volume: lvm_part_swap, label: SWAP} + - {device: format-swap, id: mount-swap, path: '', type: mount} + # /var/crash + - {id: lvm_part_varcrash, name: varcrash-lv, preserve: false, size: 2147483648, type: lvm_partition, volgroup: lv_root} + - {fstype: ext4, id: format-varcrash, preserve: false, type: format, volume: lvm_part_varcrash, label: VARCRASH} + - {device: format-varcrash, id: mount-varcrash, path: /var/crash, type: mount} + # /etc/init.d + - {id: lvm_part_initd, name: initd-lv, preserve: false, size: 10485760, type: lvm_partition, volgroup: lv_root} + - {fstype: ext4, id: format-initd, preserve: false, type: format, volume: lvm_part_initd, label: INITD} + - {device: format-initd, id: mount-initd, path: /etc/init.d, type: mount} \ No newline at end of file