-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path00_INSTALL_IBM_AIOPS.yaml
552 lines (434 loc) Β· 23.8 KB
/
00_INSTALL_IBM_AIOPS.yaml
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
#-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# ________ __ ___ __________ ___ __ __ _
# / _/ __ )/ |/ / / _/_ __/ / | __ __/ /_____ ____ ___ ____ _/ /_(_)___ ____
# / // __ / /|_/ / / / / / / /| |/ / / / __/ __ \/ __ `__ \/ __ `/ __/ / __ \/ __ \
# _/ // /_/ / / / / _/ / / / / ___ / /_/ / /_/ /_/ / / / / / / /_/ / /_/ / /_/ / / / /
# /___/_____/_/ /_/ /___/ /_/ /_/ |_\__,_/\__/\____/_/ /_/ /_/\__,_/\__/_/\____/_/ /_/
#
#-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------------------------------------------------------------------"
# Installing IBM IT Automation Solutoions
#
# CloudPak for AIOps
#
# Β©2024 [email protected]
# ---------------------------------------------------------------------------------------------------------------------------------------------------"
# ---------------------------------------------------------------------------------------------------------------------------------------------------"
# ---------------------------------------------------------------------------------------------------------------------------------------------------"
# ---------------------------------------------------------------------------------------------------------------------------------------------------"
# Get a Cluster from TechZone: https://techzone.ibm.com/collection/tech-zone-certified-base-images
# Type: VMWare on IBM Cloud / UPI Public
# Worker node count: 4
# Flavour: b3c.32x128 β
# OpenShift Version: 4.15
# Storage: ODF 500GB or Managed NFS - 2TB
# ---------------------------------------------------------------------------------------------------------------------------------------------------"
# ---------------------------------------------------------------------------------------------------------------------------------------------------"
# Installs:
#
# - IBM Operator
# - IBM CloudPak for AIOps
# - IBM CloudPak for AIOps Demo Content
# - OpenLDAP & Register with ibm-aiops
# - RobotShop Demo App
# - Demo Service Account
# - AWX (Open Source Ansible Tower) with preloaded Playbooks
# - Train Models
# - Create Training Definitions (TG, LAGS, CR, SI, MET)
# - Create Training Data (LAGS, SNOW, MET)
# - Train Models (TG, LAGS, CR, SI, MET)
# - Topology
# - Create K8s Observer
# - Create ASM merge rules
# - Load ASM merge Topology
# - Create ibm-aiops Application
# - Creates valid certificate for Ingress (Slack)
# - External Routes (Flink, Topology, ...)
# - Disables ASM Service match rule
# - Create Policy Creation for Stories and Runbooks
# - ELK
# ---------------------------------------------------------------------------------------------------------------------------------------------------"
# ---------------------------------------------------------------------------------------------------------------------------------------------------"
---
apiVersion: v1
kind: Namespace
metadata:
name: ibm-installer
---
kind: ConfigMap
apiVersion: v1
metadata:
name: ibm-install-configuration-aiops
namespace: ibm-installer
immutable: false
data:
# Get your key from here https://myibm.ibm.com/products-services/containerlibrary
ENTITLED_REGISTRY_KEY: >-
<REGISTRY_TOKEN>
INSTALLATION_CONFIG.yaml: >+
#*************************************************************************************************************************************************
#--------------------------------------------------------------------------------------------------------------------------------------
# Global Configuration
#--------------------------------------------------------------------------------------------------------------------------------------
#*************************************************************************************************************************************************
global_config:
# --------------------------------------------------------------------------------------------------------------------------------------
# Passwords and Licenses
# --------------------------------------------------------------------------------------------------------------------------------------
# Use this Password for all Instances - do NOT use the "-" character
global_password: CHANGEME
# Available Names: Adam, Aajla, AIOPS, Alicent, Amy, Anakin, Angus, Arya, Austin, Barney, Bart, Batman, Bear, Bob, Bono, Bran, Brienne, Cara, Cassian, Cersei, Cersei1, Chewbacca, CP4AIOPS, Curt, Daenerys, Daffy, Darth, Demo, Dexter,
# Dilbert, Edge, Finn, Fred, Freddie, Grogu, Groot, Hagrid, Han, Harley, Harry, Hodor, Hofstadter, Howard, Hulk, James, Jimmy, John, Joker, Jyn, King, Kirk, Kurt, Lando, Leia, Larry, Lemmy, Liam, Luke, Nightking,
# Obiwan, Padme, Paul, Penny, Picard, Prince, Raj, Rey, Robin, Robot1, Robot2, Robot3, Robot4, Robot5, Ron, Sabine, Sansa, Sheldon, Sherlock, Slash, Spiderman, Spock, Strange, Superman,
# Tormund, Tyrion, Walker, Watson, Wedge
environment_name: Bear
cloud_platform: existing-ocp
# Set this value to True to accept all licenses
accept_all_licenses: False
# Key to decrypt Licenses
#license_token: NONE
# --------------------------------------------------------------------------------------------------------------------------------------
# Pull Registires
# --------------------------------------------------------------------------------------------------------------------------------------
entitled_registry: cp.icr.io
entitled_registry_user: cp
catalog_image: icr.io/cpopen/ibm-operator-catalog:latest
current_supported_aiops_version: v4.8
# --------------------------------------------------------------------------------------------------------------------------------------
# Notifications and Cards
# --------------------------------------------------------------------------------------------------------------------------------------
# Create Welcome Cards in ibm-aiops
create_cards: true
# Create App Menu Items in OCP
create_ocp_items: true
# Create Notifications in OCP
create_ocp_notifications: true
position_ocp_notifications: BannerBottom
position_final_ocp_notification: BannerTop
# *************************************************************************************************************************************************
# -------------------------------------------------------------------------------------------------------------------------------------
# OpenShift Configuration
# --------------------------------------------------------------------------------------------------------------------------------------
# *************************************************************************************************************************************************
openshift:
- name: "mycluster"
ocp_version: "4.15"
cluster_name: "mycluster"
domain_name: example.com
openshift_storage:
- storage_name: auto-storage
storage_type: auto
# Alternatively use
#storage_name: ibm-roks-storage
#storage_type: custom
#ocp_storage_class_file: ibmc-file-gold-gid
#ocp_storage_class_block: ibmc-block-gold
#*************************************************************************************************************************************************
#--------------------------------------------------------------------------------------------------------------------------------------
# IBM IT AUTOMATION - INSTALLATION Configuration
#--------------------------------------------------------------------------------------------------------------------------------------
#*************************************************************************************************************************************************
ibmitautomation:
#--------------------------------------------------------------------------------------------------------------------------------------
# CloudPak for AIOps Base Install
#--------------------------------------------------------------------------------------------------------------------------------------
# Changing the project name / namespace is at your own risk. some things might break, I do not test this!
- project: ibm-aiops
instances:
- name: ibm-aiops
kind: IBMAIOps
install: true
# --------------------------------------------------------------------------------------------------------------------------------------
# Install Sizing
# current_ibm-aiops_feature
# ibm-aiops Size of the install (small: PoC/Demo, large: Production)
aiops_size: small
# Custom Sizing File (aiops_size must be set to "custom")
#custom_size_file: none
# --------------------------------------------------------------------------------------------------------------------------------------
# Install Details
# Name of the ibm-aiops instance
aiops_name: ibm-aiops
# Version of the catalog subscription
subscription_channel: v4.8
# Freeze the version of the Catalog image by patching CatalogSource
freeze_catalog: true
# Enable Log Anomaly and Similar Tickets
logAnomalyDetection: true
# Topology Model (application/service)
topologyModel: application
# Enable Group Profiles for Role Based Access Control
groupProfiles: true
# Install Feature Flags
install_feature_flags: true
# --------------------------------------------------------------------------------------------------------------------------------------
# Storage Classes Override for this Instance
#storage_class_file: automatic
#storage_class_block: automatic
# --------------------------------------------------------------------------------------------------------------------------------------
# Install with CASE Files
# --------------------------------------------------------------------------------------------------------------------------------------
case_install: false
case_github_url: "https://github.com/IBM/cloud-pak/raw/master/repo/case"
case_name: ibm-cp-waiops
case_version: 1.13.1
case_inventory_setup: cpaiopsSetup
#--------------------------------------------------------------------------------------------------------------------------------------
# CloudPak for AIOps Demo Content Install
#--------------------------------------------------------------------------------------------------------------------------------------
- name: ibm-aiops-demo-content
kind: IBMAIOpsDemoContent
install: true
# ---------------------------------------------------------------------
# TRAINING
# Train the Models based on pre-canned content
# Where to get the training data from
training_data_url: https://github.com/niklaushirt/
training_data_repo: ibm-aiops-trainingdata
# Create Kafka connection for Log inception (needed to create log anomalies in the demo environment)
create_log_connection: true
# Enable Log Anomaly Golden Signals
training_enable_log_golden_signals: true
# Enable Event Temporal Grouping
training_load_data_events: true
training_create_training_temporal: true
training_run_training_temporal: true
# Enable Similar Incidents
training_load_data_snow: true
training_create_training_snow: true
training_run_training_snow: true
# Enable Metric Anomaly
training_load_data_metrics: true
training_create_training_metrics: true
training_run_training_metrics: true
# Create Training for Seasonality and XinY
training_create_season_xiny: false
# ---------------------------------------------------------------------
# TOPOLOGY
# Install DemoApps Application
install_demoapps: true
# RobotShop interface color (classic/white)
robotshop_color: white
# Install DemoApps K8s Observer
install_demoapps_observer: true
# Create Topology
create_topology_templates: true
create_topology_apps: true
# Create Custom overlay topology
install_custom_topology: true
# ---------------------------------------------------------------------
# RUNBOOKS
# Install AWX and create Runbooks
install_awx: true
load_awx_playbooks: true
integrate_awx: true
load_runbooks: true
create_runbook_policy: true
# ---------------------------------------------------------------------
# Demo UI
install_demo_ui: true
demoui_admin_mode: "true"
demoui_simulation_mode: "true"
demoui_user: demo
# Password for the Demo UI (OVERRIDES GLOBAL PASSWORD)
#demoui_pwd: CHANGEME
# Create incident links to static Slack and Snow pages
demoui_create_slack_snow: true
# ---------------------------------------------------------------------
# LDAP
install_ldap: true
# ldap domain
ldap_domain: ibm.com
# ldap base
ldap_base: dc=ibm,dc=com
# LDAP Admin Password (OVERRIDES GLOBAL PASSWORD)
#ldap_admin_password: CHANGEME
# LDAP Password for all Users (OVERRIDES GLOBAL PASSWORD)
#ldap_user_password: CHANGEME
# ldap namespace
ldap_namespace: openldap
# Integrate AIOps Login with OpenLDAP
ldap_register: true
# Integrate OpenShift Login with OpenLDAP
integrate_ocp_openldap: true
# ---------------------------------------------------------------------
# MISC PARAMETERS (you should not modify those)
# Create external routes (needed to create demo content)
create_external_routes: true
# Create a valid ingress certificate when on ITZ
create_valid_ingress_itz: true
# Create Policy for Story Creation
create_incident_policy: true
# Create Service Account
create_account: true
- project: ibm-aiops-addons
instances:
# --------------------------------------------------------------------------------------------------------------------------------------
# CP4WAIOPS ELK
# --------------------------------------------------------------------------------------------------------------------------------------
- name: ibm-aiops-elk
kind: ELK
install: false
INSTALL_REPO: 'https://github.com/niklaushirt/ibm-aiops-deployer.git -b main'
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------
# DO NOT MODIFY BELOW
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------
---
kind: ServiceAccount
apiVersion: v1
metadata:
name: ibm-installer-admin
namespace: ibm-installer
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: ibm-installer-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: ibm-installer-admin
namespace: ibm-installer
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: ibm-installer-default-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: default
namespace: ibm-installer
---
apiVersion: batch/v1
kind: Job
metadata:
name: ibm-install-aiops
namespace: ibm-installer
spec:
template:
metadata:
labels:
app: ibm-installer
spec:
serviceAccount: ibm-installer-admin
containers:
- name: install
image: quay.io/niklaushirt/ibm-aiops-tools:2.3
imagePullPolicy: IfNotPresent
resources:
requests:
memory: "64Mi"
cpu: "150m"
limits:
memory: "2024Mi"
cpu: "1200m"
command:
- /bin/sh
- -c
- |
#!/bin/bash
#set -x
echo "***************************************************************************************************************************************************"
echo "***************************************************************************************************************************************************"
echo " "
echo " π Install IBM AIOps "
echo " "
echo "***************************************************************************************************************************************************"
echo "***************************************************************************************************************************************************"
echo " "
echo " "
echo " β³ INSTALLATION START TIMESTAMP: $(date)"
echo ""
echo "------------------------------------------------------------------------------------------------------------------------------"
echo " π₯ Housekeeping"
oc delete ConsoleNotification --all>/dev/null 2>/dev/null
oc delete job -n ibm-installer --ignore-not-found $(oc get job -n ibm-installer|grep load-|awk '{print$1}'):-notfound --ignore-not-found>/dev/null 2>/dev/null
oc delete pod -n ibm-installer $(oc get po -n ibm-installer|grep load-|awk '{print$1}'):-notfound --ignore-not-found>/dev/null 2>/dev/null
echo ""
echo ""
echo "------------------------------------------------------------------------------------------------------------------------------"
echo " π Getting Installation source from GitHub"
echo "------------------------------------------------------------------------------------------------------------------------------"
echo " π₯ Clone Repo $INSTALL_REPO"
git clone $INSTALL_REPO
cd ibm-aiops-deployer
echo ""
echo ""
echo "------------------------------------------------------------------------------------------------------------------------------"
echo " π This Repo includes those latestet Commits"
git log|head -n 17
echo ""
echo ""
echo "------------------------------------------------------------------------------------------------------------------------------"
echo " π Config File"
# cat /tmp/config-file/INSTALLATION_CONFIG.yaml
echo "------------------------------------------------------------------------------------------------------------------------------"
echo " π Starting Installation"
echo "------------------------------------------------------------------------------------------------------------------------------"
echo ""
# echo "------------------------------------------------------------------------------------------------------------------------------"
# echo " π Prepare Ansible"
#pip -q install openshift pyyaml kubernetes
#apt update && apt install -fy python3-kubernetes python3-openshift
# echo ""
# echo ""
echo "------------------------------------------------------------------------------------------------------------------------------"
echo " π Launching Ansible Playbook"
export ANSIBLE_LOG_PATH=/tmp/ansible.log
ansible-playbook ./ansible/ibm-itautomation-products-install.yaml -e "config_file_path=/tmp/config-file/INSTALLATION_CONFIG.yaml" -e cp_entitlement_key=$ENTITLED_REGISTRY_KEY
echo ""
echo ""
echo "------------------------------------------------------------------------------------------------------------------------------"
echo " β³ INSTALLATION END TIMESTAMP: $(date)"
echo ""
echo "------------------------------------------------------------------------------------------------------------------------------"
echo " π Finalize Installation"
./tools/90_finalizeInstallation.sh
echo ""
echo "------------------------------------------------------------------------------------------------------------------------------"
echo " π Check for Errors in Ansible Log"
./tools/91_checkErrorsLog.sh
echo ""
echo "------------------------------------------------------------------------------------------------------------------------------"
echo " π Check Installation Consistency"
./tools/92_check_install_short.sh
echo ""
while true
do
sleep 1000
done
env:
- name: INSTALL_REPO
valueFrom:
configMapKeyRef:
name: ibm-install-configuration-aiops
key: INSTALL_REPO
- name: ENTITLED_REGISTRY_KEY
valueFrom:
configMapKeyRef:
name: ibm-install-configuration-aiops
key: ENTITLED_REGISTRY_KEY
optional: true
volumeMounts:
- name: config-file
mountPath: /tmp/config-file
volumes:
- name: config-file
configMap:
name: ibm-install-configuration-aiops
items:
- key: INSTALLATION_CONFIG.yaml
path: INSTALLATION_CONFIG.yaml
restartPolicy: Never
backoffLimit: 500