Added cvmb.usr.f30.
authorZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Tue, 9 Jul 2019 11:43:56 +0000 (13:43 +0200)
committerZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Tue, 9 Jul 2019 11:43:56 +0000 (13:43 +0200)
14 files changed:
sources/cvmb.usr.f29/01_setupnetworking.sh [deleted file]
sources/cvmb.usr.f30/01_setupnetworking.sh [new file with mode: 0755]
sources/cvmb.usr.f30/99_setupsystem.sh [new file with mode: 0755]
sources/cvmb.usr.f30/etc/lxc.conf [new file with mode: 0644]
sources/cvmb.usr.f30/etc/sysctl.d/01-lxc.conf [new file with mode: 0644]
sources/cvmb.usr.f30/etc/systemd/network/10-efg.link [new file with mode: 0644]
sources/cvmb.usr.f30/etc/systemd/network/10-ifg.link [new file with mode: 0644]
sources/cvmb.usr.f30/etc/systemd/network/10-ins.link [new file with mode: 0644]
sources/cvmb.usr.f30/etc/systemd/network/10-internal.link [new file with mode: 0644]
sources/cvmb.usr.f30/etc/systemd/network/10-ldap.link [new file with mode: 0644]
sources/cvmb.usr.f30/etc/systemd/network/10-pns.link [new file with mode: 0644]
sources/cvmb.usr.f30/etc/systemd/network/10-svc.link [new file with mode: 0644]
sources/cvmb.usr.f30/etc/systemd/network/10-vpn.link [new file with mode: 0644]
sources/cvmb.usr.f30/packages.txt [new file with mode: 0644]

