Skip to content

Commit

Permalink
(role/ccs-dc) add s3daemon instances
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoblitt committed Nov 5, 2024
1 parent e6e3a38 commit 27afeb8
Show file tree
Hide file tree
Showing 18 changed files with 149 additions and 3 deletions.
1 change: 1 addition & 0 deletions hieradata/role/ccs-dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ classes:
- "profile::core::debugutils"
- "profile::core::nfsclient"
- "profile::core::sysctl::lhn"
- "s3daemon"

profile::ccs::common::sysctls: false

Expand Down
10 changes: 10 additions & 0 deletions hieradata/site/cp/cluster/auxtel-ccs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
s3daemon::instances:
cp-latiss:
s3_endpoint_url: "https://s3.cp.lsst.org"
port: 15570
image: "ghcr.io/lsst-dm/s3daemon:sha-e117c22"
s3dfrgw-latiss:
s3_endpoint_url: "https://s3dfrgw.slac.stanford.edu"
port: 15580
image: "ghcr.io/lsst-dm/s3daemon:sha-e117c22"
10 changes: 10 additions & 0 deletions hieradata/site/cp/cluster/comcam-ccs.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
---
profile::ccs::monitoring::mrtg: true

s3daemon::instances:
cp-comcam:
s3_endpoint_url: "https://s3.cp.lsst.org"
port: 15570
image: "ghcr.io/lsst-dm/s3daemon:sha-e117c22"
sdfembs3-comcam:
s3_endpoint_url: "https://sdfembs3.sdf.slac.stanford.edu"
port: 15580
image: "ghcr.io/lsst-dm/s3daemon:sha-e117c22"
10 changes: 10 additions & 0 deletions hieradata/site/ls/cluster/auxtel-ccs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,13 @@ clustershell::groupmembers:
#hcu: {group: "hcu", member: "auxtel-hcu01"}
#all: {group: "all", member: "@misc,@hcu"}
all: {group: "all", member: "@misc"}

s3daemon::instances:
ls-latiss:
s3_endpoint_url: "https://s3.ls.lsst.org"
port: 15570
image: "ghcr.io/lsst-dm/s3daemon:sha-e117c22"
s3dfrgw-latiss:
s3_endpoint_url: "https://s3dfrgw.slac.stanford.edu"
port: 15580
image: "ghcr.io/lsst-dm/s3daemon:sha-e117c22"
10 changes: 10 additions & 0 deletions hieradata/site/tu/cluster/auxtel-ccs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,13 @@ clustershell::groupmembers:
all: {group: "all", member: "auxtel-fp01,auxtel-mcm"}

postfix::relayhost: "[mail.lsst.org]:submission"

s3daemon::instances:
tu-latiss:
s3_endpoint_url: "https://s3.tu.lsst.org"
port: 15570
image: "ghcr.io/lsst-dm/s3daemon:sha-e117c22"
s3dfrgw-latiss:
s3_endpoint_url: "https://s3dfrgw.slac.stanford.edu"
port: 15580
image: "ghcr.io/lsst-dm/s3daemon:sha-e117c22"
5 changes: 5 additions & 0 deletions hieradata/site/tu/cluster/comcam-ccs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ clustershell::groupmembers:
all: {group: "all", member: "comcam-dc01,comcam-fp01,comcam-mcm"}

postfix::relayhost: "[mail.lsst.org]:submission"

