Skip to content

Commit 40d3b38

Browse files
authored
Merge pull request #48 from lsst-it/IT-5565/ccs-ocs-lfa
Add option to write lfa.properties file
2 parents 3c24608 + 03b0426 commit 40d3b38

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

REFERENCE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ The following parameters are available in the `ccs_sal` class:
3535
* [`kafka_sasl_username`](#-ccs_sal--kafka_sasl_username)
3636
* [`kafka_sasl_password`](#-ccs_sal--kafka_sasl_password)
3737
* [`kafka_templates_directory`](#-ccs_sal--kafka_templates_directory)
38+
* [`lfa`](#-ccs_sal--lfa)
3839
* [`prefix_service`](#-ccs_sal--prefix_service)
3940
* [`rpm_repo`](#-ccs_sal--rpm_repo)
4041
* [`rpm_requirements`](#-ccs_sal--rpm_requirements)
@@ -155,6 +156,15 @@ String giving location of templates directory
155156

156157
Default value: `'/home/tonyj/avro-templates'`
157158

159+
##### <a name="-ccs_sal--lfa"></a>`lfa`
160+
161+
Data type: `Hash`
162+
163+
Hash of properties (id, secret, endpoint, bucket) for large file
164+
annex (lfa) configuration.
165+
166+
Default value: `{}`
167+
158168
##### <a name="-ccs_sal--prefix_service"></a>`prefix_service`
159169

160170
Data type: `Boolean`

manifests/etc.pp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,16 @@
103103
mode => '0644',
104104
}
105105
}
106+
107+
$lfa = $ccs_sal::lfa
108+
109+
unless empty($lfa) {
110+
file { "${dir}/lfa.properties":
111+
ensure => file,
112+
owner => 'ccs',
113+
group => 'ccsadm',
114+
mode => '0660',
115+
content => epp("${ptitle}/lfa.epp", $lfa ),
116+
}
117+
}
106118
}

manifests/init.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
# String giving SASL password
3232
# @param kafka_templates_directory
3333
# String giving location of templates directory
34+
# @param lfa
35+
# Hash of properties (id, secret, endpoint, bucket) for large file
36+
# annex (lfa) configuration.
3437
# @param prefix_service
3538
# Boolean; if false do not prefix systemctl services with the instrument.
3639
# Also applies to the .app files in /etc/ccs.
@@ -63,6 +66,7 @@
6366
String $kafka_sasl_password = 'password',
6467
String $kafka_sasl_username = 'username',
6568
String $kafka_templates_directory = '/home/tonyj/avro-templates', # FIXME
69+
Hash $lfa = {},
6670
Boolean $prefix_service = true,
6771
## Old: http://www.slac.stanford.edu/~gmorris/lsst/pkgarchive
6872
String $rpm_repo = 'https://repo-nexus.lsst.org/nexus/repository/ts_yum/releases',

templates/lfa.epp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<%- | Variant[Sensitive[String],String] $id,
2+
Variant[Sensitive[String],String] $secret,
3+
String $endpoint,
4+
String $bucket,
5+
| -%>
6+
# This file is managed by Puppet; changes may be overwritten.
7+
id: <%= $id %>
8+
secret: <%= $secret %>
9+
endpoint: <%= $endpoint %>
10+
bucket: <%= $bucket %>

0 commit comments

Comments
 (0)