IBM Sterling: Deploy do Sterling B2B no OpenShift: Difference between revisions

From Wiki
 
(One intermediate revision by the same user not shown)
Line 173: Line 173:
  oc create -f b2bi-secrets.yaml
  oc create -f b2bi-secrets.yaml


==Ajustando o arguivo override.yaml==
==Ajustando o arquivo override.yaml==
 
Execute o seguinte comando:
 
cd ibm-b2bi-prod


1) Pegando a informação do pullSecret
1) Pegando a informação do pullSecret
Line 192: Line 188:
2) Crie o arquivo '''my-b2bi-override.yaml''' e faça os ajustes
2) Crie o arquivo '''my-b2bi-override.yaml''' e faça os ajustes


  global:
  <nowiki>
  image:
global:
    repository: "image-registry.openshift-image-registry.svc:5000/sterling-b2bi-app/b2bi"
  image:
    tag: "6.1.0.0"
    repository: "image-registry.openshift-image-registry.svc:5000/sterling-b2bi-app/b2bi"
    pullPolicy: IfNotPresent
    tag: "6.1.0.0"
    pullSecret: "'''default-dockercfg-mrk6k'''# oc describe sa default ; at purge image also
    pullPolicy: IfNotPresent
 
    # Get value  --> "oc describe sa default" and check line
appResourcesPVC:
    pullSecret: "default-dockercfg-<CHANGE HERE>"   
  name: sterling-b2bi-app-resources-pvc
 
  storageClassName: "ibmc-file-gold"
appResourcesPVC:
  selector:
  enabled: true
    label: "intent"
  name: sterling-b2bi-app-resources-pvc
    value: "resources"
  storageClassName: "ibmc-file-gold"
  accessMode: ReadOnlyMany
  selector:
  size: 500Mi
    label: "intent"
    value: "resources"
appLogsPVC:
  accessMode: ReadOnlyMany
  name: sterling-b2bi-app-logs-pvc
  size: 500Mi
  storageClassName: "ibmc-file-gold"
 
  selector:
appLogsPVC:
    label: "intent"
  name: sterling-b2bi-app-logs-pvc
    value: "logs"
  storageClassName: "ibmc-file-gold"
  accessMode: ReadWriteMany
  selector:
  size: 1000Mi
    label: "intent"
 
    value: "logs"
appDocumentsPVC:
  accessMode: ReadWriteMany
  enabled: true
  size: 1000Mi
  name: sterling-b2bi-app-documents-pvc
 
  storageClassName: "ibmc-file-gold"
appDocumentsPVC:
  selector:
  enabled: true
    label: "intent"
  name: sterling-b2bi-app-documents-pvc
    value: "documents"
  storageClassName: "ibmc-file-gold"
  accessMode: ReadWriteMany
  selector:
  size: 1Gi
    label: "intent"
    value: "documents"
security:
  accessMode: ReadWriteMany
  supplementalGroups: [65534]
  size: 1Gi
  fsGroup: 1010
 
  runAsUser: 1010
security:
  supplementalGroups: [65534]
dataSetup:
  fsGroup: 1010
  enabled: true
  runAsUser: 1010
  upgrade: false
 
dataSetup:
env:
  # enabled=true only on setup, after enabled=false
  tz: "UTC"
  enabled: true
  license: "accept"
  upgrade: false
  upgradeCompatibilityVerified: false
 
 
env:
logs:
  tz: "UTC"
  # true if user wish to redirect the application logs to console else false. If provided value is true , then application logs will reside inside containers. No volume mapping will be used.
  license: "accept"
  enableAppLogOnConsole: false
  upgradeCompatibilityVerified: false
     
 
  #setup.cfg configuration starts here. Property names must follow camelCase format.
logs:
setupCfg:
  enableAppLogOnConsole: false
  #Upgrade
     
  #upgrade: false
