IBM Sterling: Deploy do Sterling B2B no OpenShift

From Wiki

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

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/clusterAdministration

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

oc create -f $MY_SB2BI_PROJECT-ibm-b2bi-rb-scc.yaml
oc create -f $MY_SB2BI_PROJECT-ibm-b2bi-rb.yaml

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 b2bi-pv-pvc.yaml

See Also