-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathapployer.yml
110 lines (101 loc) · 3.28 KB
/
apployer.yml
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
- hosts: localhost
vars_files:
- "defaults/proxy.yml"
vars:
workspace: "{{ ansible_env['HOME'] }}"
apployer_path: "{{ workspace }}/apployer"
artifacts_path: "https://s3.amazonaws.com/trustedanalytics/{{ release_version }}/artifacts"
kerberos_enabled: False
org: trustedanalytics
space: platform
tasks:
- name: create folder for apps
file:
path: "{{ workspace }}/apps"
state: directory
- name: get artifacts
get_url:
url: "{{ artifacts_path }}/{{ item }}.zip"
dest: "{{ workspace }}/apps"
with_items:
- app-dependency-discoverer
- app-launcher-helper
- application-broker
- atk
- auth-gateway
- auth-proxy
- console
- data-acquisition
- data-catalog
- dataset-publisher
- demiurge
- downloader
- gateway
- gearpump-broker
- gearpump-dashboard
- h2o-broker
- h2o-scoring-engine-publisher
- hbase-broker
- hdfs-broker
- hive-broker
- kubernetes-broker
- latest-events-service
- metadata-parser
- metrics-provider
- h2o-model-catalog
- platform-context
- platform-operations
- platform-snapshot
- platform-tests
- router-metrics-provider
- scoring-engine
- scoring-pipelines
- service-catalog
- service-exposer
- tap-java-buildpack
- uploader
- user-management
- workflow-scheduler
- wssb
- yarn-broker
- zookeeper-broker
environment: proxy_env
- name: get apployer
get_url:
url: "{{ artifacts_path }}/apployer.zip"
dest: "{{ workspace }}/apployer.zip"
environment: proxy_env
- name: create folder for apployer
file:
path: "{{ apployer_path }}"
state: directory
- name: unarchive apployer
unarchive:
src: "{{ workspace }}/apployer.zip"
dest: "{{ apployer_path }}"
- name: install apployer requirements in virtualenv
pip:
virtualenv: "{{ apployer_path }}/env"
requirements: "{{ apployer_path }}/requirements.txt"
environment: proxy_env
- name: install apployer to virtualenv
shell: . env/bin/activate && python setup.py build && python setup.py install
args:
chdir: "{{ apployer_path }}"
executable: /bin/bash
- replace:
dest: "{{ apployer_path }}/fetcher_config.yml"
regexp: "{{ item.regexp }}"
replace: "{{ item.replace }}"
with_items:
- { regexp: "hostname.+$", replace: "hostname: localhost" }
- { regexp: "username.+$", replace: "username: ubuntu" }
- { regexp: "kerberos_used.+$", replace: "kerberos_used: {{ kerberos_enabled|default('False') }}" }
- { regexp: "kubernetes_used.+$", replace: "kubernetes_used: {{ kubernetes_enabled|default('False') }}" }
- { regexp: "envname.+$", replace: "envname: envname" }
- name: run apployer
shell: . env/bin/activate && apployer deploy -p {{ cf_password }} -o {{ org }} -s {{ space }} {{ workspace }}/apps/ https://cf-api.{{ cf_domain }}
args:
chdir: "{{ apployer_path }}"
executable: /bin/bash
# vi:et:sw=2 ts=2 sts=2 ft=ansible