c2221d938c4a36901404257f71e6c0ad7cd4d9f3
[yaml_builds.git] / site / site30 / baremetal / promjoin.yaml
1 ---
2 ##############################################################################
3 # Copyright © 2018 AT&T Intellectual Property. All rights reserved.          #
4 #                                                                            #
5 # Licensed under the Apache License, Version 2.0 (the "License"); you may    #
6 # not use this file except in compliance with the License.                   #
7 #                                                                            #
8 # You may obtain a copy of the License at                                    #
9 #       http://www.apache.org/licenses/LICENSE-2.0                           #
10 #                                                                            #
11 # Unless required by applicable law or agreed to in writing, software        #
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
14 # See the License for the specific language governing permissions and        #
15 # limitations under the License.                                             #
16 ##############################################################################
17
18 schema: 'drydock/BootAction/v1'
19 metadata:
20   schema: 'metadata/Document/v1'
21   name: promjoin
22   storagePolicy: 'cleartext'
23   layeringDefinition:
24     abstract: false
25     layer: site
26   labels:
27     application: 'drydock'
28 data:
29   signaling: false
30   node_filter:
31     filter_set_type: 'union'
32     filter_set:
33       - filter_type: 'union'
34         node_names:
35           - 'aknode31'
36           - 'aknode32'
37           - 'aknode33'
38           - 'aknode34'
39   # TODO(alanmeadows) move what is global about this document - everything except nodenames to global
40   assets:
41     - path: /opt/promjoin.sh
42       type: file
43       permissions: '555'
44       # TODO(alanmeadows) You must replace the ip= parameter below with the appropriate MaaS network name of the network
45       # you should use to contact kubernetes in the case below, this is cab24_mgmt
46       location: promenade+http://promenade-api.ucp.svc.cluster.local/api/v1.0/join-scripts?design_ref={{ action.design_ref | urlencode }}&hostname={{ node.hostname }}&ip={{ node.network.calico.ip }}{% for k, v in node.labels.items() %}&labels.dynamic={{ k }}={{ v }}{% endfor %}
47       location_pipeline:
48 #originally rack06_calico
49         - template
50       data_pipeline:
51         - utf8_decode
52     - path: /lib/systemd/system/promjoin.service
53       type: unit
54       permissions: '600'
55       data: |-
56         W1VuaXRdCkRlc2NyaXB0aW9uPVByb21lbmFkZSBJbml0aWFsaXphdGlvbiBTZXJ2aWNlCkFmdGVy
57         PW5ldHdvcmstb25saW5lLnRhcmdldCBsb2NhbC1mcy50YXJnZXQKQ29uZGl0aW9uUGF0aEV4aXN0
58         cz0hL3Zhci9saWIvcHJvbS5kb25lCgpbU2VydmljZV0KVHlwZT1zaW1wbGUKRXhlY1N0YXJ0PS9v
59         cHQvcHJvbWpvaW4uc2gKCltJbnN0YWxsXQpXYW50ZWRCeT1tdWx0aS11c2VyLnRhcmdldAo=
60       data_pipeline:
61         - base64_decode
62         - utf8_decode
63 ...