s3daemon::instances:
tu-comcam:
s3_endpoint_url: "https://s3.tu.lsst.org"
port: 15570
8 changes: 8 additions & 0 deletions spec/fixtures/hieradata/site/cp/cluster/auxtel-ccs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
s3daemon::instances:
cp-latiss:
aws_access_key_id: "%{alias('s3daemon_test::aws_access_key_id')}"
aws_secret_access_key: "%{alias('s3daemon_test::aws_secret_access_key')}"
s3dfrgw-latiss:
aws_access_key_id: "%{alias('s3daemon_test::aws_access_key_id')}"
aws_secret_access_key: "%{alias('s3daemon_test::aws_secret_access_key')}"
8 changes: 8 additions & 0 deletions spec/fixtures/hieradata/site/cp/cluster/comcam-ccs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
s3daemon::instances:
cp-comcam:
aws_access_key_id: "%{alias('s3daemon_test::aws_access_key_id')}"
aws_secret_access_key: "%{alias('s3daemon_test::aws_secret_access_key')}"
sdfembs3-comcam:
aws_access_key_id: "%{alias('s3daemon_test::aws_access_key_id')}"
aws_secret_access_key: "%{alias('s3daemon_test::aws_secret_access_key')}"
8 changes: 8 additions & 0 deletions spec/fixtures/hieradata/site/ls/cluster/auxtel-ccs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
s3daemon::instances:
ls-latiss:
aws_access_key_id: "%{alias('s3daemon_test::aws_access_key_id')}"
aws_secret_access_key: "%{alias('s3daemon_test::aws_secret_access_key')}"
s3dfrgw-latiss:
aws_access_key_id: "%{alias('s3daemon_test::aws_access_key_id')}"
aws_secret_access_key: "%{alias('s3daemon_test::aws_secret_access_key')}"
8 changes: 8 additions & 0 deletions spec/fixtures/hieradata/site/tu/cluster/auxtel-ccs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
s3daemon::instances:
tu-latiss:
aws_access_key_id: "%{alias('s3daemon_test::aws_access_key_id')}"
aws_secret_access_key: "%{alias('s3daemon_test::aws_secret_access_key')}"
s3dfrgw-latiss:
aws_access_key_id: "%{alias('s3daemon_test::aws_access_key_id')}"
aws_secret_access_key: "%{alias('s3daemon_test::aws_secret_access_key')}"
5 changes: 5 additions & 0 deletions spec/fixtures/hieradata/site/tu/cluster/comcam-ccs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
s3daemon::instances:
tu-comcam:
aws_access_key_id: "%{alias('s3daemon_test::aws_access_key_id')}"
aws_secret_access_key: "%{alias('s3daemon_test::aws_secret_access_key')}"
8 changes: 8 additions & 0 deletions spec/hosts/nodes/auxtel-dc01.ls.lsst.org_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@

it { is_expected.to compile.with_all_deps }

it do

Check failure on line 32 in spec/hosts/nodes/auxtel-dc01.ls.lsst.org_spec.rb

View workflow job for this annotation

GitHub Actions / rake_checks

auxtel-dc01.ls.lsst.org on almalinux-8-x86_64 is expected to contain S3daemon::Instance[ls-latiss] with s3_endpoint_url => "https://s3.ls.lsst.org", port => 15570 and image => "ghcr.io/lsst-dm/s3daemon:sha-e117c22" Failure/Error: is_expected.to contain_s3daemon__instance('ls-latiss').with( s3_endpoint_url: 'https://s3.ls.lsst.org', port: 15_570, image: 'ghcr.io/lsst-dm/s3daemon:sha-e117c22' ) expected that the catalogue would contain S3daemon::Instance[ls-latiss]

Check failure on line 32 in spec/hosts/nodes/auxtel-dc01.ls.lsst.org_spec.rb

View workflow job for this annotation

GitHub Actions / rake_checks

auxtel-dc01.ls.lsst.org on almalinux-9-x86_64 is expected to contain S3daemon::Instance[ls-latiss] with s3_endpoint_url => "https://s3.ls.lsst.org", port => 15570 and image => "ghcr.io/lsst-dm/s3daemon:sha-e117c22" Failure/Error: is_expected.to contain_s3daemon__instance('ls-latiss').with( s3_endpoint_url: 'https://s3.ls.lsst.org', port: 15_570, image: 'ghcr.io/lsst-dm/s3daemon:sha-e117c22' ) expected that the catalogue would contain S3daemon::Instance[ls-latiss]
is_expected.to contain_s3daemon__instance('ls-latiss').with(
s3_endpoint_url: 'https://s3.ls.lsst.org',
port: 15_570,
image: 'ghcr.io/lsst-dm/s3daemon:sha-e117c22'
)
end

include_examples 'baremetal'
include_context 'with nm interface'
it { is_expected.to have_nm__connection_resource_count(10) }
Expand Down
19 changes: 18 additions & 1 deletion spec/hosts/nodes/auxtel-dc01.tu.lsst.org_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,30 @@
end
let(:node_params) do
{
role: 'generic',
role: 'ccs-dc',
cluster: 'auxtel-ccs',
site: 'tu',
}
end

it { is_expected.to compile.with_all_deps }

it do
is_expected.to contain_s3daemon__instance('tu-latiss').with(
s3_endpoint_url: 'https://s3.tu.lsst.org',
port: 15_570,
image: 'ghcr.io/lsst-dm/s3daemon:sha-e117c22'
)
end

it do
is_expected.to contain_s3daemon__instance('s3dfrgw-latiss').with(
s3_endpoint_url: 'https://s3dfrgw.slac.stanford.edu',
port: 15_580,
image: 'ghcr.io/lsst-dm/s3daemon:sha-e117c22'
)
end

include_examples 'baremetal'
include_context 'with nm interface'
it { is_expected.to have_nm__connection_resource_count(3) }
Expand Down
10 changes: 9 additions & 1 deletion spec/hosts/nodes/auxtel-fp01.ls.lsst.org_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

