Skip to content

Commit 2f7ed93

Browse files
committed
create ARM64 OSGuard config
1 parent 5ecf549 commit 2f7ed93

File tree

4 files changed

+252
-5
lines changed

4 files changed

+252
-5
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[Partition]
22
Type=linux-generic
33
Label=boot-a
4-
SizeMinBytes=100M
5-
SizeMaxBytes=100M
4+
SizeMinBytes=128M
5+
SizeMaxBytes=128M
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[Partition]
22
Type=linux-generic
33
Label=boot-b
4-
SizeMinBytes=100M
5-
SizeMaxBytes=100M
4+
SizeMinBytes=128M
5+
SizeMaxBytes=128M

toolkit/imageconfigs/osguard-amd64.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ storage:
1212
- id: boot-a
1313
type: linux-generic
1414
label: boot-a
15-
size: 100M
15+
size: 128M
1616

1717
- id: usr-a
1818
type: linux-generic
Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
storage:
2+
bootType: efi
3+
4+
disks:
5+
- partitionTableType: gpt
6+
partitions:
7+
- id: esp
8+
type: esp
9+
label: esp
10+
size: 512M
11+
12+
- id: boot-a
13+
type: linux-generic
14+
label: boot-a
15+
size: 128M
16+
17+
- id: usr-a
18+
type: linux-generic
19+
size: 1G
20+
21+
- id: usr-hash-a
22+
type: usr-verity
23+
size: 128M
24+
25+
- id: root-a
26+
type: root
27+
label: root-a
28+
size: 4G
29+
30+
verity:
31+
- id: usrverity
32+
name: usr
33+
dataDeviceId: usr-a
34+
hashDeviceId: usr-hash-a
35+
dataDeviceMountIdType: uuid
36+
hashDeviceMountIdType: uuid
37+
38+
filesystems:
39+
- deviceId: esp
40+
type: fat32
41+
mountPoint:
42+
idType: part-label
43+
path: /boot/efi
44+
options: umask=0077,noexec,nodev,nosuid
45+
46+
- deviceId: boot-a
47+
type: ext4
48+
mountPoint:
49+
idType: uuid
50+
path: /boot
51+
options: noexec,nodev,nosuid
52+
53+
- deviceId: usrverity
54+
type: ext4
55+
mountPoint:
56+
path: /usr
57+
options: ro,nodev
58+
59+
- deviceId: root-a
60+
type: ext4
61+
mountPoint:
62+
path: /
63+
options: nodev,nosuid,x-initrd.mount,x-systemd.growfs
64+
65+
os:
66+
bootloader:
67+
resetType: hard-reset
68+
hostname: azure-linux-os-guard
69+
70+
selinux:
71+
mode: permissive
72+
73+
uki:
74+
kernels: auto
75+
76+
kernelCommandLine:
77+
extraCommandLine:
78+
- console=tty0
79+
- console=tty1
80+
- console=ttyS0
81+
- rd.luks=0
82+
- rd.hostonly=0
83+
- ipe.enforce=0
84+
- fips=1
85+
- console=ttyAMA0
86+
- earlycon=pl011,0xeffec000
87+
- initcall_blacklist=arm_pmu_acpi_init
88+
89+
packages:
90+
remove:
91+
- initramfs
92+
- dracut-hostonly # Not used for UKI images
93+
- grub2-efi-binary # Replaced by systemd-boot
94+
- kernel # Replaced by kernel-ipe
95+
96+
install:
97+
- syslog
98+
- WALinuxAgent
99+
# OS
100+
- device-mapper
101+
- kernel-ipe
102+
# servicing
103+
# - trident
104+
# - trident-service
105+
- veritysetup
106+
# OCI
107+
- cni
108+
- containerd2
109+
- cri-tools
110+
# - erofs-utils
111+
# - notation
112+
# - tardev-snapshotter
113+
# UKI
114+
- systemd-boot
115+
# hyperv
116+
- dracut-hyperv
117+
- hyperv-daemons
118+
# cloud-init
119+
- cloud-init
120+
# selinux
121+
- checkpolicy
122+
- libselinux
123+
- policycoreutils-python-utils
124+
- secilc
125+
- selinux-policy
126+
# - selinux-policy-ci
127+
- selinux-policy-modules
128+
- setools-console
129+
130+
# === System packages ===
131+
- systemd-ukify
132+
- systemd-boot
133+
- efibootmgr
134+
- lvm2
135+
- veritysetup
136+
- selinux-policy
137+
- selinux-policy-modules
138+
- gptfdisk
139+
- curl
140+
- bind-utils
141+
- tar
142+
# =====AKS=====
143+
- ca-certificates
144+
- cifs-utils
145+
- cloud-init-azure-kvp
146+
- conntrack-tools
147+
- cracklib
148+
- ebtables
149+
- ethtool
150+
- fuse
151+
- inotify-tools
152+
- iotop
153+
- iproute
154+
- ipset
155+
- iptables
156+
- jq
157+
- logrotate
158+
- lsof
159+
- nmap-ncat
160+
- nfs-utils
161+
- pam
162+
- psmisc
163+
- rsyslog
164+
- socat
165+
- sysstat
166+
- traceroute
167+
- util-linux
168+
- xz
169+
- zip
170+
- blobfuse2
171+
- nftables
172+
- iscsi-initiator-utils
173+
- netplan
174+
- oras
175+
- initramfs
176+
177+
additionalDirs:
178+
- source: files/osguard/repart.d
179+
destination: /etc/repart.d
180+
childFilePermissions: 644
181+
182+
additionalFiles:
183+
# SELinux customizations
184+
- source: files/linuxguard/selinux-ci-uki.semanage
185+
destination: /etc/selinux/targeted/selinux-ci.semanage
186+
- source: files/common/99-dhcp-eth0.network
187+
destination: /etc/systemd/network/99-dhcp-eth0.network
188+
# Cloud-init configuration
189+
- source: files/osguard/cloud.cfg
190+
destination: /etc/cloud/cloud.cfg
191+
permissions: "644"
192+
# Include systemd-repart in the initrd
193+
- source: files/osguard/10-repart.conf
194+
destination: /etc/dracut.conf.d/10-repart.conf
195+
permissions: "644"
196+
# Set chrony to use /dev/ptp_hyperv
197+
- source: files/osguard/chrony.conf
198+
destination: /etc/chrony.conf
199+
permissions: "644"
200+
# Fix systemd resolved caching
201+
- source: files/osguard/resolv-uplink-override.service
202+
destination: /etc/systemd/system/resolv-uplink-override.service
203+
permissions: "600"
204+
205+
services:
206+
enable:
207+
- sshd
208+
- systemd-networkd
209+
- systemd-resolved
210+
211+
modules:
212+
# Explicitly enable iptable_nat for prometheus
213+
- name: iptable_nat
214+
loadMode: always
215+
216+
scripts:
217+
postCustomization:
218+
- path: scripts/linuxguard/performance-tuning.sh
219+
# Config AzureLinuxagent
220+
- path: scripts/linuxguard/azlinuxagentconfig.sh
221+
- path: scripts/linuxguard/duid-type-to-link-layer.sh
222+
# Disable unused SELinux policy modules and configure SELinux policy for CI
223+
#- path: scripts/linuxguard/selinux-ci-config.sh
224+
- path: scripts/linuxguard/cleanup-machineid.sh
225+
- path: scripts/linuxguard/prepare_trusted_cni_plugins.sh
226+
- path: scripts/linuxguard/tmp-no-exec.sh
227+
228+
- path: scripts/set_os_release_variant_entries.sh
229+
arguments:
230+
- --variant-id
231+
- osguard
232+
- --variant
233+
- OS Guard Image
234+
- path: scripts/osguard/create-empty-certs-dir.sh
235+
236+
output:
237+
artifacts:
238+
items:
239+
- verity-hash
240+
- ukis
241+
path: ./output
242+
image:
243+
format: vhdx
244+
245+
previewFeatures:
246+
- output-artifacts
247+
- uki

0 commit comments

Comments
 (0)