release 3.5.0
This commit is contained in:
@@ -4,13 +4,13 @@ helm_version: v3.10.3
|
||||
|
||||
# cmoa info
|
||||
cmoa_namespace: imxc
|
||||
cmoa_version: rel3.4.9
|
||||
cmoa_version: rel3.5.0
|
||||
|
||||
# files/00-default in role
|
||||
docker_secret_file: secret_nexus.yaml
|
||||
|
||||
# all, jaeger, jspd
|
||||
imxc_ui: all
|
||||
#imxc_ui: jspd
|
||||
|
||||
# [docker_config_path]
|
||||
docker_config_nexus: dockerconfig/docker_config_nexus.json
|
||||
@@ -35,6 +35,11 @@ elasticsearch_service_name: elasticsearch
|
||||
elasticsearch_service_port: 9200
|
||||
elasticsearch_nodePort: 30200
|
||||
|
||||
# [postgres]
|
||||
postgres_service_name: postgres
|
||||
postgres_service_port: 5432
|
||||
postgres_nodePort: 32431
|
||||
|
||||
# [Keycloak]
|
||||
# Keycloak configuration settings
|
||||
keycloak_http_port: 31082
|
||||
@@ -55,7 +60,7 @@ keycloak_clients:
|
||||
- name: 'authorization_server'
|
||||
client_id: authorization_server
|
||||
realm: exem
|
||||
redirect_uris: "http://{{ ansible_default_ipv4.address }}:31080/*,http://{{ ansible_default_ipv4.address }}:31084/*,http://localhost:8080/*,http://localhost:8081/*"
|
||||
redirect_uris: "http://{{ ansible_default_ipv4.address }}:31080/*,http://localhost:8080/*,http://localhost:8081/*"
|
||||
public_client: True
|
||||
|
||||
# default ip/version (not change)
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
kubectl -n imxc wait --for=condition=ready pod/elasticsearch-1 --timeout=600s
|
||||
|
||||
namespace=$1
|
||||
|
||||
kubectl -n ${namespace} wait --for=condition=ready pod/elasticsearch-1 --timeout=600s
|
||||
|
||||
export ES_NODEPORT=`kubectl -n ${namespace} get svc elasticsearch -o jsonpath='{.spec.ports[*].nodePort}'`
|
||||
|
||||
export MASTER_IP=`kubectl get node -o wide | grep control-plane | awk '{print $6}'`
|
||||
|
||||
File diff suppressed because one or more lines are too long
0
roles/cmoa_install/files/03-ddl-dml/postgres/pg.sh
Normal file → Executable file
0
roles/cmoa_install/files/03-ddl-dml/postgres/pg.sh
Normal file → Executable file
0
roles/cmoa_install/files/03-ddl-dml/postgres/postgres_check_data
Normal file → Executable file
0
roles/cmoa_install/files/03-ddl-dml/postgres/postgres_check_data
Normal file → Executable file
@@ -47,7 +47,18 @@ ALTER TABLE ONLY public.alert_target
|
||||
ALTER TABLE ONLY public.alert_target
|
||||
ADD CONSTRAINT fkjrvj775641ky7s0f82kx3sile FOREIGN KEY (alert_group_id) REFERENCES public.alert_group(id);
|
||||
|
||||
CREATE TABLE public.report_group (
|
||||
id bigint NOT NULL,
|
||||
created_by character varying(255),
|
||||
created_date timestamp without time zone,
|
||||
modified_by character varying(255),
|
||||
modified_date timestamp without time zone,
|
||||
users text,
|
||||
name character varying(255)
|
||||
);
|
||||
ALTER TABLE public.report_group OWNER TO admin;
|
||||
|
||||
ALTER TABLE ONLY public.report_group ADD CONSTRAINT report_group_pkey PRIMARY KEY (id);
|
||||
|
||||
CREATE TABLE public.report_template (
|
||||
id bigint NOT NULL,
|
||||
@@ -59,7 +70,8 @@ CREATE TABLE public.report_template (
|
||||
enable boolean NOT NULL,
|
||||
metric_data text,
|
||||
template_data text,
|
||||
title character varying(255)
|
||||
title character varying(255),
|
||||
report_group_id int8 NULL
|
||||
);
|
||||
|
||||
ALTER TABLE public.report_template OWNER TO admin;
|
||||
@@ -67,6 +79,19 @@ ALTER TABLE public.report_template OWNER TO admin;
|
||||
ALTER TABLE ONLY public.report_template
|
||||
ADD CONSTRAINT report_template_pkey PRIMARY KEY (id);
|
||||
|
||||
|
||||
CREATE TABLE public.report_group_registry (
|
||||
id bigint NOT NULL,
|
||||
report_template_id bigint NOT NULL,
|
||||
report_group_id bigint NOT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE public.report_group_registry OWNER TO admin;
|
||||
|
||||
ALTER TABLE ONLY public.report_group_registry ADD CONSTRAINT report_group_registry_pkey PRIMARY KEY (id);
|
||||
ALTER TABLE ONLY public.report_group_registry ADD CONSTRAINT report_group_registry_template_id_fk FOREIGN KEY (report_template_id) REFERENCES public.report_template(id);
|
||||
ALTER TABLE ONLY public.report_group_registry ADD CONSTRAINT report_group_registry_group_id_fk FOREIGN KEY (report_group_id) REFERENCES public.report_group(id);
|
||||
|
||||
CREATE TABLE public.alert_event (
|
||||
id bigint NOT NULL,
|
||||
created_date timestamp without time zone NOT NULL,
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,36 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: manual
|
||||
namespace: imxc
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: manual
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: manual
|
||||
spec:
|
||||
containers:
|
||||
- name: manual
|
||||
image: {{ .Values.global.IMXC_IN_REGISTRY }}/manual:{{ .Values.global.CMOA_MANUAL_VERSION }}
|
||||
imagePullPolicy: IfNotPresent
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: manual
|
||||
namespace: imxc
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: manual
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8088
|
||||
targetPort: 3000
|
||||
nodePort: {{ .Values.global.CMOA_MANUAL_PORT }}
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: imxc-ui-config-jaeger
|
||||
namespace: imxc
|
||||
data:
|
||||
properties.file: |
|
||||
api.url = {{ .Values.global.SERVELET_URL_PROTOCOL }}://{{ .Values.global.ZUUL_SERVER_IP }}:{{ .Values.global.ZUUL_SERVER_PORT }}
|
||||
config.js: |
|
||||
window.appEnv = {
|
||||
// Env Settings servletURL
|
||||
offlineAccess: "{{ .Values.global.OFFLINEACCESS }}",
|
||||
backLogin: "{{ .Values.global.BACKLOGIN }}",
|
||||
servletURL: "{{ .Values.global.SERVELET_URL_PROTOCOL }}://{{ .Values.global.ZUUL_SERVER_IP }}:{{ .Values.global.ZUUL_SERVER_PORT }}",
|
||||
demoServletURL: "{{ .Values.global.DEMO_SERVELET_URL_PROTOCOL }}://{{ .Values.global.ZUUL_SERVER_IP }}:{{ .Values.global.ZUUL_SERVER_PORT }}",
|
||||
// Env Settings socketURL
|
||||
socketURL: "http://{{ .Values.global.NOTI_SERVER_IP }}:{{ .Values.global.NOTI_SERVER_PORT }}/ui-server-websocket",
|
||||
manualURL: "http://{{ .Values.global.CMOA_MANUAL_SERVER_IP }}:{{ .Values.global.CMOA_MANUAL_PORT }}",
|
||||
// Env Settings interMaxURL
|
||||
interMaxURL: "http://{{ .Values.global.INTERMAX_IP }}:8080/intermax/?",
|
||||
// Env Settings CloudMOA Version
|
||||
version: '{{ .Values.global.CLOUDMOA_UI_VERSION }}',
|
||||
UI_build_ver: '{{ .Values.global.UI_SERVER_VERSION }}',
|
||||
maxSelectionSize: 30,
|
||||
loginType: 'keycloak',
|
||||
keyCloak: {
|
||||
"realm": "{{ .Values.global.KEYCLOAK_REALM }}",
|
||||
"auth-server-url": "{{ .Values.global.KEYCLOAK_AUTH_SERVER_URL }}",
|
||||
"ssl-required": "none",
|
||||
"resource": "{{ .Values.global.KEYCLOAK_RESOURCE }}",
|
||||
"public-client": true,
|
||||
"confidential-port": 0
|
||||
},
|
||||
healthIndicatorStateInfo: [
|
||||
{
|
||||
state: "critical",
|
||||
// max: 1.0,
|
||||
// over: 0.8,
|
||||
max: 100,
|
||||
over: 80,
|
||||
text: "Critical",
|
||||
color: "#ff4040",
|
||||
level: 4,
|
||||
}, {
|
||||
state: "warning",
|
||||
// max: 0.8,
|
||||
// over: 0.5,
|
||||
max: 80,
|
||||
over: 50,
|
||||
text: "Warning",
|
||||
color: "#ffa733",
|
||||
level: 3,
|
||||
}, {
|
||||
state: "attention",
|
||||
// max: 0.5,
|
||||
// over: 0.0,
|
||||
max: 50,
|
||||
over: 0,
|
||||
text: "Attention",
|
||||
// color: "#B4B83D",
|
||||
color: "#1cbe85",
|
||||
level: 2,
|
||||
}, {
|
||||
state: "normal",
|
||||
max: 0,
|
||||
over: 0,
|
||||
text: "Normal",
|
||||
// color: "#64B87D",
|
||||
color: "#24b0ed",
|
||||
level: 1,
|
||||
},
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
---
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: imxc-ui-service-jaeger
|
||||
namespace: imxc
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: imxc-ui-jaeger
|
||||
ports:
|
||||
- protocol: TCP
|
||||
name: ui
|
||||
port: 80
|
||||
targetPort: 9999
|
||||
nodePort: 31084
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: imxc-ui-jaeger
|
||||
namespace: imxc
|
||||
labels:
|
||||
app: imxc-ui
|
||||
spec:
|
||||
revisionHistoryLimit: 0
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: imxc-ui-jaeger
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: imxc-ui-jaeger
|
||||
spec:
|
||||
containers:
|
||||
- name: imxc-ui-jaeger
|
||||
image: {{ .Values.global.IMXC_IN_REGISTRY }}/ui-server:{{ .Values.global.UI_SERVER_VERSION }}
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 100Mi
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- name: config-profile
|
||||
mountPath: /usr/src/app/web/env
|
||||
- name: config-server
|
||||
mountPath: /usr/src/app/config
|
||||
volumes:
|
||||
- name: config-profile
|
||||
configMap:
|
||||
name: imxc-ui-config-jaeger
|
||||
items:
|
||||
- key: "config.js"
|
||||
path: "config.js"
|
||||
- name: config-server
|
||||
configMap:
|
||||
name: imxc-ui-config-jaeger
|
||||
@@ -1,94 +0,0 @@
|
||||
# Default values for imxc.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: 10.10.31.243:5000/cmoa3/nginx
|
||||
tag: stable
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# The name of the service account to use.
|
||||
# If not set and create is true, a name is generated using the fullname template
|
||||
name:
|
||||
|
||||
podSecurityContext: {}
|
||||
# fsGroup: 2000
|
||||
|
||||
securityContext: {}
|
||||
# capabilities:
|
||||
# drop:
|
||||
# - ALL
|
||||
# readOnlyRootFilesystem: true
|
||||
# runAsNonRoot: true
|
||||
# runAsUser: 1000
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths: []
|
||||
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
# choice for the user. This also increases chances charts run on environments with little
|
||||
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 128Mi
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
|
||||
global:
|
||||
INTERMAX_IP:
|
||||
SERVELET_URL_PROTOCOL : http
|
||||
DEMO_SERVELET_URL_PROTOCOL : http
|
||||
KEYCLOAK_AUTH_SERVER_URL: http://111.111.111.111:31082/auth
|
||||
KEYCLOAK_RESOURCE: authorization_server
|
||||
KEYCLOAK_REALM: exem
|
||||
|
||||
IMXC_IN_REGISTRY: 10.10.31.243:5000/cmoa3
|
||||
|
||||
ZUUL_SERVER_IP: 111.111.111.111
|
||||
ZUUL_SERVER_PORT: 31081
|
||||
|
||||
NOTI_SERVER_IP: 111.111.111.111
|
||||
NOTI_SERVER_PORT: 31083
|
||||
|
||||
CMOA_MANUAL_SERVER_IP: 111.111.111.111
|
||||
CMOA_MANUAL_PORT: 31090
|
||||
|
||||
OFFLINEACCESS: false
|
||||
BACKLOGIN: false
|
||||
|
||||
CLOUDMOA_VERSION: rel0.0.0
|
||||
UI_SERVER_VERSION: rel0.0.0
|
||||
CMOA_MANUAL_VERSION: rel0.0.0
|
||||
@@ -1,5 +0,0 @@
|
||||
apiVersion: v1
|
||||
appVersion: "1.0"
|
||||
description: A Helm chart for Kubernetes
|
||||
name: imxc
|
||||
version: 0.1.0
|
||||
@@ -1,16 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
STATUS_CODE="$(curl -s -o /dev/null -w '%{http_code}' http://imxc-keycloak-http/auth/realms/exem)"
|
||||
|
||||
if [ $STATUS_CODE -eq 200 ]; then
|
||||
JWT_KEY="$(curl -s -XGET http://imxc-keycloak-http/auth/realms/exem | jq -r '.public_key')"
|
||||
export JWT_KEY
|
||||
|
||||
chmod -R 777 /home/cloudmoa/notification/cloudmoa_alert.log
|
||||
|
||||
java -Djava.security.egd=file:/dev/./urandom -jar /app.jar
|
||||
elif [ $STATUS_CODE -eq 404 ]; then
|
||||
echo "not found exem relam. check realm in imxc-keycloak"
|
||||
else
|
||||
echo "not found keycloak. check to install keycloak"
|
||||
fi
|
||||
@@ -1,36 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
# 200 -> 서버 및 realm이 있는 경우
|
||||
# 404 -> 서버는 있으나 realm이 없는 경우
|
||||
# 000 -> 서버가 없음
|
||||
STATUS_CODE="$(curl -s -o /dev/null -w '%{http_code}' http://imxc-keycloak-http/auth/realms/exem)"
|
||||
|
||||
if [ $STATUS_CODE -eq 404 ]; then
|
||||
TOKEN="$(curl -s -d "client_id=admin-cli" -d "username=admin" -d "password=admin" -d "grant_type=password" http://imxc-keycloak-http/auth/realms/master/protocol/openid-connect/token | jq -r '.access_token')"
|
||||
|
||||
echo $TOKEN
|
||||
|
||||
echo "create realm and client"
|
||||
# create realm and client
|
||||
curl -s -v POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d "@/tmp/init.json" http://imxc-keycloak-http/auth/admin/realms
|
||||
|
||||
|
||||
echo "create admin and owner"
|
||||
# create admin and owner
|
||||
curl -s -v POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"firstName":"","lastName":"", "username":"admin","email":"admin@example.com", "enabled":"true","credentials":[{"type":"password","value":"admin","temporary":false}]}' http://imxc-keycloak-http/auth/admin/realms/exem/users
|
||||
curl -s -v POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"firstName":"","lastName":"", "username":"owner","email":"owner@example.com", "enabled":"true","credentials":[{"type":"password","value":"admin","temporary":false}]}' http://imxc-keycloak-http/auth/admin/realms/exem/users
|
||||
|
||||
JWT_KEY="$(curl -s -XGET http://imxc-keycloak-http/auth/realms/exem | jq -r '.public_key')"
|
||||
export JWT_KEY
|
||||
|
||||
java -Djava.security.egd=file:/dev/./urandom -jar /app.jar
|
||||
elif [ $STATUS_CODE -eq 200 ]; then
|
||||
echo "exist exem relam"
|
||||
|
||||
JWT_KEY="$(curl -s -XGET http://imxc-keycloak-http/auth/realms/exem | jq -r '.public_key')"
|
||||
export JWT_KEY
|
||||
|
||||
java -Djava.security.egd=file:/dev/./urandom -jar /app.jar
|
||||
else
|
||||
echo "not found keycloak. check to install keycloak"
|
||||
fi
|
||||
@@ -1,14 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
STATUS_CODE="$(curl -s -o /dev/null -w '%{http_code}' http://imxc-keycloak-http/auth/realms/exem)"
|
||||
|
||||
if [ $STATUS_CODE -eq 200 ]; then
|
||||
JWT_KEY="$(curl -s -XGET http://imxc-keycloak-http/auth/realms/exem | jq -r '.public_key')"
|
||||
export JWT_KEY
|
||||
|
||||
java -Djava.security.egd=file:/dev/./urandom -jar /app.jar
|
||||
elif [ $STATUS_CODE -eq 404 ]; then
|
||||
echo "not found exem relam. check realm in imxc-keycloak"
|
||||
else
|
||||
echo "not found keycloak. check to install keycloak"
|
||||
fi
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
chmod -R 777 /scripts
|
||||
|
||||
sed -i "s/localhost/$REDIRECT_URLS/g" /scripts/init.json
|
||||
cp /scripts/init.json /tmp/init.json
|
||||
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,8 @@ data:
|
||||
socketURL: "http://{{ .Values.global.NOTI_SERVER_IP }}:{{ .Values.global.NOTI_SERVER_PORT }}/ui-server-websocket",
|
||||
// Env Settings interMaxURL
|
||||
// ex) ~/intermax/?paConnect=1&paType=ResponseInspector&fromTime=1556096539206&toTime=1556096599206&serverName=jeus89
|
||||
interMaxURL: "",
|
||||
interMaxURL: "http://{{ .Values.global.INTERMAX_IP }}:{{ .Values.global.INTERMAX_PORT }}/intermax/?",
|
||||
|
||||
manualURL: "http://{{ .Values.global.CMOA_MANUAL_SERVER_IP }}:{{ .Values.global.CMOA_MANUAL_PORT }}",
|
||||
// Env Settings CloudMOA Version
|
||||
version: '{{ .Values.global.CLOUDMOA_VERSION }}',
|
||||
@@ -69,6 +69,7 @@ affinity: {}
|
||||
|
||||
global:
|
||||
INTERMAX_IP:
|
||||
INTERMAX_PORT:
|
||||
SERVELET_URL_PROTOCOL : http
|
||||
DEMO_SERVELET_URL_PROTOCOL : http
|
||||
KEYCLOAK_AUTH_SERVER_URL: http://111.111.111.111:31082/auth
|
||||
@@ -49,3 +49,20 @@
|
||||
port: "{{ elasticsearch_service_port }}"
|
||||
nodePort: "{{ elasticsearch_nodePort }}"
|
||||
apply: yes
|
||||
|
||||
- name: 6. Change a Postgres Service (NodePort=postgres_nodePort)
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ postgres_service_name }}"
|
||||
namespace: "{{ cmoa_namespace }}"
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: "{{ postgres_service_port }}"
|
||||
nodePort: "{{ postgres_nodePort }}"
|
||||
apply: yes
|
||||
|
||||
@@ -1,79 +1,4 @@
|
||||
---
|
||||
- name: 1. helmchart install (imxc-ui-all)
|
||||
kubernetes.core.helm:
|
||||
name: "{{item}}"
|
||||
release_name: "{{item}}"
|
||||
release_namespace: "{{ cmoa_namespace }}"
|
||||
chart_ref: "{{ role_path }}/files/06-imxc-ui/{{ item }}"
|
||||
create_namespace: yes
|
||||
release_state: present
|
||||
values_files:
|
||||
- "{{ role_path }}/files/06-imxc-ui/{{ item }}/values.yaml"
|
||||
with_items:
|
||||
- imxc-ui-jaeger
|
||||
- imxc-ui-jspd
|
||||
when: imxc_ui == 'all'
|
||||
|
||||
- name: 1. helmchart install (imxc-ui-jaeger)
|
||||
kubernetes.core.helm:
|
||||
name: "{{item}}"
|
||||
release_name: "{{item}}"
|
||||
release_namespace: "{{ cmoa_namespace }}"
|
||||
chart_ref: "{{ role_path }}/files/06-imxc-ui/{{ item }}"
|
||||
create_namespace: yes
|
||||
release_state: present
|
||||
values_files:
|
||||
- "{{ role_path }}/files/06-imxc-ui/{{ item }}/values.yaml"
|
||||
with_items:
|
||||
- imxc-ui-jaeger
|
||||
when: imxc_ui == 'jaeger'
|
||||
|
||||
- name: 2. Change a imxc-ui Service (imxc-ui-jaeger)
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ jaeger_servicename }}"
|
||||
namespace: "{{ cmoa_namespace }}"
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: "{{ jaeger_service_port }}"
|
||||
nodePort: "{{ jaeger_nodePort }}"
|
||||
apply: yes
|
||||
when: imxc_ui == 'jaeger'
|
||||
|
||||
- name: 2. Get a list of all pods from the namespace
|
||||
command: kubectl -n "{{ cmoa_namespace }}" get pods --no-headers -o custom-columns=":metadata.name" # Output is a column
|
||||
register: pod_list
|
||||
when: imxc_ui != 'all'
|
||||
|
||||
- name: 3. Copy psql file in psql (imxc-jaeger)
|
||||
kubernetes.core.k8s_cp:
|
||||
namespace: "{{ cmoa_namespace }}"
|
||||
pod: "{{ item }}"
|
||||
remote_path: /tmp/jaeger_menumeta.psql
|
||||
local_path: "{{ role_path }}/files/03-ddl-dml/postgres/jaeger_menumeta.psql"
|
||||
with_items: "{{ pod_list.stdout_lines }}"
|
||||
when:
|
||||
- item is match('postgres')
|
||||
- imxc_ui == 'jaeger'
|
||||
ignore_errors: true
|
||||
|
||||
- name: 4. Execute a command in psql (imxc-jaeger)
|
||||
kubernetes.core.k8s_exec:
|
||||
namespace: "{{ cmoa_namespace }}"
|
||||
pod: "{{ item }}"
|
||||
command: bash -c "PGPASSWORD='eorbahrhkswp' && /usr/bin/psql -h 'localhost' -U 'admin' -d 'postgresdb' -f /tmp/jaeger_menumeta.psql"
|
||||
with_items: "{{ pod_list.stdout_lines }}"
|
||||
when:
|
||||
- item is match('postgres')
|
||||
- imxc_ui == 'jaeger'
|
||||
ignore_errors: true
|
||||
|
||||
- name: 1. helmchart install (imxc-ui-jspd)
|
||||
kubernetes.core.helm:
|
||||
name: "{{item}}"
|
||||
@@ -85,27 +10,7 @@
|
||||
values_files:
|
||||
- "{{ role_path }}/files/06-imxc-ui/{{ item }}/values.yaml"
|
||||
with_items:
|
||||
- imxc-ui-jspd
|
||||
when: imxc_ui == 'jspd'
|
||||
ignore_errors: true
|
||||
|
||||
- name: 3. Copy psql file in postgres (imxc-ui-jspd)
|
||||
kubernetes.core.k8s_cp:
|
||||
namespace: "{{ cmoa_namespace }}"
|
||||
pod: "{{ item }}"
|
||||
remote_path: /tmp/jspd_menumeta.psql
|
||||
local_path: "{{ role_path }}/files/03-ddl-dml/postgres/jspd_menumeta.psql"
|
||||
with_items: "{{ pod_list.stdout_lines }}"
|
||||
when: item is match('postgres') and imxc_ui == 'jspd'
|
||||
ignore_errors: true
|
||||
|
||||
- name: 4. Execute a command in postgres (imxc-ui-jspd)
|
||||
kubernetes.core.k8s_exec:
|
||||
namespace: "{{ cmoa_namespace }}"
|
||||
pod: "{{ item }}"
|
||||
command: bash -c "PGPASSWORD='eorbahrhkswp' && /usr/bin/psql -h 'localhost' -U 'admin' -d 'postgresdb' -f /tmp/jspd_menumeta.psql"
|
||||
with_items: "{{ pod_list.stdout_lines }}"
|
||||
when: item is match('postgres') and imxc_ui == 'jspd'
|
||||
- imxc-ui
|
||||
ignore_errors: true
|
||||
|
||||
- name: 2. Check Kubernetes Pods (imxc ui)
|
||||
|
||||
112
roles/cmoa_install/tasks/06-imxc-ui-install.yml_bak
Normal file
112
roles/cmoa_install/tasks/06-imxc-ui-install.yml_bak
Normal file
@@ -0,0 +1,112 @@
|
||||
---
|
||||
- name: 1. helmchart install (imxc-ui-all)
|
||||
kubernetes.core.helm:
|
||||
name: "{{item}}"
|
||||
release_name: "{{item}}"
|
||||
release_namespace: "{{ cmoa_namespace }}"
|
||||
chart_ref: "{{ role_path }}/files/06-imxc-ui/{{ item }}"
|
||||
create_namespace: yes
|
||||
release_state: present
|
||||
values_files:
|
||||
- "{{ role_path }}/files/06-imxc-ui/{{ item }}/values.yaml"
|
||||
with_items:
|
||||
- imxc-ui-jaeger
|
||||
- imxc-ui-jspd
|
||||
when: imxc_ui == 'all'
|
||||
|
||||
- name: 1. helmchart install (imxc-ui-jaeger)
|
||||
kubernetes.core.helm:
|
||||
name: "{{item}}"
|
||||
release_name: "{{item}}"
|
||||
release_namespace: "{{ cmoa_namespace }}"
|
||||
chart_ref: "{{ role_path }}/files/06-imxc-ui/{{ item }}"
|
||||
create_namespace: yes
|
||||
release_state: present
|
||||
values_files:
|
||||
- "{{ role_path }}/files/06-imxc-ui/{{ item }}/values.yaml"
|
||||
with_items:
|
||||
- imxc-ui-jaeger
|
||||
when: imxc_ui == 'jaeger'
|
||||
|
||||
- name: 2. Change a imxc-ui Service (imxc-ui-jaeger)
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: "{{ jaeger_servicename }}"
|
||||
namespace: "{{ cmoa_namespace }}"
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: "{{ jaeger_service_port }}"
|
||||
nodePort: "{{ jaeger_nodePort }}"
|
||||
apply: yes
|
||||
when: imxc_ui == 'jaeger'
|
||||
|
||||
- name: 2. Get a list of all pods from the namespace
|
||||
command: kubectl -n "{{ cmoa_namespace }}" get pods --no-headers -o custom-columns=":metadata.name" # Output is a column
|
||||
register: pod_list
|
||||
when: imxc_ui != 'all'
|
||||
|
||||
- name: 3. Copy psql file in psql (imxc-jaeger)
|
||||
kubernetes.core.k8s_cp:
|
||||
namespace: "{{ cmoa_namespace }}"
|
||||
pod: "{{ item }}"
|
||||
remote_path: /tmp/jaeger_menumeta.psql
|
||||
local_path: "{{ role_path }}/files/03-ddl-dml/postgres/jaeger_menumeta.psql"
|
||||
with_items: "{{ pod_list.stdout_lines }}"
|
||||
when:
|
||||
- item is match('postgres')
|
||||
- imxc_ui == 'jaeger'
|
||||
ignore_errors: true
|
||||
|
||||
- name: 4. Execute a command in psql (imxc-jaeger)
|
||||
kubernetes.core.k8s_exec:
|
||||
namespace: "{{ cmoa_namespace }}"
|
||||
pod: "{{ item }}"
|
||||
command: bash -c "PGPASSWORD='eorbahrhkswp' && /usr/bin/psql -h 'localhost' -U 'admin' -d 'postgresdb' -f /tmp/jaeger_menumeta.psql"
|
||||
with_items: "{{ pod_list.stdout_lines }}"
|
||||
when:
|
||||
- item is match('postgres')
|
||||
- imxc_ui == 'jaeger'
|
||||
ignore_errors: true
|
||||
|
||||
- name: 1. helmchart install (imxc-ui-jspd)
|
||||
kubernetes.core.helm:
|
||||
name: "{{item}}"
|
||||
release_name: "{{item}}"
|
||||
release_namespace: "{{ cmoa_namespace }}"
|
||||
chart_ref: "{{ role_path }}/files/06-imxc-ui/{{ item }}"
|
||||
create_namespace: yes
|
||||
release_state: present
|
||||
values_files:
|
||||
- "{{ role_path }}/files/06-imxc-ui/{{ item }}/values.yaml"
|
||||
with_items:
|
||||
- imxc-ui-jspd
|
||||
when: imxc_ui == 'jspd'
|
||||
ignore_errors: true
|
||||
|
||||
- name: 3. Copy psql file in postgres (imxc-ui-jspd)
|
||||
kubernetes.core.k8s_cp:
|
||||
namespace: "{{ cmoa_namespace }}"
|
||||
pod: "{{ item }}"
|
||||
remote_path: /tmp/jspd_menumeta.psql
|
||||
local_path: "{{ role_path }}/files/03-ddl-dml/postgres/jspd_menumeta.psql"
|
||||
with_items: "{{ pod_list.stdout_lines }}"
|
||||
when: item is match('postgres') and imxc_ui == 'jspd'
|
||||
ignore_errors: true
|
||||
|
||||
- name: 4. Execute a command in postgres (imxc-ui-jspd)
|
||||
kubernetes.core.k8s_exec:
|
||||
namespace: "{{ cmoa_namespace }}"
|
||||
pod: "{{ item }}"
|
||||
command: bash -c "PGPASSWORD='eorbahrhkswp' && /usr/bin/psql -h 'localhost' -U 'admin' -d 'postgresdb' -f /tmp/jspd_menumeta.psql"
|
||||
with_items: "{{ pod_list.stdout_lines }}"
|
||||
when: item is match('postgres') and imxc_ui == 'jspd'
|
||||
ignore_errors: true
|
||||
|
||||
- name: 2. Check Kubernetes Pods (imxc ui)
|
||||
command: "{{ role_path }}/files/k8s_status {{ cmoa_namespace }}"
|
||||
@@ -12,6 +12,5 @@
|
||||
msg:
|
||||
- =======================================================================================
|
||||
- "## CloudMOA WEB "
|
||||
- CloudMOA Jaeger = http://{{ ansible_default_ipv4.address }}:31080
|
||||
- CloudMOA JSPD = http://{{ ansible_default_ipv4.address }}:31084
|
||||
- http://{{ ansible_default_ipv4.address }}:31080
|
||||
- =======================================================================================
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
tags: worker-dir
|
||||
when: kubernetes_role == 'node'
|
||||
|
||||
- include: helm-install.yml
|
||||
tags: helm-install
|
||||
#- include: helm-install.yml
|
||||
# tags: helm-install
|
||||
|
||||
- include: 00-default-settings-master.yml
|
||||
tags: default_setting
|
||||
|
||||
Reference in New Issue
Block a user