Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9125091
D7600.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D7600.id.diff
View Options
diff --git a/Puppetfile b/Puppetfile
--- a/Puppetfile
+++ b/Puppetfile
@@ -207,6 +207,10 @@
:git => 'https://forge.softwareheritage.org/source/puppet-puppetlabs-vcsrepo',
:ref => 'v5.0.0'
+mod 'zfs_core',
+ :git => 'https://forge.softwareheritage.org/source/puppet-puppetlabs-zfs_core',
+ :ref => '1.0.0' # Higher versions not compatible with puppet < 6.0
+
mod 'zookeeper',
:git => 'https://forge.softwareheritage.org/source/puppet-deric-zookeeper',
:ref => 'v1.2.1'
diff --git a/data/hostname/elastic-worker0.internal.staging.swh.network.yaml b/data/hostname/elastic-worker0.internal.staging.swh.network.yaml
new file mode 100644
--- /dev/null
+++ b/data/hostname/elastic-worker0.internal.staging.swh.network.yaml
@@ -0,0 +1,6 @@
+# enable contrib and non-free apt sources
+swh::apt_config::enable_non_free: true
+# which allows the following dependency to be installed
+packages:
+ # install zfs
+ - zfs-dkms
diff --git a/manifests/site.pp b/manifests/site.pp
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -228,6 +228,11 @@
include role::swh_maven_index_exporter
}
+node /^elastic-worker\d+\.internal\.staging\.swh\.network$/ {
+ include role::swh_worker_elastic
+}
+
+
node default {
include role::swh_base
}
diff --git a/site-modules/profile/manifests/zfs/docker.pp b/site-modules/profile/manifests/zfs/docker.pp
new file mode 100644
--- /dev/null
+++ b/site-modules/profile/manifests/zfs/docker.pp
@@ -0,0 +1,25 @@
+# Handle /var/lib/docker partition as zfs mountpoint
+# To reduce the disk usage
+class profile::zfs::docker {
+ # zpool create -f data /dev/vdb
+ zpool {'data':
+ ensure => 'present',
+ disk => 'vdb',
+ }
+
+ # zfs create -o mountpoint=/var/lib/docker \
+ # -o atime=off \
+ # -o relatime=on \ # not supported by the following
+ # -o compression=zstd \
+ # data/docker
+
+ zfs { 'data/docker':
+ ensure => present,
+ atime => 'off',
+ compression => 'zstd',
+ mountpoint => '/var/lib/docker',
+ require => Zpool['data'],
+ notify => Service['docker'],
+ }
+ -> Package['docker']
+}
diff --git a/site-modules/role/manifests/swh_worker_elastic.pp b/site-modules/role/manifests/swh_worker_elastic.pp
new file mode 100644
--- /dev/null
+++ b/site-modules/role/manifests/swh_worker_elastic.pp
@@ -0,0 +1,4 @@
+class role::swh_worker_elastic inherits role::swh_base {
+ include profile::docker
+ include profile::zfs::docker
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 20, 8:02 PM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3225886
Attached To
D7600: Bootstrap elastic workers role
Event Timeline
Log In to Comment