setupCfg:
  basePort: 5000
  #Upgrade
  #License - specify values as true/false
  #upgrade: false
  licenseAcceptEnableSfg: true
  basePort: 50000
  licenseAcceptEnableSfg: true
  # Name of system passphrase secret if available
  licenseAcceptEnableEbics: false
  systemPassphraseSecret: b2b-system-passphrase-secret
  licenseAcceptEnableFinancialServices: false
  enableFipsMode: false
  licenseAcceptEnableFileOperation: false
  nistComplianceMode: "off"
 
  # Name of system passphrase secret if available
  # Provide the DB attributes --> "oc get svc -n sterling-b2bi-db2"
  systemPassphraseSecret: b2b-system-passphrase-secret
  dbVendor: db2
  enableFipsMode: false
  dbHost: 169.46.72.83
  nistComplianceMode: "off"
  dbPort: 50000   
 
  dbData: B2BIDB
  # Database Attributes --> "oc get svc -n sterling-b2bi-db2" ->  #  <EXTERNAL-IP>
  dbDrivers: db2jcc4.jar
  dbVendor: db2
  dbCreateSchema: true
  dbHost: <CHANGE HERE>       
  # Name of DB secret
  dbPort: 50000   
  dbSecret: b2b-db-secret
  dbData: B2BIDB
  dbDrivers: db2jcc4.jar
  #Provide the admin email address
  dbSecret: b2b-db-secret
  adminEmailAddress: [email protected]
  # enabled=true only on setup, after enabled=false
  # Provide the SMTP host details 
  dbCreateSchema: true
  smtpHost: mail.company.com
 
 
  # SMTP Attributes
  #WMQ  --> "oc get svc -n sterling-b2bi-mq"
  adminEmailAddress: [email protected]
  #JMS properties are optional if jmsVendor is empty
  smtpHost: mail.company.com
  #To use IBMMQ for communication between ASI & AC, change property to jmsVendor: IBMMQ
 
  # and provide other connection details
  #WMQ  --> "oc get svc -n sterling-b2bi-mq"
  jmsVendor: IBMMQ
  #JMS properties are optional if jmsVendor is empty
  # Provide the name of connection factory class.
  #To use IBMMQ for communication between ASI & AC, change property to jmsVendor: IBMMQ and provide other connection details
  jmsConnectionFactory: com.ibm.mq.jms.MQQueueConnectionFactory
  jmsVendor: IBMMQ
  jmsConnectionFactoryInstantiator:
  jmsConnectionFactory: com.ibm.mq.jms.MQQueueConnectionFactory
  jmsQueueName: DEV.QUEUE.1
  jmsConnectionFactoryInstantiator:
  jmsHost: 172.21.6.39
  jmsQueueName: DEV.QUEUE.1
  jmsPort: 1414
  jmsHost: <CHANGE HERE>
  jmsConnectionNameList: 172.21.6.39(1414)
  jmsPort: 1414
  jmsEnableSsl: false
  jmsConnectionNameList: <CHANGE HERE>(1414)
  jmsChannel: DEV.APP.SVRCONN
  jmsEnableSsl: false
  jmsSecret: sterling-b2bi-mq-secret
  jmsChannel: DEV.APP.SVRCONN
 
  jmsSecret: b2b-jms-secret
  SANDBOX_LAUNCH_CLA2_SERVER: true
 
  SANDBOX_WEBAPP_PROTOCOL: https
  updateJcePolicyFile: false
  SANDBOX_WEBAPP_LIST_PORT: 5001
  #jcePolicyFile: local_policy.jar
 
asi:
  SANDBOX_LAUNCH_CLA2_SERVER: true
  replicaCount: 1
  SANDBOX_WEBAPP_PROTOCOL: https
  SANDBOX_WEBAPP_LIST_PORT: 5001
  service:
 
    type: LoadBalancer
