IBM Sterling: Configurando o Container Toolkit no OpenShift

From Wiki

O Toolkit é um projeto "temporário" para colocar alguns arquivos necessários para o Sterling B2Bi.

Os arquivos são:

  • JDBC drivers
  • Local Policy
Nesta versão vou utilizar alocada do openshift-image-registry

Procedimento

Criando o Projeto

1) Crie um novo projeto no OpenShift para o MQ e defina contas de serviço e permissões.

oc new-project sterling-b2bi-toolkit

2) Defina as permissão.

oc adm policy add-scc-to-user anyuid -z default -n sterling-b2bi-toolkit

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 toolkit-pv-pvc.yaml e faça os ajustes

apiVersion: v1
kind: PersistentVolume
metadata:
 name: sterling-b2bi-toolkit-pv
 labels:
   failure-domain.beta.kubernetes.io/region: <your region>
   failure-domain.beta.kubernetes.io/zone: <your zone>
spec:
 capacity:
   storage: 20Gi
 accessModes:
   - ReadWriteMany
 nfs:
  server: fsf-xxxxxxx-xx.adn.networklayer.com
  path: /IBMxxSEVxxxxxxx_xx/data01
   
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
 name: sterling-b2bi-toolkit-pvc
spec:
 accessModes:
   - ReadWriteMany
 resources:
   requests:
     storage: 20Gi
 storageClassName: ""

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

oc create -f toolkit-pv-pvc.yaml

Deploy do Toolkit

1) Crie o arquivo toolkit-deploy.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: sterling-b2bi-toolkit
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sterling-b2bi-toolkit
  template:
    metadata:
      labels:
        app: sterling-b2bi-toolkit
    spec:
      containers:
      - name: sterling-b2bi-toolkit
        image: nginx
        command: ["/bin/bash", "-ce", "tail -f /dev/null"]
        volumeMounts:
        - mountPath: /var/nfs-data
          name: sterling-b2bi-toolkit-storage
      volumes:
      - name: sterling-b2bi-toolkit-storage
        persistentVolumeClaim:
          claimName: sterling-b2bi-toolkit-pvc

2) Realize a criação do

oc create -f toolkit-deploy.yaml

See Also