diff --git a/sources/cvmb.usr.f29/01_setupnetworking.sh b/sources/cvmb.usr.f29/01_setupnetworking.sh
deleted file mode 100755 (executable)
index df80106..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-
-CONNECTION_LINE=$(nmcli --terse connection show | grep '^internal:')
-CONNECTION_UUID=$(echo $CONNECTION_LINE | cut -f 2 -d ':')
-
-USR_DEVICE=internal
-
-nmcli connection delete uuid "$CONNECTION_UUID"
-
-nmcli connection add \
-    connection.autoconnect yes \
-    connection.id internal \
-    connection.interface-name $USR_DEVICE \
-    connection.type 802-3-ethernet \
-    ipv4.addresses "10.228.92.52/16" \
-    ipv4.dns "10.228.109.104, 10.228.109.253" \
-    ipv4.dns-search "usr.user.hu" \
-    ipv4.gateway "10.228.109.254" \
-    ipv4.method "manual" \
-    ipv6.method "ignore" \
-    save yes
-
-nmcli connection show
diff --git a/sources/cvmb.usr.f30/01_setupnetworking.sh b/sources/cvmb.usr.f30/01_setupnetworking.sh
new file mode 100755 (executable)
index 0000000..c65a613
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+
+INTERNAL_DEVICE=internal
+CONNECTION_LINE=$(nmcli --terse connection show | grep "${INTERNAL_DEVICE}$")
+CONNECTION_UUID=$(echo $CONNECTION_LINE | cut -f 2 -d ':')
+
+nmcli connection delete uuid "$CONNECTION_UUID"
+
+nmcli connection add \
+    connection.autoconnect yes \
+    connection.id internal \
+    connection.interface-name $INTERNAL_DEVICE \
+    connection.type 802-3-ethernet \
+    ipv4.addresses "10.228.92.52/16" \
+    ipv4.dns "10.228.109.104, 10.228.109.253" \
+    ipv4.dns-search "usr.user.hu" \
+    ipv4.gateway "10.228.109.254" \
+    ipv4.method "manual" \
+    ipv6.method "ignore" \
+    save yes
+
+HOST_BRIDGE_DEVICE=brh
+CONNECTION_LINE=$(nmcli --terse connection show | grep "${HOST_BRIDGE_DEVICE}$")
+CONNECTION_UUID=$(echo $CONNECTION_LINE | cut -f 2 -d ':')
+
+nmcli connection delete uuid "$CONNECTION_UUID"
+
+nmcli connection add \
+    connection.autoconnect yes \
+    connection.id brh \
+    connection.interface-name $HOST_BRIDGE_DEVICE \
+    connection.type bridge \
+    save yes
+
+nmcli connection show
+
+for LXC_DEVICE in efgd efgs ifg svc ldap vpn pns ins
+do
+    CONNECTION_LINE=$(nmcli --terse connection show | grep "${LXC_DEVICE}$")
+    if [ -n "$CONNECTION_LINE" ]
+    then
+        CONNECTION_UUID=$(echo $CONNECTION_LINE | cut -f 2 -d ':')
+        nmcli connection delete uuid "$CONNECTION_UUID"
+    fi
+done
+
+nmcli connection show
diff --git a/sources/cvmb.usr.f30/99_setupsystem.sh b/sources/cvmb.usr.f30/99_setupsystem.sh
new file mode 100755 (executable)
index 0000000..88aac25
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+
+hostnamectl set-hostname cvmb.usr.user.hu
+systemctl enable lxc.service
+systemctl start lxc.service
diff --git a/sources/cvmb.usr.f30/etc/lxc.conf b/sources/cvmb.usr.f30/etc/lxc.conf
new file mode 100644 (file)
index 0000000..48f7ddf
--- /dev/null
@@ -0,0 +1 @@
+lxc.lxcpath = /lxc/containers
diff --git a/sources/cvmb.usr.f30/etc/sysctl.d/01-lxc.conf b/sources/cvmb.usr.f30/etc/sysctl.d/01-lxc.conf
new file mode 100644 (file)
index 0000000..77fcb19
--- /dev/null
@@ -0,0 +1,8 @@
+#fs.inotify.max_queued_events = 16384
+# This is the default.
+
+fs.inotify.max_user_instances = 1024
+# The default is 128.
+
+#fs.inotify.max_user_watches = 8192
+# This is the default.
diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-efg.link b/sources/cvmb.usr.f30/etc/systemd/network/10-efg.link
new file mode 100644 (file)
index 0000000..f5569cb
--- /dev/null
@@ -0,0 +1,5 @@
+[Match]
+MACAddress=00:50:56:9e:c2:01
+
+[Link]
+Name=efg
diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-ifg.link b/sources/cvmb.usr.f30/etc/systemd/network/10-ifg.link
new file mode 100644 (file)
index 0000000..3ffc0b1
--- /dev/null
@@ -0,0 +1,5 @@
+[Match]
+MACAddress=00:50:56:9e:6d:fe
+
+[Link]
+Name=ifg
diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-ins.link b/sources/cvmb.usr.f30/etc/systemd/network/10-ins.link
new file mode 100644 (file)
index 0000000..9ce7bf0
--- /dev/null
@@ -0,0 +1,5 @@
+[Match]
+MACAddress=00:50:56:9e:6d:68
+
+[Link]
+Name=ins
diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-internal.link b/sources/cvmb.usr.f30/etc/systemd/network/10-internal.link
new file mode 100644 (file)
index 0000000..2b8b7db
--- /dev/null
@@ -0,0 +1,5 @@
+[Match]
+MACAddress=00:50:56:9e:5c:34
+
+[Link]
+Name=internal
diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-ldap.link b/sources/cvmb.usr.f30/etc/systemd/network/10-ldap.link
new file mode 100644 (file)
index 0000000..36781b0
--- /dev/null
@@ -0,0 +1,5 @@
+[Match]
+MACAddress=00:50:56:9e:6d:fc
+
+[Link]
+Name=ldap
diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-pns.link b/sources/cvmb.usr.f30/etc/systemd/network/10-pns.link
new file mode 100644 (file)
index 0000000..dbafaba
--- /dev/null
@@ -0,0 +1,5 @@
+[Match]
+MACAddress=00:50:56:9e:6d:ae
+
+[Link]
+Name=pns
diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-svc.link b/sources/cvmb.usr.f30/etc/systemd/network/10-svc.link
new file mode 100644 (file)
index 0000000..f07d4b0
--- /dev/null
@@ -0,0 +1,5 @@
+[Match]
+MACAddress=00:50:56:9e:6d:fd
+
+[Link]
+Name=svc
diff --git a/sources/cvmb.usr.f30/etc/systemd/network/10-vpn.link b/sources/cvmb.usr.f30/etc/systemd/network/10-vpn.link
new file mode 100644 (file)
index 0000000..c4db4d8
--- /dev/null
@@ -0,0 +1,5 @@
+[Match]
+MACAddress=00:50:56:9e:6d:ec
+
+[Link]
+Name=vpn
diff --git a/sources/cvmb.usr.f30/packages.txt b/sources/cvmb.usr.f30/packages.txt
new file mode 100644 (file)
index 0000000..5c28527
--- /dev/null
@@ -0,0 +1,5 @@
+lxc
+lxc-templates
+mercurial
+screen
+vim-enhanced