-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautoinstall_zetta.yaml
More file actions
154 lines (127 loc) · 4.19 KB
/
autoinstall_zetta.yaml
File metadata and controls
154 lines (127 loc) · 4.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
autoinstall:
version: 1
packages:
- ubuntu-desktop
- ansible
- ssh-askpass
- network-manager
# - zfsutils-linux
identity:
username: local
password: '$6$o3X2GvDvHs7b1xE1$eXZsqs8sIMwMExDr.HUztoPB/aaGsxIXXE6pLln7stPeb7moOulKxkQJnOqDnrsN1rxHbx3LX8kJO8WQ7jGay1'
hostname: FHMLM4I-NANO024
locale: en_US.UTF-8
keyboard:
layout: us
variant: euro
timezone: geoip
codecs:
install: true
drivers:
install: true
ssh:
allow-pw: true
authorized-keys: []
install-server: true
storage:
config:
- id: os_disk
type: disk
match:
serial: '*131209317512*'
ptable: gpt
wipe: superblock
preserve: false
grub_device: true
- id: efi_partition
type: partition
device: os_disk
size: 256M
flag: boot
grub_device: true
- id: boot_partition
type: partition
device: os_disk
size: 384M
flag: boot
- id: root_partition
type: partition
device: os_disk
size: -1
- id: efi_format
type: format
fstype: fat32
volume: efi_partition
- id: boot_format
type: format
fstype: ext4
volume: boot_partition
- id: root_format
type: format
fstype: ext4
volume: root_partition
- id: efi_mount
type: mount
device: efi_format
path: /boot/efi
- id: boot_mount
type: mount
device: boot_format
path: /boot
- id: root_mount
type: mount
device: root_format
path: /
# Ubuntu Desktop uses the hwe flavor kernel by default.
early-commands:
- echo 'linux-generic-hwe-24.04' > /run/kernel-meta-package
# The live-server ISO does not contain some of the required packages,
# such as ubuntu-desktop or the hwe kernel (or most of their depdendencies).
# The system being installed will need some sort of apt access.
# proxy: http://192.168.0.1:3142
late-commands:
# Changing from networkd to NetworkManager
# move existing config out of the way
- find /target/etc/netplan/ -name "*.yaml" -exec sh -c 'mv "$1" "$1-orig"' _ {} \;
# Create a new netplan and enable it
- |
cat <<EOF | sudo tee /target/etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: NetworkManager
EOF
- curtin in-target --target /target netplan generate
- curtin in-target --target /target netplan apply
- curtin in-target --target /target systemctl enable NetworkManager.service
# Remove default filesystem and related tools not used with the suggested
# 'direct' storage layout. These may yet be required if different
# partitioning schemes are used.
- >-
curtin in-target -- apt-get remove -y
btrfs-progs cryptsetup* lvm2 xfsprogs
# Remove other packages present by default in Ubuntu Server but not
# normally present in Ubuntu Desktop. And remove snapd
# Remove snapd and gnome-initial-setup to prevent the ubuntu opt in/out stuff
- >-
curtin in-target -- apt-get remove -y
ubuntu-server ubuntu-server-minimal ncurses-term open-iscsi sg3-utils
sosreport open-vm-tools landscape-common snapd gnome-initial-setup
# Keep cloud-init, as it performs some of the installation on first boot.
- curtin in-target -- apt-get install -y cloud-init
# Finally, remove things only installed as dependencies of other things
# we have already removed.
- curtin in-target -- apt-get autoremove -y
# Create mount targets for zfs pools in exa and peta only
# - curtin in-target -- mkdir -p /mnt/ssd
# - curtin in-target -- mkdir -p /mnt/localscratch
shutdown: poweroff
# A postinstall script may optionally be used for further install
# customization. Deploy this postinstall.sh script on the webserver.
# - wget -O /target/postinstall.sh http://192.168.0.2/postinstall.sh
# - curtin in-target -- bash /postinstall.sh
# - rm /target/postinstall.sh
# Additional cloud-init configuration affecting the target
# system can be supplied underneath a user-data section inside of
# autoinstall.
# user-data:
# …