asi:
    ports:
  replicaCount: 1
      http:  
 
        name: http
  frontendService:
        port: 35000
    type: ClusterIP
        targetPort: http
    ports:
        nodePort: 30000
      http:  
        protocol: TCP
        name: http
        port: 35000
    extraPorts:
        targetPort: http
      TCP1:
        nodePort: 30000
        name: asi-http-1
        protocol: TCP
        port: 6443
      https:
        targetPort: 6443
        name: https
        protocol: TCP
        port: 35001
      TCP2:
        targetPort: https
        name: asi-sftp-1
        nodePort: 30001
        port: 6022
        protocol: TCP
        targetPort: 6022
      soa:
        protocol: TCP
        name: soa
             
        port: 35002
  ac:
        targetPort: soa
        nodePort: 30002
  replicaCount: 1
        protocol: TCP
      soassl:  
  service:
        name: soassl
    type: LoadBalancer
        port: 35003
    ports:
        targetPort: soassl
      http:  
        nodePort: 30003
        name: http
        protocol: TCP
        port: 35001
    extraPorts: []
        targetPort: http
      #-name: http-1
        nodePort: 30001
      # port: 46000
        protocol: TCP
      # targetPort: http
   
      # nodePort: 30100
    extraPorts:
      # protocol: TCP
      TCP1:
 
        name: ac-http-1
  backendService:
        port: 5443
    #type: NodePort
        targetPort: 5443
    type: LoadBalancer
        protocol: TCP
    ports:  
      TCP2:
      - name: adapter-1
        name: ac-sftp-1
        port: 30201
        port: 5022
        targetPort: 30201
        targetPort: 5022
        nodePort: 30201
        protocol: TCP  
        protocol: TCP
   
    portRanges:
  api:
      - name: adapters
   
        portRange: 30301-30400
   replicaCount: 1
        targetPortRange: 30301-30400
 
        nodePortRange: 30301-30400
  service:
        protocol: TCP
    type: LoadBalancer
 
    ports:
  ingress:
      http:
    internal:
        name: http
      # Get this value on IBM Cloud > Console > OpenShift > Cluster > <YOUR_CLUSTER> > Ingress Domain
        port: 35002
      host: asi.<YOUR_CLUSTER Ingress Domain>
        targetPort: http
      tls:
        nodePort: 30002
        enabled: true
        protocol: TCP
        secretName: ""
      https:
      extraPaths: []
        name: https
      # - routePrefix: "hello"
        port: 35003
      #    path: "/hello"
        targetPort: https
      #    servicePort: "my-http"
        nodePort: 30003
      #    enableHttps: false
        protocol: TCP  
           
ac:
dashboard:
 
    enabled: true
  replicaCount: 1
 
purge:
  frontendService:
  enabled: true
    type: ClusterIP
  image:
    ports:
    repository: "image-registry.openshift-image-registry.svc:5000/sterling-b2bi-app/purge"
      http:  
  # Provide the tag value in double quotes
        name: http
    tag: "6.1.0.0"
        port: 35004
    pullPolicy: IfNotPresent
        targetPort: http
    pullSecret: "default-dockercfg-mrk6k"
        nodePort: 30004
  schedule: "*/30 * * * *"
        protocol: TCP
    extraPorts: []
      #-name: http-1
      # port: 37000
      # targetPort: http
      # nodePort: 30200
      # protocol: TCP
 
  backendService:
    #type: NodePort
    type: LoadBalancer
    ports:  
      - name: adapter-1
        port: 30401
        targetPort: 30401
        nodePort: 30401
        protocol: TCP
    portRanges: []
      #- name: adapters
      # portRange: 30501-30600
      # targetPortRange: 30501-30600
      #  nodePortRange: 30501-30600
      #  protocol: TCP
 
  ingress:
    internal:
      # Get this value on IBM Cloud > Console > OpenShift > Cluster > <YOUR_CLUSTER> > Ingress Domain
      host: ac.<YOUR_CLUSTER Ingress Domain>
      tls:
        enabled: true
        secretName: ""
      extraPaths: []
      # - routePrefix: "hello"
      #    path: "/hello"
      #    servicePort: "my-http"
      #    enableHttps: false    
 
api:
 
  replicaCount: 1
 
  frontendService:
    type: ClusterIP
    ports:
      http:
        name: http
        port: 35005
        targetPort: http
        nodePort: 30005
        protocol: TCP
      https:
        name: https
        port: 35006
        targetPort: https
        nodePort: 30006
        protocol: TCP
    extraPorts: []
      #-name: http-1
      # port: 35000
      # targetPort: http
      # nodePort: 30300
      # protocol: TCP
 
  ingress:
    internal:
      # Get this value on IBM Cloud > Console > OpenShift > Cluster > <YOUR_CLUSTER> > Ingress Domain
      host: api.<CHANGE HERE YOUR_CLUSTER Ingress Domain>
      tls:
        enabled: true
        secretName: ""
 
