Add production setup to LXD
This are the recommendations for LXD production setup: https://github.com/lxc/lxd/blob/master/doc/production-setup.md
- Install LXD snap: the snap that already takes care of /etc/security/limits.conf
- Use ZFS storage driver: It is much faster than "dir"
- Apply sysctl recommended values
Change-Id: Id3c83a34cd853155e795ff117520911514b19107
Signed-off-by: David Garcia <david.garcia@canonical.com>
diff --git a/installers/lxd-preseed.conf b/installers/lxd-preseed.conf
new file mode 100644
index 0000000..82ed8dc
--- /dev/null
+++ b/installers/lxd-preseed.conf
@@ -0,0 +1,44 @@
+# Copyright 2020 Canonical Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+config: {}
+networks:
+- config:
+ ipv4.address: auto
+ ipv6.address: none
+ description: ""
+ managed: false
+ name: lxdbr0
+ type: ""
+storage_pools:
+- config:
+ size: 100GB
+ description: ""
+ name: default
+ driver: zfs
+profiles:
+- config: {}
+ description: ""
+ devices:
+ eth0:
+ name: eth0
+ nictype: bridged
+ parent: lxdbr0
+ type: nic
+ root:
+ path: /
+ pool: default
+ type: disk
+ name: default
+cluster: null