diff --git a/data/common/common.yaml b/data/common/common.yaml --- a/data/common/common.yaml +++ b/data/common/common.yaml @@ -409,6 +409,11 @@ shell: /bin/false groups: - gitorious + hedgedoc: + uid: 6000 + shell: /bin/bash + groups: + - hedgedoc fiendish: uid: 1011 full_name: Avi Kelman @@ -622,6 +627,8 @@ gid: 1010 gitorious: gid: 5000 + hedgedoc: + gid: 6000 swhdeposit: gid: 1018 swhvault: 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,23 @@ +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 + +swh::postgresql::shared_buffers: 4GB + +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 @@ -48,6 +48,8 @@ kafka::cluster::public_network: 10.168.130.0/24 +swh::postgresql::shared_buffers: 2GB + static_hostnames: 10.168.100.18: host: banco.internal.softwareheritage.org 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 +}