From 7bdf4eff9fdaaf1aaf87ae147f6bc260eae0f516 Mon Sep 17 00:00:00 2001 From: Carlos Barria Date: Tue, 30 Apr 2024 10:38:12 -0700 Subject: [PATCH] (role/htcondor) update environment vars --- hieradata/role/htcondor.yaml | 14 ++++++++++++-- spec/hosts/roles/htcondor_spec.rb | 23 +++++++++++++++++++++-- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/hieradata/role/htcondor.yaml b/hieradata/role/htcondor.yaml index cb4ec54eea..f434a69527 100644 --- a/hieradata/role/htcondor.yaml +++ b/hieradata/role/htcondor.yaml @@ -10,7 +10,17 @@ packages: files: /etc/profile.d/rubin.sh: ensure: "file" - mode: "0600" - content: "export DAF_BUTLER_REPOSITORY_INDEX=/project/data-repos.yaml" + mode: "0644" + content: | + export DAF_BUTLER_REPOSITORY_INDEX=/project/data-repos.yaml + export PGPASSFILE=/rsphome/$USER/.lsst/postgres-credentials.txt + export PGUSER=oods + export AWS_SHARED_CREDENTIALS_FILE=/rsphome/$USER/.lsst/aws-credentials.ini + /data/lsstdata/base/comcam: + ensure: "link" + target: "/readonly/lsstdata/comcam/base/comcam" + /data/lsstdata/base/auxtel: + ensure: "link" + target: "/readonly/lsstdata/auxtel/base/auxtel" htcondor::htcondor_version: "23.0" diff --git a/spec/hosts/roles/htcondor_spec.rb b/spec/hosts/roles/htcondor_spec.rb index c3a1039779..0e761c0eb2 100644 --- a/spec/hosts/roles/htcondor_spec.rb +++ b/spec/hosts/roles/htcondor_spec.rb @@ -41,8 +41,13 @@ it do is_expected.to contain_file('/etc/profile.d/rubin.sh').with( ensure: 'file', - mode: '0600', - content: 'export DAF_BUTLER_REPOSITORY_INDEX=/project/data-repos.yaml', + mode: '0644', + content: <<~CONTENT + export DAF_BUTLER_REPOSITORY_INDEX=/project/data-repos.yaml + export PGPASSFILE=/rsphome/$USER/.lsst/postgres-credentials.txt + export PGUSER=oods + export AWS_SHARED_CREDENTIALS_FILE=/rsphome/$USER/.lsst/aws-credentials.ini + CONTENT ) end @@ -174,6 +179,20 @@ atboot: true, ) end + + it do + is_expected.to contain_file('/data/lsstdata/base/comcam').with( + ensure: 'link', + target: '/readonly/lsstdata/comcam/base/comcam', + ) + end + + it do + is_expected.to contain_file('/data/lsstdata/base/auxtel').with( + ensure: 'link', + target: '/readonly/lsstdata/auxtel/base/auxtel', + ) + end end end end # host