Only Build Ubuntu 16.04 Xenial Xerus VMs
authorJason Stephenson <jason@sigio.com>
Tue, 4 Dec 2018 14:25:50 +0000 (09:25 -0500)
committerJason Stephenson <jason@sigio.com>
Tue, 4 Dec 2018 14:25:50 +0000 (09:25 -0500)
Testing revealed that we cannot build Ubuntu 16.04 VMs and still build
VMs with older releases.  Since Xenial Xerus is the older LTS at this
point and Trusty Tahr (Ubuntu 14.04) will go out of LTS in April 2019,
we will focuse on Xenial.

I should also note that we cannot build Ubuntu 18.04 Bionic Beaver VMs
with vmbuilder, either.  The move to netplan for networking
configuration will require big changes to the vmbuilder templates, and
no one in the vmbuilder community seems to be taking that on.  This
could be the end of the road for our use of vmbuilder.

Signed-off-by: Jason Stephenson <jason@sigio.com>
files/configuration/ejabberd.cfg [deleted file]
files/extras/README [new file with mode: 0644]
files/extras/interfaces-xenial.tmpl [new file with mode: 0644]
scripts/postbuild.sh
vmbuilder/vmbuilder.conf.example

diff --git a/files/configuration/ejabberd.cfg b/files/configuration/ejabberd.cfg
deleted file mode 100644 (file)
index b33708f..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-% This is a minimalist ejabberd configuration file
-% Most things not needed for opensrf, have been removed.
-{acl, admin, {user, "", "localhost"}}.
-{hosts, ["localhost","public.localhost","private.localhost"]}.
-{loglevel, 4}.
-{listen,
- [
-  {5222, ejabberd_c2s, [
-                        {access, c2s},
-                        {shaper, c2s_shaper},
-                        {max_stanza_size, 2000000},
-                        starttls, {certfile, "/etc/ejabberd/ejabberd.pem"}
-                       ]},
-  {5269, ejabberd_s2s_in, [
-                           {shaper, s2s_shaper},
-                           {max_stanza_size, 2000000}
-                          ]},
-  {5280, ejabberd_http, [
-                         http_bind,
-                         http_poll,
-                         web_admin
-                        ]}
- ]}.
-{max_fsm_queue, 1000}.
-{s2s_use_starttls, true}.
-{s2s_certfile, "/etc/ejabberd/ejabberd.pem"}.
-{auth_method, internal}.
-{shaper, normal, {maxrate, 500000}}.
-{shaper, fast, {maxrate, 500000}}.
-{acl, local, {user_regexp, ""}}.
-{access, max_user_sessions, [{10000, all}]}.
-{access, max_user_offline_messages, [{5000, admin}, {100, all}]}.
-{access, local, [{allow, local}]}.
-{access, c2s, [{deny, blocked},
-               {allow, all}]}.
-{access, c2s_shaper, [{none, admin},
-                      {normal, all}]}.
-{access, s2s_shaper, [{fast, all}]}.
-{access, announce, [{allow, admin}]}.
-{access, configure, [{allow, admin}]}.
-{access, register, [{deny, all}]}.
-{access, pubsub_createnode, [{allow, all}]}.
-{language, "en"}.
-{modules,
- [
-  {mod_adhoc,    []},
-  {mod_announce, [{access, announce}]}, % requires mod_adhoc
-  {mod_caps,     []},
-  {mod_configure,[]}, % requires mod_adhoc
-  {mod_admin_extra, []},
-  {mod_disco,    []},
-  {mod_version,  []}
- ]}.
-
diff --git a/files/extras/README b/files/extras/README
new file mode 100644 (file)
index 0000000..46cbaf8
--- /dev/null
@@ -0,0 +1,5 @@
+Extra files for the hosts go here
+
+templates-xenial.tmpl - Copy this file to
+/etc/vmbuilder/ubuntu/interfaces.tmpl in order to successfully build
+virtual machines with Ubuntu 16.04 Xenial Xerus.
diff --git a/files/extras/interfaces-xenial.tmpl b/files/extras/interfaces-xenial.tmpl
new file mode 100644 (file)
index 0000000..44667fa
--- /dev/null
@@ -0,0 +1,22 @@
+# This file describes the network interfaces available on your system
+# and how to activate them. For more information, see interfaces(5).
+
+# The loopback network interface
+auto lo
+iface lo inet loopback
+
+# The primary network interface
+auto ens3
+#if $ip == 'dhcp'
+iface ens3 inet dhcp
+#else
+iface ens3 inet static
+        address $ip
+        netmask $mask
+        network $net
+        broadcast $bcast
+        gateway $gw
+        # dns-* options are implemented by the resolvconf package, if installed
+        dns-nameservers $dns
+        dns-search $domain
+#end if
index a40bd20..79cdba7 100755 (executable)
@@ -9,16 +9,9 @@ source $EGVMSCRIPTPATH/config
 cp -r $EGVMSCRIPTPATH/working/$EGVMNAME/* $1/home/opensrf/
 
 # Ejabberd Config
-if [ "$EGVMSUITE" = "xenial" ]; then
-    cp $EGVMSCRIPTPATH/files/configuration/ejabberd.yml $1/etc/ejabberd/ejabberd.yml
-    chroot $1 chown ejabberd:ejabberd /etc/ejabberd/ejabberd.yml
-    chmod o-rwx,g-r $1/etc/ejabberd/ejabberd.yml
-else
-    cp $EGVMSCRIPTPATH/files/configuration/ejabberd.cfg $1/etc/ejabberd/ejabberd.cfg
-    chroot $1 chown root:ejabberd /etc/ejabberd/ejabberd.cfg
-    chmod o-rwx,g+r $1/etc/ejabberd/ejabberd.cfg
-    sed -i -e 's/#SMP=disable/SMP=auto/' $1/etc/default/ejabberd
-fi
+cp $EGVMSCRIPTPATH/files/configuration/ejabberd.yml $1/etc/ejabberd/ejabberd.yml
+chroot $1 chown ejabberd:ejabberd /etc/ejabberd/ejabberd.yml
+chmod o-rwx,g-r $1/etc/ejabberd/ejabberd.yml
 
 # SSL Certificate
 mkdir -p $1/etc/apache2
index 3b34938..9e15da9 100644 (file)
@@ -25,14 +25,12 @@ timezone=America/New_York
 components=main,universe
 # Some of this (wget, make, autoconf, nsis, zip, unzip, ejabberd at least) is generally needed.
 # The rest are to make other things easier.
-# WARNING: For trusty (see suite below) you should add linux-image-generic to this list!
-addpkg=acpid, vim, openssh-server, screen, wget, ntp, aptitude, make, autoconf, git, ejabberd, nsis, zip, unzip
+addpkg=acpid, vim, openssh-server, screen, wget, ntp, aptitude, make, autoconf, git, ejabberd, nsis, zip, unzip, linux-image-generic
 
 arch=amd64
 libvirt=qemu:///system
 
 [ubuntu]
 # Set the suite to the desired test suite
-# WARNING: If setting to trusty add linux-image-generic to the addpkg list (see above)
-suite=precise
+suite=xenial
 virtio_net=1