-
Notifications
You must be signed in to change notification settings - Fork 3
/
hostsfile_controlhub
91 lines (74 loc) · 4.79 KB
/
hostsfile_controlhub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
all:
children:
controlhub:
hosts: # Where the ansible script will run, not the URI of the StreamSets Control Hub.
localhost
vars:
# REQUIRED SETTINGS
# ENVIRONMENT VARIABLES
# Set your CRED_ID and CRED_TOKEN here or set environment variables CRED_ID and CRED_TOKEN
CRED_TOKEN: "{{ lookup('env', 'CRED_TOKEN') | default('YOU MUST SET YOUR CRED_TOKEN', true) }}"
CRED_ID: "{{ lookup('env','CRED_ID')|default('YOU MUST SET YOUR CRED_ID', true) }}"
STREAMSETS_SCH_URL: "{{ lookup('env', 'STREAMSETS_SCH_URL') | default('http://localhost:18631', true) }}"
ENVIRONMENT_ID: "{{ lookup('env', 'STREAMSETS_ENV_ID') | default('Environment ID must be configured.', true) }}"
# CONFIGURATIONS WITH DEFAULT VALUES
ENGINE_TYPE: "{{ lookup('env', 'STREAMSETS_ENGINE_TYPE') | default('DC' , true) }}"
ENGINE_VERSION_DC: "{{ lookup('env', 'STREAMSETS_ENGINE_VERSION') | default('4.3.0' , true) }}"
ENGINE_VERSION_TF: "{{ lookup('env', 'STREAMSETS_ENGINE_VERSION') | default('4.2.0' , true) }}"
INSTALL_TYPE: "{{ lookup('env', 'STREAMSETS_INSTALL_TYPE') | default('DOCKER', true) }}" # DOCKER or TARBALL
BUILD_NUMBER: "{{ lookup('env', 'STREAMSETS_BUILD_NUMBER') | default('Released' , true) }}" # Released or a number
SCALA_BINARY_VERSION: "{{ lookup('env', 'STREAMSETS_SCALA_BINARY_VERSION') | default('2.12' , true) }}" # "2.11" or "2.12"
NEW_DEPLOYMENT_NAME_BASE: "{{ lookup('env', 'STREAMSETS_NEW_DEPLOYMENT_NAME_BASE') | default('NewDeployment' , true) }}" # "2.11" or "2.12"
# OPTIONAL SETTINGS:
DEPLOYMENT_TAGS: "{{ lookup('env', 'STREAMSETS_DEPLOYMENT_TAGS' ) }}"
ENGINE_LABELS: "{{ lookup('env', 'STREAMSETS_ENGINE_LABELS' ) }}"
DEPLOYMENT_HTTP_HEADERS_DICT: {
"X-Requested-By":"User",
"X-SS-REST-CALL":"true",
"X-SS-App-Auth-Token":"{{CRED_TOKEN}}",
"X-SS-App-Component-Id":"{{CRED_ID}}",
"Content-type":"application/json",
}
ADVANCED_HTTP_HEADERS_DICT: {
"X-Requested-By":"User",
"X-SS-REST-CALL":"true",
"X-SS-App-Auth-Token":"{{CRED_TOKEN}}",
"X-SS-App-Component-Id":"{{CRED_ID}}",
}
ADVANCED_HTTP_HEADERS: >-
--header "X-Requested-By:User"
--header "X-SS-REST-CALL:true"
--header "X-SS-App-Auth-Token:{{CRED_TOKEN}}"
--header "X-SS-App-Component-Id:{{CRED_ID}}"
CREATE_DEPLOYMENT_URL: >-
{{ STREAMSETS_SCH_URL }}/provisioning/rest/v1/csp/deployments
UPDATE_DEPLOYMENT_URL: >-
{{ STREAMSETS_SCH_URL }}/provisioning/rest/v1/csp/deployment/{{ DEPLOYMENT_ID }}
COMPLETE_DEPLOYMENT_URL: >-
{{ STREAMSETS_SCH_URL }}/provisioning/rest/v1/csp/deployment/{{ DEPLOYMENT_ID }}?complete=true&processIfEnabled=true
START_DEPLOYMENT_URL: >-
{{ STREAMSETS_SCH_URL }}/provisioning/rest/v1/csp/deployment/{{ DEPLOYMENT_ID }}/start
UPDATE_ADVANCED_CONFIGURATION_URL: >-
{{ STREAMSETS_SCH_URL }}/provisioning/rest/v1/csp/deployment/{{ DEPLOYMENT_ID }}/advancedConfiguration
CREATE_DEPLOYMENT_BINARY_DATA: >-
{"name": "{{ NEW_DEPLOYMENT_NAME }}",
"engineType": "{{ ENGINE_TYPE }}",
"engineVersion": "{{ ENGINE_VERSION }}",
"engineVersionId": "{{ ENGINE_VERSION_ID }}",
"envId": "{{ ENVIRONMENT_ID }}",
"rawDeploymentTags": [],
"type": "SELF" }
GET_INSTALL_COMMAND_URL: >-
{{ STREAMSETS_SCH_URL }}/provisioning/rest/v1/csp/deployment/self/{{ DEPLOYMENT_ID }}/installCommand?installMechanism=BACKGROUND
engines:
hosts:
localhost:
remote_user: susannah
ansible_connection: local
# remote_user: ec2-user
vars:
INSTALL_TYPE: "{{ lookup('env', 'STREAMSETS_INSTALL_TYPE') | default('TARBALL', true) }}" # DOCKER or TARBALL
# INSTALL_TYPE must be defined for both hosts groups, and it must be the same
STREAMSETS_DOWNLOAD_DIR: "{{ lookup('env', 'STREAMSETS_DOWNLOAD_DIR') | default('/tmp/streamsets_download', true) }}"
STREAMSETS_INSTALL_DIR: "{{ lookup('env', 'STREAMSETS_INSTALL_DIR') | default('/tmp/streamsets_install', true) }}"