dashboard:
    enabled: true
 
purge:
  enabled: true
  image:
    repository: "image-registry.openshift-image-registry.svc:5000/sterling-b2bi-app/purge"
    tag: "6.1.0.0"
    pullPolicy: IfNotPresent
    # Get value  --> oc describe sa default
    pullSecret: "default-dockercfg-<CHANGE HERE>"
  schedule: "*/30 * * * *"
  startingDeadlineSeconds:
  activeDeadlineSeconds: 3600
  concurrencyPolicy: Forbid
  suspend: false
  successfulJobsHistoryLimit: 3
  failedJobsHistoryLimit: 1
</nowiki>
 
salve e feche o arquivo.


== Executando o Deploy com o Helm ==
== Executando o Deploy com o Helm ==

Latest revision as of 01:34, 26 May 2021

Procedimento

Alternando para o Projeto

1) O projeto já foi criado anteriormente, vamos alter para ele

oc project sterling-b2bi-app

Executando os scripts pre-instalação

1) Extrair o arquivo ibm-b2bi-prod-2.0.0.tgz, que vinha com o arquivo STER_B2B_INT_CERT_CONT_V6.1_ML.tar

tar -xzvf ibm-b2bi-prod-2.0.0.tgz

2) Alternar o diretório e executar as permissões

cd ibm-b2bi-prod/ibm_cloud_pak/pak_extensions/pre-install/clusterAdministration

oc apply -f ibm-b2bi-scc.yaml --validate=false
oc apply -f ibm-b2bi-cr-scc.yaml --validate=false
oc apply -f ibm-b2bi-psp.yaml
oc apply -f ibm-b2bi-cr.yaml

cd ../../../../..

retornar para o diretório anterior

3) Alternar o diretório, gerar os novos arquivos e criar as permissões

cd ibm-b2bi-prod/ibm_cloud_pak/pak_extensions/pre-install/namespaceAdministration

sed 's/{{ NAMESPACE }}/'$MY_SB2BI_PROJECT'/g' ibm-b2bi-rb-scc.yaml > my-ibm-b2bi-rb-scc.yaml
sed 's/{{ NAMESPACE }}/'$MY_SB2BI_PROJECT'/g' ibm-b2bi-rb.yaml > my-ibm-b2bi-rb.yaml

oc create -f my-ibm-b2bi-rb-scc.yaml
oc create -f my-ibm-b2bi-rb.yaml

cd ../../../../..

Configurando o Armazenamento

1) Localize as informações necessárias no default storage volume (volume de armazenamento padrão)

oc get pv -n openshift-image-registry

NAME       CAPACITY ACCESS MOD  RECLAIM POLICY  STATUS  CLAIM                                              STORAGECLASS    
pvc-42...  20Gi     RWO           Delete          Bound   sterling-b2bi-mq/data-mqsterling-ibm-mq-0                                 
pvc-99...  100Gi    RWX           Delete          Bound   openshift-image-registry/image-registry-storage  ibmc-file-gold      
pvc-ac3... 20Gi     RWO           Delete          Bound   sterling-b2bi-db2/db2vol-db2-0                                          

2) Pegue os detalhes do pv

oc describe pv pvc-99...

:Ref 5
...
failure-domain.beta.kubernetes.io/region=us-south
failure-domain.beta.kubernetes.io/zone=dal10
...
Type:   NFS (an NFS mount that lasts the lifetime of a pod)
Server: fsf-xxxxxxx-xx.adn.networklayer.com
Path:   /IBMxxSEVxxxxxxx_xx/data01
...

3) Crie o arquivo my-b2bi-pv.yaml e faça os ajustes

kind: PersistentVolume
apiVersion: v1
metadata:
  name: sterling-b2bi-app-resources-pv
  labels:
    intent: resources
spec:
  storageClassName: "ibmc-file-gold"
  accessModes:
    - ReadOnlyMany
  capacity: 
    storage: 500Mi
  nfs:
   server: fsf-xxxxxxx-xx.adn.networklayer.com
   path: /IBMxxSEVxxxxxxx_xx/data01/resources/

