-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.html
177 lines (166 loc) · 19.1 KB
/
config.html
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<html><head><title>Orkestra: Config</title><meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="author" content="tech.orkestra" /><meta name="description" content="Functional DevOps with Scala and Kubernetes" /><meta name="og:image" content="/img/poster.png" /><meta name="og:title" content="Orkestra: Config" /><meta name="og:site_name" content="Orkestra" /><meta name="og:url" content="https://orkestra.tech" /><meta name="og:type" content="website" /><meta name="og:description" content="Functional DevOps with Scala and Kubernetes" /><link rel="icon" type="image/png" href="/img/favicon.png" /><meta name="twitter:title" content="Orkestra: Config" /><meta name="twitter:image" content="https://orkestra.techimg/poster.png" /><meta name="twitter:description" content="Functional DevOps with Scala and Kubernetes" /><meta name="twitter:card" content="summary_large_image" /><link rel="icon" type="image/png" sizes="16x16" href="/img/favicon16x16.png" /><link rel="icon" type="image/png" sizes="24x24" href="/img/favicon24x24.png" /><link rel="icon" type="image/png" sizes="32x32" href="/img/favicon32x32.png" /><link rel="icon" type="image/png" sizes="48x48" href="/img/favicon48x48.png" /><link rel="icon" type="image/png" sizes="57x57" href="/img/favicon57x57.png" /><link rel="icon" type="image/png" sizes="60x60" href="/img/favicon60x60.png" /><link rel="icon" type="image/png" sizes="64x64" href="/img/favicon64x64.png" /><link rel="icon" type="image/png" sizes="70x70" href="/img/favicon70x70.png" /><link rel="icon" type="image/png" sizes="72x72" href="/img/favicon72x72.png" /><link rel="icon" type="image/png" sizes="76x76" href="/img/favicon76x76.png" /><link rel="icon" type="image/png" sizes="96x96" href="/img/favicon96x96.png" /><link rel="icon" type="image/png" sizes="114x114" href="/img/favicon114x114.png" /><link rel="icon" type="image/png" sizes="120x120" href="/img/favicon120x120.png" /><link rel="icon" type="image/png" sizes="128x128" href="/img/favicon128x128.png" /><link rel="icon" type="image/png" sizes="144x144" href="/img/favicon144x144.png" /><link rel="icon" type="image/png" sizes="150x150" href="/img/favicon150x150.png" /><link rel="icon" type="image/png" sizes="152x152" href="/img/favicon152x152.png" /><link rel="icon" type="image/png" sizes="196x196" href="/img/favicon196x196.png" /><link rel="icon" type="image/png" sizes="310x310" href="/img/favicon310x310.png" /><link rel="icon" type="image/png" sizes="310x150" href="/img/favicon310x150.png" /><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" /><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" /><link rel="stylesheet" href="/highlight/styles/atom-one-light.css" /><link rel="stylesheet" href="/css/style.css" /><link rel="stylesheet" href="/css/palette.css" /><link rel="stylesheet" href="/css/codemirror.css" /><link rel="stylesheet" href="/css/override.css" /></head><body class="docs"><div id="wrapper"><div id="sidebar-wrapper"><ul id="sidebar" class="sidebar-nav"><li class="sidebar-brand"><a href="/" class="brand"><div class="brand-wrapper"><span>Orkestra</span></div></a></li> <li><a href="/jobsboards.html" class="">Jobs & Boards</a></li> <li><a href="/config.html" class=" active ">Config</a></li> <li><a href="/parameters.html" class="">Parameters</a></li> <li><a href="/stages.html" class="">Stages</a></li> <li><a href="/shells.html" class="">Shell scripts</a></li> <li><a href="/directories.html" class="">Directories</a></li> <li><a href="/secrets.html" class="">Secrets</a></li> <li><a href="/triggers.html" class="">Triggering jobs</a></li> <li><a href="/runid.html" class="">RunId</a></li> <li><a href="/containers.html" class="">Containers</a></li> <li><a href="/plugins" class="">Plugins</a> <ul class="sub_section"> <li><a href="/plugins/github.html" class="">Github</a></li> <li><a href="/plugins/cron.html" class="">Cron jobs</a></li> <li><a href="/plugins/locking.html" class="">Locking</a></li></ul></li></ul></div><div id="page-content-wrapper"><div class="nav"><div class="container-fluid"><div class="row"><div class="col-lg-12"><div class="action-menu pull-left clearfix"><a href="#menu-toggle" id="menu-toggle"><i class="fa fa-bars" aria-hidden="true"></i></a></div><ul class="pull-right"><li id="gh-eyes-item" class="hidden-xs"><a href="https://github.com/Orkestra-Tech/orkestra"><i class="fa fa-eye"></i><span>WATCH<span id="eyes" class="label label-default">--</span></span></a></li><li id="gh-stars-item" class="hidden-xs"><a href="https://github.com/Orkestra-Tech/orkestra"><i class="fa fa-star-o"></i><span>STARS<span id="stars" class="label label-default">--</span></span></a></li><li><a href="#" onclick="shareSiteTwitter('Orkestra Functional DevOps with Scala and Kubernetes');"><i class="fa fa-twitter"></i></a></li><li><a href="#" onclick="shareSiteFacebook('Orkestra Functional DevOps with Scala and Kubernetes');"><i class="fa fa-facebook"></i></a></li><li><a href="#" onclick="shareSiteGoogle();"><i class="fa fa-google-plus"></i></a></li></ul></div></div></div></div><div id="content" data-github-owner="Orkestra-Tech" data-github-repo="orkestra"><div class="content-wrapper"><section><h1 id="config">Config</h1>
<ul>
<li><code class="highlighter-rouge">ORKESTRA_KUBE_URI</code>: The URI of the Kubernetes API. Required.</li>
<li><code class="highlighter-rouge">ORKESTRA_ELASTICSEARCH_URI</code>: The URI of Elasticsearch for the backend storage. Required.</li>
<li><code class="highlighter-rouge">ORKESTRA_BIND_PORT</code>: Port to bind the API and UI on. Default: 8080.</li>
<li>
<p><code class="highlighter-rouge">ORKESTRA_NAMESPACE</code>: Orkestra needs to know in which namespace it lives in. Required.<br />
The easiest way is giving it via the downward API:</p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">ORKESTRA_NAMESPACE</span>
<span class="na">valueFrom</span><span class="pi">:</span>
<span class="na">fieldRef</span><span class="pi">:</span>
<span class="na">fieldPath</span><span class="pi">:</span> <span class="s">metadata.namespace</span>
</code></pre></div> </div>
</li>
<li>
<p><code class="highlighter-rouge">ORKESTRA_POD_NAME</code>: Orkestra needs to know the name of pod it runs in. Required.<br />
The easiest way is giving it via the downward API:</p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">ORKESTRA_POD_NAME</span>
<span class="na">valueFrom</span><span class="pi">:</span>
<span class="na">fieldRef</span><span class="pi">:</span>
<span class="na">fieldPath</span><span class="pi">:</span> <span class="s">metadata.name</span>
</code></pre></div> </div>
</li>
<li><code class="highlighter-rouge">ORKESTRA_WORKSPACE</code>: If you’d like you can change the default workspace where the jobs will run in. Required.
Default <code class="highlighter-rouge">/opt/docker/workspace</code>.</li>
<li><code class="highlighter-rouge">ORKESTRA_BASEPATH</code>: If the UI is accessed form a sub path we need to make Orkestra aware of it. Optional.</li>
</ul>
<h2 id="deployment-config">Deployment config</h2>
<p>The deployment can be done via Kubernetes Deployments.</p>
<p>First we create a namespace where we will be deploying everything:</p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">apiVersion</span><span class="pi">:</span> <span class="s">v1</span>
<span class="na">kind</span><span class="pi">:</span> <span class="s">Namespace</span>
<span class="na">metadata</span><span class="pi">:</span>
<span class="na">name</span><span class="pi">:</span> <span class="s">orkestra</span>
</code></pre></div></div>
<p>Then we need to have Elasticsearch running so that Orkestra can store and query the data related to the runs of jobs
(logs, times, parameters…). The following one is deploying a single node which is fine for dev purpose but you might
want to have a cluster of at least 3 nodes to be HA and failure resilient:</p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">apiVersion</span><span class="pi">:</span> <span class="s">v1</span>
<span class="na">kind</span><span class="pi">:</span> <span class="s">Service</span>
<span class="na">metadata</span><span class="pi">:</span>
<span class="na">name</span><span class="pi">:</span> <span class="s">elasticsearch</span>
<span class="na">namespace</span><span class="pi">:</span> <span class="s">orkestra</span>
<span class="na">spec</span><span class="pi">:</span>
<span class="na">selector</span><span class="pi">:</span>
<span class="na">app</span><span class="pi">:</span> <span class="s">elasticsearch</span>
<span class="na">clusterIP</span><span class="pi">:</span> <span class="s">None</span>
<span class="na">ports</span><span class="pi">:</span>
<span class="pi">-</span> <span class="na">port</span><span class="pi">:</span> <span class="s">9200</span>
<span class="na">targetPort</span><span class="pi">:</span> <span class="s">9200</span>
<span class="nn">---</span>
<span class="na">apiVersion</span><span class="pi">:</span> <span class="s">v1</span>
<span class="na">kind</span><span class="pi">:</span> <span class="s">Service</span>
<span class="na">metadata</span><span class="pi">:</span>
<span class="na">name</span><span class="pi">:</span> <span class="s">elasticsearch-internal</span>
<span class="na">namespace</span><span class="pi">:</span> <span class="s">orkestra</span>
<span class="na">spec</span><span class="pi">:</span>
<span class="na">selector</span><span class="pi">:</span>
<span class="na">app</span><span class="pi">:</span> <span class="s">elasticsearch</span>
<span class="na">clusterIP</span><span class="pi">:</span> <span class="s">None</span>
<span class="na">ports</span><span class="pi">:</span>
<span class="pi">-</span> <span class="na">port</span><span class="pi">:</span> <span class="s">9300</span>
<span class="na">targetPort</span><span class="pi">:</span> <span class="s">9300</span>
<span class="nn">---</span>
<span class="na">apiVersion</span><span class="pi">:</span> <span class="s">apps/v1beta2</span>
<span class="na">kind</span><span class="pi">:</span> <span class="s">StatefulSet</span>
<span class="na">metadata</span><span class="pi">:</span>
<span class="na">name</span><span class="pi">:</span> <span class="s">elasticsearch</span>
<span class="na">namespace</span><span class="pi">:</span> <span class="s">orkestra</span>
<span class="na">spec</span><span class="pi">:</span>
<span class="na">selector</span><span class="pi">:</span>
<span class="na">matchLabels</span><span class="pi">:</span>
<span class="na">app</span><span class="pi">:</span> <span class="s">elasticsearch</span>
<span class="na">serviceName</span><span class="pi">:</span> <span class="s">elasticsearch-internal</span>
<span class="na">replicas</span><span class="pi">:</span> <span class="s">1</span>
<span class="na">template</span><span class="pi">:</span>
<span class="na">metadata</span><span class="pi">:</span>
<span class="na">labels</span><span class="pi">:</span>
<span class="na">app</span><span class="pi">:</span> <span class="s">elasticsearch</span>
<span class="na">spec</span><span class="pi">:</span>
<span class="na">initContainers</span><span class="pi">:</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">init-sysctl</span>
<span class="na">image</span><span class="pi">:</span> <span class="s">busybox:1.27.2</span>
<span class="na">command</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">sysctl</span>
<span class="pi">-</span> <span class="s">-w</span>
<span class="pi">-</span> <span class="s">vm.max_map_count=262144</span>
<span class="na">securityContext</span><span class="pi">:</span>
<span class="na">privileged</span><span class="pi">:</span> <span class="no">true</span>
<span class="na">containers</span><span class="pi">:</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">elasticsearch</span>
<span class="na">image</span><span class="pi">:</span> <span class="s">docker.elastic.co/elasticsearch/elasticsearch-oss:6.1.1</span>
<span class="na">env</span><span class="pi">:</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">cluster.name</span>
<span class="na">value</span><span class="pi">:</span> <span class="s">orkestra</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">node.name</span>
<span class="na">valueFrom</span><span class="pi">:</span>
<span class="na">fieldRef</span><span class="pi">:</span>
<span class="na">fieldPath</span><span class="pi">:</span> <span class="s">metadata.name</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">discovery.zen.ping.unicast.hosts</span>
<span class="na">value</span><span class="pi">:</span> <span class="s">elasticsearch-internal</span>
<span class="na">volumeMounts</span><span class="pi">:</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">data</span>
<span class="na">mountPath</span><span class="pi">:</span> <span class="s">/usr/share/elasticsearch/data</span>
<span class="na">volumes</span><span class="pi">:</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">data</span>
<span class="na">emptyDir</span><span class="pi">:</span> <span class="pi">{}</span>
</code></pre></div></div>
<p>Now we can deploy Orkestra:</p>
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">apiVersion</span><span class="pi">:</span> <span class="s">v1</span>
<span class="na">kind</span><span class="pi">:</span> <span class="s">Service</span>
<span class="na">metadata</span><span class="pi">:</span>
<span class="na">name</span><span class="pi">:</span> <span class="s">orkestra</span>
<span class="na">namespace</span><span class="pi">:</span> <span class="s">orkestra</span>
<span class="na">spec</span><span class="pi">:</span>
<span class="na">selector</span><span class="pi">:</span>
<span class="na">app</span><span class="pi">:</span> <span class="s">orkestra</span>
<span class="na">ports</span><span class="pi">:</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">http</span>
<span class="na">port</span><span class="pi">:</span> <span class="s">80</span>
<span class="na">targetPort</span><span class="pi">:</span> <span class="s">8080</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">github</span>
<span class="na">port</span><span class="pi">:</span> <span class="s">81</span>
<span class="na">targetPort</span><span class="pi">:</span> <span class="s">8081</span>
<span class="nn">---</span>
<span class="na">apiVersion</span><span class="pi">:</span> <span class="s">apps/v1beta2</span>
<span class="na">kind</span><span class="pi">:</span> <span class="s">Deployment</span>
<span class="na">metadata</span><span class="pi">:</span>
<span class="na">name</span><span class="pi">:</span> <span class="s">orkestra</span>
<span class="na">namespace</span><span class="pi">:</span> <span class="s">orkestra</span>
<span class="na">spec</span><span class="pi">:</span>
<span class="na">replicas</span><span class="pi">:</span> <span class="s">1</span>
<span class="na">selector</span><span class="pi">:</span>
<span class="na">matchLabels</span><span class="pi">:</span>
<span class="na">app</span><span class="pi">:</span> <span class="s">orkestra</span>
<span class="na">template</span><span class="pi">:</span>
<span class="na">metadata</span><span class="pi">:</span>
<span class="na">labels</span><span class="pi">:</span>
<span class="na">app</span><span class="pi">:</span> <span class="s">orkestra</span>
<span class="na">spec</span><span class="pi">:</span>
<span class="na">containers</span><span class="pi">:</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">orkestra</span>
<span class="na">image</span><span class="pi">:</span> <span class="s">orkestra:0.1.0-SNAPSHOT</span>
<span class="na">imagePullPolicy</span><span class="pi">:</span> <span class="s">IfNotPresent</span>
<span class="na">env</span><span class="pi">:</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">ORKESTRA_KUBE_URI</span>
<span class="na">value</span><span class="pi">:</span> <span class="s">https://kubernetes.default</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">ORKESTRA_ELASTICSEARCH_URI</span>
<span class="na">value</span><span class="pi">:</span> <span class="s">elasticsearch://elasticsearch:9200</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">ORKESTRA_BASEPATH</span>
<span class="na">value</span><span class="pi">:</span> <span class="s">/api/v1/namespaces/orkestra/services/orkestra:http/proxy</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">ORKESTRA_POD_NAME</span>
<span class="na">valueFrom</span><span class="pi">:</span>
<span class="na">fieldRef</span><span class="pi">:</span>
<span class="na">fieldPath</span><span class="pi">:</span> <span class="s">metadata.name</span>
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">ORKESTRA_NAMESPACE</span>
<span class="na">valueFrom</span><span class="pi">:</span>
<span class="na">fieldRef</span><span class="pi">:</span>
<span class="na">fieldPath</span><span class="pi">:</span> <span class="s">metadata.namespace</span>
</code></pre></div></div>
</section></div></div></div></div><script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script><script src="/highlight/highlight.pack.js"></script><script>hljs.configure({
languages:['scala','java','bash']
});
hljs.initHighlighting();
</script><script>((window.gitter = {}).chat = {}).options = {
room: 'orkestra-tech/Orkestra'};</script><script src="https://sidecar.gitter.im/dist/sidecar.v1.js"></script><script src="/js/main.js"></script></body></html>