diff --git a/puppet/zulip_ops/manifests/apt_repository_debathena.pp b/puppet/zulip_ops/manifests/apt_repository_debathena.pp new file mode 100644 index 0000000000..d8251cf4a8 --- /dev/null +++ b/puppet/zulip_ops/manifests/apt_repository_debathena.pp @@ -0,0 +1,6 @@ +class zulip_ops::apt_repository_debathena { + $setup_file = "${::scripts_path}/lib/setup-apt-repo-debathena" + exec { 'setup_apt_repo_debathena': + command => "bash -c '${setup_file}'", + } +} diff --git a/puppet/zulip_ops/manifests/zmirror.pp b/puppet/zulip_ops/manifests/zmirror.pp index 7362acb3a6..59c04f86b9 100644 --- a/puppet/zulip_ops/manifests/zmirror.pp +++ b/puppet/zulip_ops/manifests/zmirror.pp @@ -1,5 +1,6 @@ class zulip_ops::zmirror { include zulip_ops::base + include zulip_ops::apt_repository_debathena include zulip::supervisor $zmirror_packages = [# Packages needed to run the mirror @@ -17,7 +18,10 @@ class zulip_ops::zmirror { 'cython3', 'cython', ] - package { $zmirror_packages: ensure => 'installed' } + package { $zmirror_packages: + ensure => 'installed', + require => Exec['setup_apt_repo_debathena'], + } apt::source {'debathena': location => 'http://debathena.mit.edu/apt', diff --git a/puppet/zulip_ops/manifests/zmirror_personals.pp b/puppet/zulip_ops/manifests/zmirror_personals.pp index 673e251df4..264b3fd0b0 100644 --- a/puppet/zulip_ops/manifests/zmirror_personals.pp +++ b/puppet/zulip_ops/manifests/zmirror_personals.pp @@ -1,5 +1,6 @@ class zulip_ops::zmirror_personals { include zulip_ops::base + include zulip_ops::apt_repository_debathena include zulip::supervisor $zmirror_packages = [# Packages needed to run the mirror @@ -17,16 +18,11 @@ class zulip_ops::zmirror_personals { 'cython3', 'cython', ] - package { $zmirror_packages: ensure => 'installed' } - - apt::source {'debathena': - location => 'http://debathena.mit.edu/apt', - release => 'xenial', - repos => 'debathena debathena-config', - key => 'D1CD49BDD30B677273A75C66E4EE62700D8A9E8F', - key_source => 'https://debathena.mit.edu/apt/debathena-archive.asc', - include_src => true, + package { $zmirror_packages: + ensure => 'installed', + require => Exec['setup_apt_repo_debathena'], } + file { ['/home/zulip/api-keys', '/home/zulip/zephyr_sessions', '/home/zulip/ccache', '/home/zulip/mirror_status']: ensure => directory,