Prepare VM config for podman

This commit is contained in:
Disassembler 2021-05-09 16:07:15 +02:00
parent fd23d27bba
commit 5d4e4c3dae
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
5 changed files with 10 additions and 17 deletions

8
vm.sh
View File

@ -14,8 +14,8 @@ echo
# Set up repositories # Set up repositories
cat <<EOF >/etc/apk/repositories cat <<EOF >/etc/apk/repositories
http://dl-cdn.alpinelinux.org/alpine/v3.12/main http://dl-cdn.alpinelinux.org/alpine/v3.13/main
http://dl-cdn.alpinelinux.org/alpine/v3.12/community http://dl-cdn.alpinelinux.org/alpine/v3.13/community
EOF EOF
# Install disk management tools # Install disk management tools
@ -89,9 +89,9 @@ apk --no-cache add apache2-utils gettext
wget https://repo.spotter.cz/vm.tar.gz -O - | tar xzf - -C /mnt wget https://repo.spotter.cz/vm.tar.gz -O - | tar xzf - -C /mnt
envsubst </mnt/boot/extlinux.conf >/mnt/boot/extlinux.conf.new envsubst </mnt/boot/extlinux.conf >/mnt/boot/extlinux.conf.new
mv /mnt/boot/extlinux.conf.new /mnt/boot/extlinux.conf mv /mnt/boot/extlinux.conf.new /mnt/boot/extlinux.conf
chroot /mnt apk --no-cache add bridge ca-certificates curl e2fsprogs-extra gettext iptables kbd-misc logrotate lxc postfix nginx openssh-server openssh-sftp-server util-linux spoc@vm vmmgr@vm chroot /mnt apk --no-cache add ca-certificates curl e2fsprogs-extra gettext iptables kbd-misc logrotate postfix nginx openssh-server openssh-sftp-server util-linux podman@edgecommunity spoc@spotter vmmgr@spotter
chroot /mnt newaliases chroot /mnt newaliases
for SERVICE in cgroups consolefont crond iptables networking nginx ntpd postfix spoc swap urandom vmmgr; do for SERVICE in consolefont crond iptables networking nginx ntpd podman postfix spoc swap urandom vmmgr; do
ln -s /etc/init.d/${SERVICE} /mnt/etc/runlevels/boot ln -s /etc/init.d/${SERVICE} /mnt/etc/runlevels/boot
done done
ADMINPWD=$(htpasswd -bnBC 10 '' "${ENCPWD}" | tr -d ':\n' | sed 's/$2y/$2b/') envsubst </mnt/etc/vmmgr/config.json >/mnt/etc/vmmgr/config.json.new ADMINPWD=$(htpasswd -bnBC 10 '' "${ENCPWD}" | tr -d ':\n' | sed 's/$2y/$2b/') envsubst </mnt/etc/vmmgr/config.json >/mnt/etc/vmmgr/config.json.new

View File

@ -1,3 +1,5 @@
http://dl-cdn.alpinelinux.org/alpine/v3.12/main http://dl-cdn.alpinelinux.org/alpine/v3.13/main
http://dl-cdn.alpinelinux.org/alpine/v3.12/community http://dl-cdn.alpinelinux.org/alpine/v3.13/community
@vm https://repo.spotter.cz/alpine/v3.12/apk @edge http://dl-cdn.alpinelinux.org/alpine/edge/main
@edgecommunity http://dl-cdn.alpinelinux.org/alpine/edge/community
@spotter https://repo.spotter.cz/alpine/v3.13/apk

View File

@ -1,3 +1,2 @@
127.0.0.1 localhost 127.0.0.1 localhost
::1 localhost ::1 localhost
172.17.0.1 host

View File

@ -4,14 +4,6 @@ iface lo inet loopback
auto eth0 auto eth0
iface eth0 inet dhcp iface eth0 inet dhcp
auto spocbr0
iface spocbr0 inet static
address 172.17.0.1
netmask 255.255.0.0
bridge_fd 0
bridge_stp off
bridge_waitport 0
auto wg0 auto wg0
iface wg0 inet static iface wg0 inet static
address 172.17.255.1 address 172.17.255.1

View File

@ -1,6 +1,6 @@
append_dot_mydomain = no append_dot_mydomain = no
biff = no biff = no
compatibility_level = 2 compatibility_level = 2
mynetworks = 127.0.0.0/8 172.17.0.0/16 [::1]/128 mynetworks = 127.0.0.0/8 10.88.0.0/16 [::1]/128
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes smtp_use_tls = yes