imxc / imxc-ui affinity 추가

This commit is contained in:
ByeonJungHun
2023-11-09 17:30:57 +09:00
parent 5a00cd9ae4
commit fab5fb32c9
27 changed files with 173 additions and 15 deletions

8
cmoa_infra.yaml Executable file
View File

@@ -0,0 +1,8 @@
---
- hosts: cluster
become: true
gather_facts: true
environment:
KUBECONFIG: /root/.kube/ansible_config
roles:
- role: cmoa_os_setting

View File

@@ -5,7 +5,7 @@
environment:
KUBECONFIG: /root/.kube/ansible_config
vars:
REGISTRY: 10.10.31.243:5000/cmoa3
REGISTRY: 10.10.43.224:5000/cmoa3
REPO: "nexus" # dockerhub or nexus
roles:
- role: cmoa_install

View File

@@ -1,5 +1,7 @@
#!/bin/bash
clear
ESC=`printf "\033"`;
input_key() {
@@ -50,7 +52,7 @@ select_menu() {
}
select_test() {
arr_params=("CMOA INSTALL" "CMOA PG Patch");
arr_params=("CMOA INSTALL" "CMOA PG Patch" "Kubernetes Install (Online Only)");
echo -e "\n";
echo ' ______ __ __ ______ ______ __ __ __ ______ ______ ______ __ __ ______ ______ ';
echo '/\ ___\ /\ "-./ \ /\ __ \ /\ __ \ /\ \ /\ "-.\ \ /\ ___\ /\__ _\ /\ __ \ /\ \ /\ \ /\ ___\ /\ == \ ';
@@ -71,6 +73,9 @@ main() {
elif [ $SELECTED -eq 2 ]
then
ansible-playbook -i inventory cmoa_pgpatch.yaml
elif [ $SELECTED -eq 3 ]
then
ansible-playbook -i inventory cmoa_infra.yaml
fi
}
main

View File

@@ -1,11 +1,11 @@
[master]
10.10.43.210
10.10.43.246
[worker1]
10.10.43.211
10.10.43.247
[worker2]
10.10.43.212
10.10.43.248
[cluster:children]
master

View File

@@ -49,7 +49,7 @@ keycloak_realm: exem
# Keycloak administration console user
keycloak_admin_user: admin
keycloak_admin_password: cmoaA13!#
keycloak_admin_password: admin
keycloak_auth_realm: master
keycloak_auth_client: admin-cli
keycloak_context: /auth

View File

@@ -91,7 +91,7 @@ spec:
# name: keycloak-secret
# key: KEYCLOAK_MASTER_USERNAME
- name: KEYCLOAK_PASSWORD
value: "cmoaA13!#"
value: "admin"
#valueFrom:
# secretKeyRef:
# name: keycloak-secret

View File

@@ -13,6 +13,15 @@ spec:
labels:
app: manual
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cmoa
operator: In
values:
- worker2
containers:
- name: manual
image: {{ .Values.global.IMXC_IN_REGISTRY }}/manual:{{ .Values.global.CMOA_MANUAL_VERSION }}

View File

@@ -6,7 +6,7 @@
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=cmoaA13!#" -d "grant_type=password" http://imxc-keycloak-http/auth/realms/master/protocol/openid-connect/token | jq -r '.access_token')"
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

View File

@@ -13,6 +13,15 @@ spec:
labels:
app: auth
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cmoa
operator: In
values:
- worker1
initContainers:
- name: init-resource
image: {{ .Values.global.IMXC_IN_REGISTRY }}/init-resource:latest

View File

@@ -15,6 +15,15 @@ spec:
labels:
app: datagate
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cmoa
operator: In
values:
- worker1
containers:
- image: {{ .Values.global.IMXC_IN_REGISTRY }}/datagate:{{ .Values.global.DATAGATE_VERSION }}
imagePullPolicy: IfNotPresent

View File

@@ -17,6 +17,15 @@ spec:
labels:
app: metric-agent
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cmoa
operator: In
values:
- worker1
containers:
- name: metric-agent
image: {{ .Values.global.IMXC_IN_REGISTRY }}/metric-agent:{{ .Values.global.METRIC_AGENT_VERSION }}

View File

@@ -15,6 +15,15 @@ spec:
labels:
app: metric-collector
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cmoa
operator: In
values:
- worker1
containers:
- name: metric-collector
image: {{ .Values.global.IMXC_IN_REGISTRY }}/metric-collector:{{ .Values.global.METRIC_COLLECTOR_VERSION }}

View File

@@ -15,6 +15,15 @@ spec:
labels:
app: cmoa-kube-info-batch
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cmoa
operator: In
values:
- worker1
containers:
- name: cmoa-kube-info-batch
image: {{ .Values.global.IMXC_IN_REGISTRY }}/kube-info-batch:{{ .Values.global.KUBE_INFO_BATCH_VERSION }}

View File

@@ -15,6 +15,15 @@ spec:
labels:
app: cmoa-kube-info-connector
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cmoa
operator: In
values:
- worker1
containers:
- name: cmoa-kube-info-connector
image: {{ .Values.global.IMXC_IN_REGISTRY }}/kube-info-connector:{{ .Values.global.KUBE_INFO_CONNECTOR_VERSION }}

View File

@@ -15,6 +15,15 @@ spec:
labels:
app: cmoa-kube-info-flat
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cmoa
operator: In
values:
- worker1
containers:
- name: cmoa-kube-info-flat
image: {{ .Values.global.IMXC_IN_REGISTRY }}/kube-info-flat:{{ .Values.global.KUBE_INFO_FLAT_VERSION }}

View File

@@ -13,6 +13,15 @@ spec:
labels:
app: manual
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cmoa
operator: In
values:
- worker1
containers:
- name: manual
image: {{ .Values.global.IMXC_IN_REGISTRY }}/manual:{{ .Values.global.CMOA_MANUAL_VERSION }}

View File

@@ -31,6 +31,15 @@ spec:
labels:
app: eureka
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cmoa
operator: In
values:
- worker2
containers:
- name: eureka
image: {{ .Values.global.IMXC_IN_REGISTRY }}/eureka-server:{{ .Values.global.EUREKA_SERVER_VERSION }}

View File

@@ -39,6 +39,15 @@ spec:
app: imxc-api
build: develop
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cmoa
operator: In
values:
- worker2
securityContext:
#runAsNonRoot: true
runAsUser: 1577

View File

@@ -18,6 +18,15 @@ items:
labels:
app: cmoa-collector
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cmoa
operator: In
values:
- worker2
securityContext:
runAsNonRoot: true
runAsUser: 65534

View File

@@ -13,6 +13,15 @@ spec:
labels:
app: noti
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cmoa
operator: In
values:
- worker2
containers:
- name: noti-server
image: {{ .Values.global.IMXC_IN_REGISTRY }}/notification-server:{{ .Values.global.NOTI_SERVER_VERSION }}

View File

@@ -15,6 +15,15 @@ spec:
labels:
app: kafka-stream-txntrend
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cmoa
operator: In
values:
- worker2
containers:
- name: kafka-stream-txntrend
image: {{ .Values.global.IMXC_IN_REGISTRY }}/kafka-stream-txntrend:{{ .Values.global.KAFKA_STREAM_VERSION }}

View File

@@ -15,6 +15,15 @@ spec:
labels:
app: cloud
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cmoa
operator: In
values:
- worker2
containers:
- env:
- name: SPRING_PROFILES_ACTIVE

View File

@@ -86,7 +86,7 @@ global:
KEYCLOAK_AUTH_SERVER_URL: http://111.111.111.111:31082/auth
KEYCLOAK_RESOURCE: authorization_server
KEYCLOAK_MASTER_USERNAME: admin
KEYCLOAK_MASTER_PASSWORD: cmoaA13!#
KEYCLOAK_MASTER_PASSWORD: admin
IMXC_PORTAL_INFO_URL:
KEYCLOAK_REALM: exem
# added by EunHye Kim 2021-08-25

View File

@@ -6,7 +6,7 @@
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=cmoaA13!#" -d "grant_type=password" http://imxc-keycloak-http/auth/realms/master/protocol/openid-connect/token | jq -r '.access_token')"
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

View File

@@ -33,6 +33,16 @@ spec:
labels:
app: imxc-ui
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: cmoa
operator: In
values:
- worker2
containers:
- name: imxc-ui
image: {{ .Values.global.IMXC_IN_REGISTRY }}/ui-server:{{ .Values.global.UI_SERVER_VERSION }}

View File

@@ -86,7 +86,7 @@ global:
KEYCLOAK_AUTH_SERVER_URL: http://111.111.111.111:31082/auth
KEYCLOAK_RESOURCE: authorization_server
KEYCLOAK_MASTER_USERNAME: admin
KEYCLOAK_MASTER_PASSWORD: cmoaA13!#
KEYCLOAK_MASTER_PASSWORD: "admin"
IMXC_PORTAL_INFO_URL:
KEYCLOAK_REALM: exem
# added by EunHye Kim 2021-08-25

View File

@@ -107,16 +107,16 @@ containerd_config:
conf_template: ""
registry:
configs:
"10.10.31.243:5000":
"10.10.43.224:5000":
tls:
insecure_skip_verify: true
mirrors:
"docker.io":
endpoint:
- https://registry-1.docker.io
"10.10.31.243:5000":
"10.10.43.224:5000":
endpoint:
- "http://10.10.31.243:5000"
- "http://10.10.43.224:5000"
x509_key_pair_streaming:
tls_cert_file: ""
tls_key_file: ""