---
kind: PersistentVolume
apiVersion: v1
metadata:
  name: sterling-b2bi-app-logs-pv
  labels:
    intent: logs
spec:
  storageClassName: "ibmc-file-gold"
  accessModes:
    - ReadWriteMany
  capacity: 
    storage: 1000Mi
  nfs:
   server: fsf-xxxxxxx-xx.adn.networklayer.com
   path: /IBMxxSEVxxxxxxx_xx/data01/logs/

---
kind: PersistentVolume
apiVersion: v1
metadata:
  name: sterling-b2bi-app-documents-pv
  labels:
    intent: documents
spec:
  storageClassName: "ibmc-file-gold"
  accessModes:
    - ReadWriteMany
  capacity: 
    storage: 1Gi
  nfs:
   server: fsf-xxxxxxx-xx.adn.networklayer.com
   path: /IBMxxSEVxxxxxxx_xx/data01/documents/

4) Realize a criação do PV/PVC

oc create -f my-b2bi-pv.yaml

persistentvolume/sterling-b2bi-app-resources-pv created
persistentvolume/sterling-b2bi-app-logs-pv created
persistentvolume/sterling-b2bi-app-documents-pv created

Configurando a passphrase para B2Bi, DB secret e MQ secret

1) Crie o arquivo b2bi-secrets.yaml e faça os ajustes

apiVersion: v1
kind: Secret
metadata:
  name: b2b-system-passphrase-secret
type: Opaque
stringData:
  SYSTEM_PASSPHRASE: password

---
apiVersion: v1
kind: Secret
metadata:
  name: b2b-db-secret
type: Opaque
stringData:
  DB_USER: db2inst1
  DB_PASSWORD: db2inst1
#  DB_TRUSTSTORE_PASSWORD: password
#  DB_KEYSTORE_PASSWORD: password

---
apiVersion: v1
kind: Secret
metadata:
  name: b2b-jms-secret
type: Opaque
stringData:
  JMS_USERNAME: jms
  JMS_PASSWORD: password
  JMS_KEYSTORE_PASSWORD: password
  JMS_TRUSTSTORE_PASSWORD: password
  
---
apiVersion: v1
kind: Secret
metadata:
  name: b2b-liberty-secret
type: Opaque
stringData:
  LIBERTY_KEYSTORE_PASSWORD: password

2) Realize a criação do PV/PVC

oc create -f b2bi-secrets.yaml

Ajustando o arquivo override.yaml

1) Pegando a informação do pullSecret

oc describe sa default

Name:                default
Namespace:           sterling-b2bi-app
Labels:              <none>
Annotations:         <none>
Image pull secrets:  default-dockercfg-mrk6k
...

2) Crie o arquivo my-b2bi-override.yaml e faça os ajustes

global:
  image:
    repository: "image-registry.openshift-image-registry.svc:5000/sterling-b2bi-app/b2bi"
    tag: "6.1.0.0"
    pullPolicy: IfNotPresent
    # Get value  --> "oc describe sa default" and check line 
    pullSecret: "default-dockercfg-<CHANGE HERE>"  
  
appResourcesPVC:
  enabled: true
  name: sterling-b2bi-app-resources-pvc
  storageClassName: "ibmc-file-gold"
  selector:
    label: "intent"
    value: "resources"
  accessMode: ReadOnlyMany
  size: 500Mi

appLogsPVC:
  name: sterling-b2bi-app-logs-pvc
  storageClassName: "ibmc-file-gold"
  selector:
    label: "intent"
    value: "logs"
  accessMode: ReadWriteMany
  size: 1000Mi
  
appDocumentsPVC:
  enabled: true
  name: sterling-b2bi-app-documents-pvc
  storageClassName: "ibmc-file-gold"
  selector:
    label: "intent"
    value: "documents"
  accessMode: ReadWriteMany
  size: 1Gi

security:
  supplementalGroups: [65534]
  fsGroup: 1010
  runAsUser: 1010

dataSetup:
  # enabled=true only on setup, after enabled=false
  enabled: true
  upgrade: false

