-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathexec.config
More file actions
executable file
·44 lines (36 loc) · 1.26 KB
/
exec.config
File metadata and controls
executable file
·44 lines (36 loc) · 1.26 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
#!/usr/bin/env bash
set -Eeuo pipefail
# Undo the gardener feature disablement
systemctl enable ssh
# UID taken from sles 15, looks like it runs as root in debian/gardenlinux
adduser --uid 476 openvswitch \
--system --group --no-create-home --disabled-password --disabled-login
adduser root openvswitch # Otherwise does not want to run as root:openvswitch
# make os_release compliant to systemd spec
cat >> /etc/os-release << EOF
IMAGE_VERSION=${BUILDER_VERSION}
VARIANT_ID=${BUILDER_CNAME%-*}
EOF
function create() {
NAME=$1
shift
ID=$1
shift
adduser --uid $ID --home /var/lib/$NAME $NAME \
--system --group --disabled-password --disabled-login
echo "$@"
for group in "$@"; do
adduser $NAME $group
done
}
create openstack 42424
create neutron 42435 openvswitch
create nova 42436 libvirt openvswitch
create kvm-node-agent 42438 libvirt
chsh -s /bin/bash nova
mkdir -p /var/lib/nova/{.ssh,instances,mnt}
chown -R nova:libvirt-qemu /var/lib/nova/{.ssh,instances,mnt}
chmod 0600 /var/lib/nova/.ssh
# limit vnc port autorange to possible kubernetes nodeports
sed -i 's/#remote_display_port_min = 5900/remote_display_port_min = 32200/' /etc/libvirt/qemu.conf
sed -i 's/#remote_display_port_max = 65535/remote_display_port_max = 32299/' /etc/libvirt/qemu.conf