describe 'auxtel-fp01.ls.lsst.org', :sitepp do
on_supported_os.each do |os, os_facts|
next if os =~ %r{centos-7-x86_64}
next unless os =~ %r{almalinux-9-x86_64}

context "on #{os}" do
let(:node_params) do
Expand All @@ -29,6 +29,14 @@

it { is_expected.to compile.with_all_deps }

it do

Check failure on line 32 in spec/hosts/nodes/auxtel-fp01.ls.lsst.org_spec.rb

View workflow job for this annotation

GitHub Actions / rake_checks

auxtel-fp01.ls.lsst.org on almalinux-9-x86_64 is expected to contain S3daemon::Instance[s3dfrgw-latiss] with s3_endpoint_url => "https://s3dfrgw.slac.stanford.edu", port => 15580 and image => "ghcr.io/lsst-dm/s3daemon:sha-e117c22" Failure/Error: is_expected.to contain_s3daemon__instance('s3dfrgw-latiss').with( s3_endpoint_url: 'https://s3dfrgw.slac.stanford.edu', port: 15_580, image: 'ghcr.io/lsst-dm/s3daemon:sha-e117c22' ) expected that the catalogue would contain S3daemon::Instance[s3dfrgw-latiss]
is_expected.to contain_s3daemon__instance('s3dfrgw-latiss').with(
s3_endpoint_url: 'https://s3dfrgw.slac.stanford.edu',
port: 15_580,
image: 'ghcr.io/lsst-dm/s3daemon:sha-e117c22'
)
end

include_examples 'baremetal'
include_context 'with nm interface'
it { is_expected.to have_nm__connection_resource_count(10) }
Expand Down
18 changes: 17 additions & 1 deletion spec/hosts/nodes/comcam-dc01.cp.lsst.org_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,29 @@
let(:node_params) do
{
role: 'ccs-dc',
cluster: 'lsstcam-ccs',
cluster: 'comcam-ccs',
site: 'cp',
}
end

it { is_expected.to compile.with_all_deps }

it do
is_expected.to contain_s3daemon__instance('cp-comcam').with(
s3_endpoint_url: 'https://s3.cp.lsst.org',
port: 15_570,
image: 'ghcr.io/lsst-dm/s3daemon:sha-e117c22'
)
end

it do
is_expected.to contain_s3daemon__instance('sdfembs3-comcam').with(
s3_endpoint_url: 'https://sdfembs3.sdf.slac.stanford.edu',
port: 15_580,
image: 'ghcr.io/lsst-dm/s3daemon:sha-e117c22'
)
end

include_examples 'baremetal'
include_context 'with nm interface'
it { is_expected.to have_nm__connection_resource_count(7) }
Expand Down
8 changes: 8 additions & 0 deletions spec/hosts/nodes/comcam-dc01.tu.lsst.org_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@

it { is_expected.to compile.with_all_deps }

it do

Check failure on line 30 in spec/hosts/nodes/comcam-dc01.tu.lsst.org_spec.rb

View workflow job for this annotation

GitHub Actions / rake_checks

comcam-dc01.tu.lsst.org on almalinux-9-x86_64 is expected to contain S3daemon::Instance[tu-comcam] with s3_endpoint_url => "https://s3.tu.lsst.org", port => 15570 and image => "ghcr.io/lsst-dm/s3daemon:sha-e117c22" Failure/Error: is_expected.to contain_s3daemon__instance('tu-comcam').with( s3_endpoint_url: 'https://s3.tu.lsst.org', port: 15_570, image: 'ghcr.io/lsst-dm/s3daemon:sha-e117c22' ) expected that the catalogue would contain S3daemon::Instance[tu-comcam] with image set to "ghcr.io/lsst-dm/s3daemon:sha-e117c22" but it is set to "ghcr.io/lsst-dm/s3daemon:main"
is_expected.to contain_s3daemon__instance('tu-comcam').with(
s3_endpoint_url: 'https://s3.tu.lsst.org',
port: 15_570,
image: 'ghcr.io/lsst-dm/s3daemon:sha-e117c22'
)
end

include_examples 'baremetal'
include_context 'with nm interface'

Expand Down
1 change: 1 addition & 0 deletions spec/hosts/roles/ccs_dc_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
include_examples('ccs common', os_facts:)
include_examples('x2go packages', os_facts:)
include_examples 'lhn sysctls'
include_examples 's3daemon'

%w[
ccs_daq
Expand Down
5 changes: 5 additions & 0 deletions spec/support/spec/s3daemon.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

shared_examples 's3daemon' do
it { is_expected.to contain_class('s3daemon') }
end

0 comments on commit 27afeb8

Please sign in to comment.