env:
  tz: "UTC"
  license: "accept"
  upgradeCompatibilityVerified: false
  
logs:
  enableAppLogOnConsole: false
      
setupCfg:
  #Upgrade
  #upgrade: false
  basePort: 50000
  licenseAcceptEnableSfg: true
  licenseAcceptEnableEbics: false
  licenseAcceptEnableFinancialServices: false
  licenseAcceptEnableFileOperation: false

  # Name of system passphrase secret if available
  systemPassphraseSecret: b2b-system-passphrase-secret
  enableFipsMode: false
  nistComplianceMode: "off"

  # Database Attributes --> "oc get svc -n sterling-b2bi-db2"  ->  #  <EXTERNAL-IP>
  dbVendor: db2
  dbHost: <CHANGE HERE>        
  dbPort: 50000  
  dbData: B2BIDB
  dbDrivers: db2jcc4.jar
  dbSecret: b2b-db-secret
  # enabled=true only on setup, after enabled=false
  dbCreateSchema: true

  # SMTP Attributes
  adminEmailAddress: [email protected]
  smtpHost: mail.company.com
  
  #WMQ   --> "oc get svc -n sterling-b2bi-mq"
  #JMS properties are optional if jmsVendor is empty
  #To use IBMMQ for communication between ASI & AC, change property to jmsVendor: IBMMQ and provide other connection details
  jmsVendor: IBMMQ
  jmsConnectionFactory: com.ibm.mq.jms.MQQueueConnectionFactory
  jmsConnectionFactoryInstantiator:
  jmsQueueName: DEV.QUEUE.1
  jmsHost: <CHANGE HERE> 
  jmsPort: 1414
  jmsConnectionNameList: <CHANGE HERE>(1414)
  jmsEnableSsl: false
  jmsChannel: DEV.APP.SVRCONN
  jmsSecret: b2b-jms-secret

  updateJcePolicyFile: false
  #jcePolicyFile: local_policy.jar
  
  SANDBOX_LAUNCH_CLA2_SERVER: true
  SANDBOX_WEBAPP_PROTOCOL: https
  SANDBOX_WEBAPP_LIST_PORT: 5001

asi:
  replicaCount: 1

  frontendService:
    type: ClusterIP
    ports:
      http: 
        name: http
        port: 35000
        targetPort: http
        nodePort: 30000
        protocol: TCP
      https: 
        name: https
        port: 35001
        targetPort: https
        nodePort: 30001
        protocol: TCP
      soa: 
        name: soa
        port: 35002
        targetPort: soa
        nodePort: 30002
        protocol: TCP
      soassl: 
        name: soassl
        port: 35003
        targetPort: soassl
        nodePort: 30003
        protocol: TCP
    extraPorts: []
      #-name: http-1
      # port: 46000
      # targetPort: http
      # nodePort: 30100
      # protocol: TCP

  backendService:
    #type: NodePort
    type: LoadBalancer
    ports: 
      - name: adapter-1
        port: 30201
        targetPort: 30201
        nodePort: 30201
        protocol: TCP
    portRanges: 
      - name: adapters
        portRange: 30301-30400
        targetPortRange: 30301-30400
        nodePortRange: 30301-30400
        protocol: TCP
  
  ingress:
    internal:
      # Get this value on IBM Cloud > Console > OpenShift > Cluster > <YOUR_CLUSTER> > Ingress Domain
      host: asi.<YOUR_CLUSTER Ingress Domain>
      tls:
        enabled: true
        secretName: ""
      extraPaths: []
      #  - routePrefix: "hello"
      #    path: "/hello"
      #    servicePort: "my-http"
      #    enableHttps: false
             
