diff --git a/data/deployments/production/common.yaml b/data/deployments/production/common.yaml --- a/data/deployments/production/common.yaml +++ b/data/deployments/production/common.yaml @@ -17,3 +17,4 @@ elasticsearch::jvm_options::heap_size: 16g +swh::postgresql::shared_buffers: 4GB diff --git a/data/deployments/production/vagrant.yaml b/data/deployments/production/vagrant.yaml --- a/data/deployments/production/vagrant.yaml +++ b/data/deployments/production/vagrant.yaml @@ -1 +1,3 @@ elasticsearch::jvm_options::heap_size: 512m + +swh::postgresql::shared_buffers: 128MB diff --git a/data/hostname/bardo.softwareheritage.org.yaml b/data/hostname/bardo.softwareheritage.org.yaml new file mode 100644 --- /dev/null +++ b/data/hostname/bardo.softwareheritage.org.yaml @@ -0,0 +1,32 @@ +groups: + hedgedoc: + gid: 6000 + +users: + hedgedoc: + uid: 6000 + shell: /bin/bash + groups: + - hedgedoc + +swh::postgresql::version: '12' +swh::postgresql::port: 5433 +swh::postgresql::cluster_name: "%{lookup('swh::postgresql::version')}/main" +swh::postgresql::datadir_base: "%{lookup('swh::base_directory')}/postgres" +swh::postgresql::datadir: "%{lookup('swh::postgresql::datadir_base')}/%{lookup('swh::postgresql::cluster_name')}" +swh::postgresql::listen_addresses: + - 0.0.0.0 +swh::postgresql::network_accesses: + - 192.168.100.0/24 # Monitoring + - 192.168.130.0/24 # Staging services + +postgresql::globals::version: "%{alias('swh::postgresql::version')}" + +postgresql::server::config_entries: + shared_buffers: "%{alias('swh::postgresql::shared_buffers')}" + cluster_name: "%{alias('swh::postgresql::cluster_name')}" + +swh::dbs: + hedgedoc: + name: hedgedoc + user: hedgedoc diff --git a/data/subnets/vagrant.yaml b/data/subnets/vagrant.yaml --- a/data/subnets/vagrant.yaml +++ b/data/subnets/vagrant.yaml @@ -49,6 +49,8 @@ kafka::cluster::public_network: 10.168.130.0/24 static_hostnames: + 10.168.50.10: + host: bardo.softwareheritage.org 10.168.100.18: host: banco.internal.softwareheritage.org aliases: diff --git a/manifests/site.pp b/manifests/site.pp --- a/manifests/site.pp +++ b/manifests/site.pp @@ -133,6 +133,10 @@ include profile::postgresql::client } +node bardo.softwareheritage.org { + include role::swh_hedgedoc +} + node 'scheduler0.internal.staging.swh.network' { include role::swh_scheduler include profile::postgresql::client diff --git a/site-modules/profile/manifests/hedgedoc.pp b/site-modules/profile/manifests/hedgedoc.pp new file mode 100644 --- /dev/null +++ b/site-modules/profile/manifests/hedgedoc.pp @@ -0,0 +1,10 @@ +# deploy a hedgedoc instance +class profile::hedgedoc { + + $packages = [ + 'npm', 'yarnpkg', 'node-gyp' + ] + + ensure_packages ( $packages ) + +} diff --git a/site-modules/role/manifests/swh_hedgedoc.pp b/site-modules/role/manifests/swh_hedgedoc.pp new file mode 100644 --- /dev/null +++ b/site-modules/role/manifests/swh_hedgedoc.pp @@ -0,0 +1,4 @@ +class role::swh_hedgedoc inherits role::swh_database { + include profile::postgresql::server + include profile::hedgedoc +}