Skip to content

Commit 9ea3449

Browse files
committed
cluster up: add option to install logging components
1 parent 8f6030a commit 9ea3449

File tree

15 files changed

+916
-37
lines changed

15 files changed

+916
-37
lines changed

contrib/completions/bash/oc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5351,6 +5351,8 @@ _oc_cluster_up()
53515351
local_nonpersistent_flags+=("--host-volumes-dir=")
53525352
flags+=("--image=")
53535353
local_nonpersistent_flags+=("--image=")
5354+
flags+=("--logging")
5355+
local_nonpersistent_flags+=("--logging")
53545356
flags+=("--metrics")
53555357
local_nonpersistent_flags+=("--metrics")
53565358
flags+=("--public-hostname=")

contrib/completions/bash/openshift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9824,6 +9824,8 @@ _openshift_cli_cluster_up()
98249824
local_nonpersistent_flags+=("--host-volumes-dir=")
98259825
flags+=("--image=")
98269826
local_nonpersistent_flags+=("--image=")
9827+
flags+=("--logging")
9828+
local_nonpersistent_flags+=("--logging")
98279829
flags+=("--metrics")
98289830
local_nonpersistent_flags+=("--metrics")
98299831
flags+=("--public-hostname=")

contrib/completions/zsh/oc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5512,6 +5512,8 @@ _oc_cluster_up()
55125512
local_nonpersistent_flags+=("--host-volumes-dir=")
55135513
flags+=("--image=")
55145514
local_nonpersistent_flags+=("--image=")
5515+
flags+=("--logging")
5516+
local_nonpersistent_flags+=("--logging")
55155517
flags+=("--metrics")
55165518
local_nonpersistent_flags+=("--metrics")
55175519
flags+=("--public-hostname=")

contrib/completions/zsh/openshift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9985,6 +9985,8 @@ _openshift_cli_cluster_up()
99859985
local_nonpersistent_flags+=("--host-volumes-dir=")
99869986
flags+=("--image=")
99879987
local_nonpersistent_flags+=("--image=")
9988+
flags+=("--logging")
9989+
local_nonpersistent_flags+=("--logging")
99889990
flags+=("--metrics")
99899991
local_nonpersistent_flags+=("--metrics")
99909992
flags+=("--public-hostname=")

docs/man/man1/oc-cluster-up.1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ A public hostname can also be specified for the server with the \-\-public\-host
6969
\fB\-\-image\fP="openshift/origin"
7070
Specify the images to use for OpenShift
7171

72+
.PP
73+
\fB\-\-logging\fP=false
74+
Install logging (experimental)
75+
7276
.PP
7377
\fB\-\-metrics\fP=false
7478
Install metrics (experimental)

docs/man/man1/openshift-cli-cluster-up.1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ A public hostname can also be specified for the server with the \-\-public\-host
6969
\fB\-\-image\fP="openshift/origin"
7070
Specify the images to use for OpenShift
7171