ac:

  replicaCount: 1

  frontendService:
    type: ClusterIP
    ports:
      http: 
        name: http
        port: 35004
        targetPort: http
        nodePort: 30004
        protocol: TCP
    extraPorts: []
      #-name: http-1
      # port: 37000
      # targetPort: http
      # nodePort: 30200
      # protocol: TCP
  
  backendService:
    #type: NodePort
    type: LoadBalancer
    ports: 
      - name: adapter-1
        port: 30401
        targetPort: 30401
        nodePort: 30401
        protocol: TCP
    portRanges: []
      #- name: adapters
      #  portRange: 30501-30600
      #  targetPortRange: 30501-30600
      #  nodePortRange: 30501-30600
      #  protocol: TCP

  ingress:
    internal:
      # Get this value on IBM Cloud > Console > OpenShift > Cluster > <YOUR_CLUSTER> > Ingress Domain
      host: ac.<YOUR_CLUSTER Ingress Domain>
      tls:
        enabled: true
        secretName: ""
      extraPaths: []
      #  - routePrefix: "hello"
      #    path: "/hello"
      #    servicePort: "my-http"
      #    enableHttps: false    

api:

  replicaCount: 1

  frontendService:
    type: ClusterIP
    ports:
      http:
        name: http
        port: 35005
        targetPort: http
        nodePort: 30005
        protocol: TCP
      https:
        name: https
        port: 35006
        targetPort: https
        nodePort: 30006
        protocol: TCP
    extraPorts: []
      #-name: http-1
      # port: 35000
      # targetPort: http
      # nodePort: 30300
      # protocol: TCP

  ingress:
    internal:
      # Get this value on IBM Cloud > Console > OpenShift > Cluster > <YOUR_CLUSTER> > Ingress Domain
      host: api.<CHANGE HERE YOUR_CLUSTER Ingress Domain>
      tls:
        enabled: true
        secretName: ""

dashboard:
    enabled: true

purge:
  enabled: true
  image:
    repository: "image-registry.openshift-image-registry.svc:5000/sterling-b2bi-app/purge"
    tag: "6.1.0.0"
    pullPolicy: IfNotPresent
    # Get value  --> oc describe sa default
    pullSecret: "default-dockercfg-<CHANGE HERE>"
  schedule: "*/30 * * * *"
  startingDeadlineSeconds:
  activeDeadlineSeconds: 3600
  concurrencyPolicy: Forbid
  suspend: false
  successfulJobsHistoryLimit: 3
  failedJobsHistoryLimit: 1

salve e feche o arquivo.

Executando o Deploy com o Helm

1) Execute o seguinte comando:

cd ibm-b2bi-prod

helm install sterling-b2bi-app --namespace sterling-b2bi-app --timeout 120m0s -f ../my-b2bi-override.yaml .

Essa operação é bem demorada. Vá tomar um café!!!

2) Abra uma nova janela de terminal e execute o comando

oc get pods

NAME                                    READY   STATUS    RESTARTS   AGE
sterling-b2bi-app-b2bi-db-setup-fbf64   1/1     Running   0          12m

3) Execute o comando para acompanhar

oc logs -f sterling-b2bi-app-b2bi-db-setup-fbf64

O resultado final é

Total B2biSetup time : 01:31:02
Total B2biInDockerTotal time: 01:33:05

4) Conferindo o resultado

oc get pods

NAME                                    READY   STATUS    RESTARTS   AGE
sterling-b2bi-app-b2bi-ac-server-0                  1/1     Running     0          3h6m
sterling-b2bi-app-b2bi-api-server-0                 1/1     Running     0          3h6m
sterling-b2bi-app-b2bi-asi-server-0                 1/1     Running     0          3h6m
oc get jobs
NAME                              COMPLETIONS   DURATION   AGE
sterling-b2bi-app-b2bi-db-setup   1/1           93m        3h31

Pós install

Após o deploy, devemos desabilitar o setup do database, caso seja necessário executar o helm install novamente

1) Edite o arquivo my-b2bi-override.yaml e altere os parâmetros para false:

...
dataSetup:
  enabled: false
...
setupCfg:
  ...
  dbCreateSchema: false

Salve e feche o arquivo

Dicas

Pegando a url para acesso

oc get routes


NAME                                                      HOST/PORT                                       PATH     
sterling-b2bi-app-b2bi-api-internal-route                 api.ebasso-roks-demo-sb2bi8...appdomain.cloud                      ...  
sterling-b2bi-app-b2bi-api-internal-route-b2bapi          api.ebasso-roks-demo-sb2bi8...appdomain.cloud   /B2BAPIs/svc       ...  
sterling-b2bi-app-b2bi-api-internal-route-customization   api.ebasso-roks-demo-sb2bi8...appdomain.cloud   /propertyUI/app    ...  
sterling-b2bi-app-b2bi-asi-internal-route                 asi.ebasso-roks-demo-sb2bi8...appdomain.cloud                      ...  
sterling-b2bi-app-b2bi-asi-internal-route-dashboard       asi.ebasso-roks-demo-sb2bi8...appdomain.cloud   /dashboard         ...  
sterling-b2bi-app-b2bi-asi-internal-route-filegateway     asi.ebasso-roks-demo-sb2bi8...appdomain.cloud   /filegateway       ...  
sterling-b2bi-app-b2bi-asi-internal-route-mailbox         asi.ebasso-roks-demo-sb2bi8...appdomain.cloud   /mailbox           ...  
sterling-b2bi-app-b2bi-asi-internal-route-myfg            asi.ebasso-roks-demo-sb2bi8...appdomain.cloud   /myfg              ...  
sterling-b2bi-app-b2bi-asi-internal-route-myfilegateway   asi.ebasso-roks-demo-sb2bi8...appdomain.cloud   /myfilegateway     ...  
sterling-b2bi-app-b2bi-asi-internal-route-queuewatch      asi.ebasso-roks-demo-sb2bi8...appdomain.cloud   /queueWatch        ...  
sterling-b2bi-app-b2bi-asi-internal-route-soap            asi.ebasso-roks-demo-sb2bi8...appdomain.cloud   /soap              ...  
sterling-b2bi-app-b2bi-asi-internal-route-soap-new        asi.ebasso-roks-demo-sb2bi8...appdomain.cloud   /soap-new          ...  
sterling-b2bi-app-b2bi-asi-internal-route-soap-sync       asi.ebasso-roks-demo-sb2bi8...appdomain.cloud   /soap-sync         ...  
sterling-b2bi-app-b2bi-asi-internal-route-soap-sync-new   asi.ebasso-roks-demo-sb2bi8...appdomain.cloud   /soap-sync-new     ...  
sterling-b2bi-app-b2bi-asi-internal-route-wsdl            asi.ebasso-roks-demo-sb2bi8...appdomain.cloud   /wsdl              ...  

Acesse com um navegador

https://asi.ebasso-roks-demo-sb2bi8...appdomain.cloud/dashboard

Verificando em quais Nodes nossos Pods estão executando

Vamos pegar os nome dos Nodes primeiro

$ oc get nodes
NAME           STATUS   ROLES           AGE     VERSION
10.xxx.xx.68   Ready    master,worker   6h29m   v1.19.0+d856161
10.xxx.xx.73   Ready    master,worker   6h24m   v1.19.0+d856161

Listando o Primeiro Node

oc get pods --all-namespaces -o wide --field-selector spec.nodeName=10.xxx.xx.68 | grep sterling

NAMESPACE               NAME                                                  READY   STATUS
sterling-b2bi-app       sterling-b2bi-app-b2bi-ac-server-0                    1/1     Running
sterling-b2bi-app       sterling-b2bi-app-b2bi-api-server-0                   1/1     Running

Listando o Segundo Node

oc get pods --all-namespaces -o wide --field-selector spec.nodeName=10.xxx.xx.73 | grep sterling

NAMESPACE               NAME                                                  READY   STATUS
sterling-b2bi-app       sterling-b2bi-app-b2bi-asi-server-0                    1/1     Running  
sterling-b2bi-app       sterling-b2bi-app-b2bi-ext-purge-1621981800-lfpll      0/1     Completed
sterling-b2bi-app       sterling-b2bi-app-b2bi-ext-purge-1621985400-zvszc      0/1     Completed
sterling-b2bi-app       sterling-b2bi-app-b2bi-ext-purge-1621989000-lfg8h      1/1     Running  
sterling-b2bi-db2       db2-0                                                  1/1     Running  
sterling-b2bi-mq        sterling-b2bi-mq-ibm-mq-0                              1/1     Running  
sterling-b2bi-toolkit   sterling-b2bi-toolkit-859c45f7c-mr6h8                  1/1     Running

See Also