72+
.PP
73+
\fB\-\-logging\fP=false
74+
Install logging (experimental)
75+
7276
.PP
7377
\fB\-\-metrics\fP=false
7478
Install metrics (experimental)
Lines changed: 325 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,325 @@
1+
apiVersion: "v1"
2+
kind: "List"
3+
items:
4+
-
5+
apiVersion: "v1"
6+
kind: "Template"
7+
metadata:
8+
name: logging-deployer-account-template
9+
annotations:
10+
description: "Template for creating the deployer account and roles needed for the aggregated logging deployer. Create as cluster-admin."
11+
tags: "infrastructure"
12+
objects:
13+
-
14+
apiVersion: v1
15+
kind: ServiceAccount
16+
name: logging-deployer
17+
metadata:
18+
name: logging-deployer
19+
labels:
20+
logging-infra: deployer
21+
provider: openshift
22+
component: deployer
23+
-
24+
apiVersion: v1
25+
kind: ServiceAccount
26+
metadata:
27+
name: aggregated-logging-kibana
28+
-
29+
apiVersion: v1
30+
kind: ServiceAccount
31+
metadata:
32+
name: aggregated-logging-elasticsearch
33+
-
34+
apiVersion: v1
35+
kind: ServiceAccount
36+
metadata:
37+
name: aggregated-logging-fluentd
38+
-
39+
apiVersion: v1
40+
kind: ServiceAccount
41+
metadata:
42+
name: aggregated-logging-curator
43+
- apiVersion: v1
44+
kind: ClusterRole
45+
metadata:
46+
name: oauth-editor
47+
rules:
48+
- resources:
49+
- oauthclients
50+
verbs:
51+
- create
52+
- delete
53+
- apiVersion: v1
54+
kind: ClusterRole
55+
metadata:
56+
name: daemonset-admin
57+
rules:
58+
- resources:
59+
- daemonsets
60+
apiGroups:
61+
- extensions
62+
verbs:
63+
- create
64+
- get
65+
- list
66+
- watch
67+
- delete
68+
- update
69+
-
70+
apiVersion: v1
71+
kind: RoleBinding
72+
metadata:
73+
name: logging-deployer-edit-role
74+
roleRef:
75+
kind: ClusterRole
76+
name: edit
77+
subjects:
78+
- kind: ServiceAccount
79+
name: logging-deployer
80+
-
81+
apiVersion: v1
82+
kind: RoleBinding
83+
metadata:
84+
name: logging-deployer-dsadmin-role
85+
roleRef:
86+
kind: ClusterRole
87+
name: daemonset-admin
88+
subjects:
89+
- kind: ServiceAccount
90+
name: logging-deployer
91+
-
92+
apiVersion: "v1"
93+
kind: "Template"
94+
metadata:
95+
name: logging-deployer-template
96+
annotations:
97+
description: "Template for running the aggregated logging deployer in a pod. Requires empowered 'logging-deployer' service account."
98+
tags: "infrastructure"
99+
labels:
100+
logging-infra: deployer
101+
provider: openshift
102+
objects:
103+
-
104+
apiVersion: v1
105+
kind: Pod
106+
metadata:
107+
generateName: logging-deployer-
108+
spec:
109+
containers:
110+
- image: ${IMAGE_PREFIX}logging-deployment:${IMAGE_VERSION}
111+
imagePullPolicy: Always
112+
name: deployer
113+
volumeMounts:
114+
- name: empty
115+
mountPath: /etc/deploy
116+
env:
117+
- name: PROJECT
118+
valueFrom:
119+
fieldRef:
120+
fieldPath: metadata.namespace
121+
- name: IMAGE_PREFIX
122+
value: ${IMAGE_PREFIX}
123+
- name: IMAGE_VERSION
124+
value: ${IMAGE_VERSION}
125+
- name: IMAGE_PULL_SECRET
126+
value: ${IMAGE_PULL_SECRET}
127+
- name: INSECURE_REGISTRY
128+
value: ${INSECURE_REGISTRY}
129+
- name: ENABLE_OPS_CLUSTER
130+
value: ${ENABLE_OPS_CLUSTER}
131+
- name: KIBANA_HOSTNAME
132+
value: ${KIBANA_HOSTNAME}
133+
- name: KIBANA_OPS_HOSTNAME
134+
value: ${KIBANA_OPS_HOSTNAME}
135+
- name: PUBLIC_MASTER_URL
136+
value: ${PUBLIC_MASTER_URL}
137+
- name: MASTER_URL
138+
value: ${MASTER_URL}
139+
- name: ES_INSTANCE_RAM
140+
value: ${ES_INSTANCE_RAM}
141+
- name: ES_PVC_SIZE
142+
value: ${ES_PVC_SIZE}
143+
- name: ES_PVC_PREFIX
144+
value: ${ES_PVC_PREFIX}
145+
- name: ES_PVC_DYNAMIC
146+
value: ${ES_PVC_DYNAMIC}
147+
- name: ES_CLUSTER_SIZE
148+
value: ${ES_CLUSTER_SIZE}
149+
- name: ES_NODE_QUORUM
150+
value: ${ES_NODE_QUORUM}
151+
- name: ES_RECOVER_AFTER_NODES
152+
value: ${ES_RECOVER_AFTER_NODES}
153+
- name: ES_RECOVER_EXPECTED_NODES
154+
value: ${ES_RECOVER_EXPECTED_NODES}
155+
- name: ES_RECOVER_AFTER_TIME
156+
value: ${ES_RECOVER_AFTER_TIME}
157+
- name: ES_OPS_INSTANCE_RAM
158+
value: ${ES_OPS_INSTANCE_RAM}
159+
- name: ES_OPS_PVC_SIZE
160+
value: ${ES_OPS_PVC_SIZE}
161+
- name: ES_OPS_PVC_PREFIX
162+
value: ${ES_OPS_PVC_PREFIX}
163+
- name: ES_OPS_PVC_DYNAMIC
164+
value: ${ES_OPS_PVC_DYNAMIC}
165+
- name: ES_OPS_CLUSTER_SIZE
166+
value: ${ES_OPS_CLUSTER_SIZE}
167+
- name: ES_OPS_NODE_QUORUM
168+
value: ${ES_OPS_NODE_QUORUM}
169+
- name: ES_OPS_RECOVER_AFTER_NODES
170+
value: ${ES_OPS_RECOVER_AFTER_NODES}
171+
- name: ES_OPS_RECOVER_EXPECTED_NODES
172+
value: ${ES_OPS_RECOVER_EXPECTED_NODES}
173+
- name: ES_OPS_RECOVER_AFTER_TIME
174+
value: ${ES_OPS_RECOVER_AFTER_TIME}
175+
- name: FLUENTD_NODESELECTOR
176+
value: ${FLUENTD_NODESELECTOR}
177+
- name: ES_NODESELECTOR
178+
value: ${ES_NODESELECTOR}
179+
- name: ES_OPS_NODESELECTOR
180+
value: ${ES_OPS_NODESELECTOR}
181+
- name: KIBANA_NODESELECTOR
182+
value: ${KIBANA_NODESELECTOR}
183+
- name: KIBANA_OPS_NODESELECTOR
184+
value: ${KIBANA_OPS_NODESELECTOR}
185+
- name: CURATOR_NODESELECTOR
186+
value: ${CURATOR_NODESELECTOR}
187+
- name: CURATOR_OPS_NODESELECTOR
188+
value: ${CURATOR_OPS_NODESELECTOR}
189+
- name: MODE
190+
value: ${MODE}
191+
dnsPolicy: ClusterFirst
192+
restartPolicy: Never
193+
serviceAccount: logging-deployer
194+
volumes:
195+
- name: empty
196+
emptyDir: {}
197+
parameters:
198+
-
199+
description: "The mode that the deployer runs in."
200+
name: MODE
201+
value: "install"
202+
-
203+
description: 'Specify prefix for logging components; e.g. for "openshift/origin-logging-deployer:v1.1", set prefix "openshift/origin-"'
204+
name: IMAGE_PREFIX
205+
value: "docker.io/openshift/origin-"
206+
-
207+
description: 'Specify version for logging components; e.g. for "openshift/origin-logging-deployer:v1.1", set version "v1.1"'
208+
name: IMAGE_VERSION
209+
value: "latest"
210+
-
211+
description: "(Deprecated) Specify the name of an existing pull secret to be used for pulling component images from an authenticated registry."
212+
name: IMAGE_PULL_SECRET
213+
-
214+
description: "(Deprecated) Allow the registry for logging component images to be non-secure (not secured with a certificate signed by a known CA)"
215+
name: INSECURE_REGISTRY
216+
value: "false"
217+
-
218+
description: "(Deprecated) If true, set up to use a second ES cluster for ops logs."
219+
name: ENABLE_OPS_CLUSTER
220+
value: "false"
221+
-
222+
description: "(Deprecated) External hostname where clients will reach kibana"
223+
name: KIBANA_HOSTNAME
224+
value: "kibana.example.com"
225+
-
226+
description: "(Deprecated) External hostname at which admins will visit the ops Kibana."
227+
name: KIBANA_OPS_HOSTNAME
228+
value: kibana-ops.example.com
229+
-
230+
description: "(Deprecated) External URL for the master, for OAuth purposes"
231+
name: PUBLIC_MASTER_URL
232+
value: "https://localhost:8443"
233+
-
234+
description: "(Deprecated) Internal URL for the master, for authentication retrieval"
235+
name: MASTER_URL
236+
value: "https://kubernetes.default.svc.cluster.local"
237+
-
238+
description: "(Deprecated) How many instances of ElasticSearch to deploy."
239+
name: ES_CLUSTER_SIZE
240+
value: "1"
241+
-
242+
description: "(Deprecated) Amount of RAM to reserve per ElasticSearch instance."
243+
name: ES_INSTANCE_RAM
244+
value: "8G"
245+
-
246+
description: "(Deprecated) Size of the PersistentVolumeClaim to create per ElasticSearch instance, e.g. 100G. If empty, no PVCs will be created and emptyDir volumes are used instead."
247+
name: ES_PVC_SIZE
248+
-
249+
description: "(Deprecated) Prefix for the names of PersistentVolumeClaims to be created; a number will be appended per instance. If they don't already exist, they will be created with size ES_PVC_SIZE."
250+
name: ES_PVC_PREFIX
251+
value: "logging-es-"
252+
-
253+
description: '(Deprecated) Set to "true" to request dynamic provisioning (if enabled for your cluster) of a PersistentVolume for the ES PVC. '
254+
name: ES_PVC_DYNAMIC
255+
-
256+
description: "(Deprecated) Number of nodes required to elect a master (ES minimum_master_nodes). By default, derived from ES_CLUSTER_SIZE / 2 + 1."
257+
name: ES_NODE_QUORUM
258+
-
259+
description: "(Deprecated) Number of nodes required to be present before the cluster will recover from a full restart. By default, one fewer than ES_CLUSTER_SIZE."
260+
name: ES_RECOVER_AFTER_NODES
261+
-
262+
description: "(Deprecated) Number of nodes desired to be present before the cluster will recover from a full restart. By default, ES_CLUSTER_SIZE."
263+
name: ES_RECOVER_EXPECTED_NODES
264+
-
265+
description: "(Deprecated) Timeout for *expected* nodes to be present when cluster is recovering from a full restart."
266+
name: ES_RECOVER_AFTER_TIME
267+
value: "5m"
268+
-
269+
description: "(Deprecated) How many ops instances of ElasticSearch to deploy. By default, ES_CLUSTER_SIZE."
270+
name: ES_OPS_CLUSTER_SIZE
271+
-
272+
description: "(Deprecated) Amount of RAM to reserve per ops ElasticSearch instance."
273+
name: ES_OPS_INSTANCE_RAM
274+
value: "8G"
275+
-
276+
description: "(Deprecated) Size of the PersistentVolumeClaim to create per ElasticSearch ops instance, e.g. 100G. If empty, no PVCs will be created and emptyDir volumes are used instead."
277+
name: ES_OPS_PVC_SIZE
278+
-
279+
description: "(Deprecated) Prefix for the names of PersistentVolumeClaims to be created; a number will be appended per instance. If they don't already exist, they will be created with size ES_OPS_PVC_SIZE."
280+
name: ES_OPS_PVC_PREFIX
281+
value: "logging-es-ops-"
282+
-
283+
description: '(Deprecated) Set to "true" to request dynamic provisioning (if enabled for your cluster) of a PersistentVolume for the ES ops PVC. '
284+
name: ES_OPS_PVC_DYNAMIC
285+
-
286+
description: "(Deprecated) Number of ops nodes required to elect a master (ES minimum_master_nodes). By default, derived from ES_CLUSTER_SIZE / 2 + 1."
287+
name: ES_OPS_NODE_QUORUM
288+
-
289+
description: "(Deprecated) Number of ops nodes required to be present before the cluster will recover from a full restart. By default, one fewer than ES_OPS_CLUSTER_SIZE."
290+
name: ES_OPS_RECOVER_AFTER_NODES
291+
-
292+
description: "(Deprecated) Number of ops nodes desired to be present before the cluster will recover from a full restart. By default, ES_OPS_CLUSTER_SIZE."
293+
name: ES_OPS_RECOVER_EXPECTED_NODES
294+
-
295+
description: "(Deprecated) Timeout for *expected* ops nodes to be present when cluster is recovering from a full restart."
296+
name: ES_OPS_RECOVER_AFTER_TIME
297+
value: "5m"
298+
-
299+
description: "(Deprecated) The nodeSelector used for the Fluentd DaemonSet."
300+
name: FLUENTD_NODESELECTOR
301+
value: "logging-infra-fluentd=true"
302+
-
303+
description: "(Deprecated) Node selector Elasticsearch cluster (label=value)."
304+
name: ES_NODESELECTOR
305+
value: ""
306+
-
307+
description: "(Deprecated) Node selector Elasticsearch operations cluster (label=value)."
308+
name: ES_OPS_NODESELECTOR
309+
value: ""
310+
-
311+
description: "(Deprecated) Node selector Kibana cluster (label=value)."
312+
name: KIBANA_NODESELECTOR
313+
value: ""
314+
-
315+
description: "(Deprecated) Node selector Kibana operations cluster (label=value)."
316+
name: KIBANA_OPS_NODESELECTOR
317+
value: ""
318+
-
319+
description: "(Deprecated) Node selector Curator (label=value)."
320+
name: CURATOR_NODESELECTOR
321+
value: ""
322+
-
323+
description: "(Deprecated) Node selector operations Curator (label=value)."
324+
name: CURATOR_OPS_NODESELECTOR
325+
value: ""

hack/update-generated-bootstrap-bindata.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pushd "${OS_ROOT}" > /dev/null
2626
${EXAMPLES}/jenkins \
2727
${EXAMPLES}/jenkins/pipeline \
2828
${EXAMPLES}/quickstarts/... \
29+
${EXAMPLES}/logging/... \
2930
pkg/image/admission/imagepolicy/api/v1/...
3031
popd > /dev/null
3132

0 commit comments

Comments
 (0)