Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Once the secret has been created, select the Image Name option and key in registry.connect.redhat.com/joget/joget-dxdx7-eap72eap7. Key in the desired Application Name and Name.

Thai

เมื่อสร้างความลับแล้วให้เลือกเพิ่มในโครงการ> ปรับใช้รูปเลือกตัวเลือกชื่อภาพและพิมพ์ใน registry.connect.redhat.com/joget/joget-dxdx7-eap72 คลิกที่ไอคอนการค้นหาขนาดเล็กเพื่อโหลดรายละเอียดรูปภาพจากรีจิสตรีคีย์ในชื่อที่ต้องการจากนั้นคลิกปรับใช้eap7 คลิกที่ไอคอนการค้นหาขนาดเล็กเพื่อโหลดรายละเอียดรูปภาพจากรีจิสตรีคีย์ในชื่อที่ต้องการจากนั้นคลิกปรับใช้



Image Name

registry.connect.redhat.com/joget/joget-dxdx7-eap72eap7

Name

joget-dxdx7-eap72eap7


Step 4: Configure Persistent Storage

...

Thai

ในหน้าเพิ่มที่เก็บข้อมูลคลิกที่ลิงค์สร้างที่เก็บข้อมูลขนาดเล็ก สร้างที่เก็บข้อมูลใหม่ด้วยค่าที่ต้องการเช่น




Name

joget-dxdx7-eap72eap7-claim

Access Mode

Shared Access (RWX)

Size

10GB (or as required)

Mount Path/home/jboss/wflow


...

Code Block
export PROJECT_NAME=demo # modify this to suit your project name
export APP_NAME=joget-dxdx7-eap72eap7 # modify this to suit your app name

echo === configure jboss clustering ===
oc set env deployment/${APP_NAME} JGROUPS_PING_PROTOCOL=openshift.DNS_PING -e OPENSHIFT_DNS_PING_SERVICE_NAME=${APP_NAME}-ping -e OPENSHIFT_DNS_PING_SERVICE_PORT=8888 -e CACHE_NAME=http-session-cache
oc expose deployment/${APP_NAME} --port=8888 --name=${APP_NAME}-ping --cluster-ip=None

echo === assign cluster role view permission for the project service account (to read deployment info for licensing) ===
oc create clusterrolebinding default-view --clusterrole=view --serviceaccount=$PROJECT_NAME:default --namespace=$PROJECT_NAME

...


PROJECT_NAME

The desired project name

REGISTRY_USERNAME

Red Hat account username

REGISTRY_PASSWORD

Red Hat account password

REGISTRY_EMAIL

Red Hat account email

Code Block
languagebashyml
#!/bin/sh
export PROJECT_NAME=joget-openshift
export REGISTRY_USERNAME=email@domain
export REGISTRY_PASSWORD=password
export REGISTRY_EMAIL=email@domain
export REGISTRY_SERVER=registry.connect.redhat.com
export IMAGE_NAMESPACE=joget
export IMAGE_NAME=joget-dxdx7-eap72eap7
export IMAGE_TAG=latest
export APP_NAME=joget-dxdx7-eap72eap7
export DB_APP_NAME=jogetdb
export STORAGE_NAME=joget-data
export MYSQL_DATABASE=jwdb
export MYSQL_USER=joget
export MYSQL_PASSWORD=joget

echo === deploy Joget on OpenShift ===
echo PROJECT_NAME: $PROJECT_NAME
echo REGISTRY_SERVER: $REGISTRY_SERVER
echo REGISTRY_USERNAME: $REGISTRY_USERNAME
echo REGISTRY_EMAIL: $REGISTRY_EMAIL
echo IMAGE_NAMESPACE: $IMAGE_NAMESPACE
echo IMAGE_NAME: $IMAGE_NAME
echo IMAGE_TAG $IMAGE_TAG
echo IMAGE_NAME: $IMAGE_NAME
echo APP_NAME: $APP_NAME
echo DB_APP_NAME: $DB_APP_NAME
echo STORAGE_NAME: $STORAGE_NAME
echo MYSQL_DATABASE: $MYSQL_DATABASE
echo MYSQL_USER: $MYSQL_USER
echo MYSQL_PASSWORD: $MYSQL_PASSWORD

echo === create project ===
oc new-project $PROJECT_NAME

echo === deploy MySQL ===
oc new-app openshift/mysql:8.0 --name $DB_APP_NAME -e MYSQL_USER=$MYSQL_USER -e MYSQL_PASSWORD=$MYSQL_PASSWORD -e MYSQL_DATABASE=$MYSQL_DATABASE

echo === create and bind secret to pull Joget image ===
oc create secret docker-registry $REGISTRY_SERVER --docker-server=$REGISTRY_SERVER --docker-username=$REGISTRY_USERNAME --docker-password=$REGISTRY_PASSWORD --docker-email=$REGISTRY_EMAIL
oc secrets link default $REGISTRY_SERVER --for=pull

echo === assign cluster role view permission for the project service account (to read deployment info for licensing) ===
oc create clusterrolebinding default-view --clusterrole=view --serviceaccount=$PROJECT_NAME:default --namespace=$PROJECT_NAME

echo === create joget deployment, service and persistent volume claim ===
cat <<EOF > joget.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: $APP_NAME-pv-claimjoget1-pvc
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
---
apiVersion: v1
kind: Service
metadata:
  name: $APP_NAMEjoget1
  labels:
    app: $APP_NAMEjoget1
spec:
  ports:
  - port: 8080
  selector:
    app: $APP_NAMEjoget1
  type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: $APP_NAMEjoget1
spec:
  selector:
    matchLabels:
      app: $APP_NAMEjoget1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: $APP_NAMEjoget1
    spec:
      containers:
      - image: quay.io/juljog/joget-dx7-eap7:latest
        name: joget1
        env:
        - name: JGROUPS_PING_PROTOCOL
          value: $REGISTRY_SERVER/$IMAGE_NAMESPACE/$IMAGE_NAME:$IMAGE_TAG
 "openshift.DNS_PING"
        - name: OPENSHIFT_DNS_PING_SERVICE_NAME
          value: "joget1-ping"
        - name: OPENSHIFT_DNS_PING_SERVICE_PORT
          value: "8888"
        - name: $APPCACHE_NAME
          value: "http-session-cache"
        ports:
        - containerPort: 8080
          name: $APP_NAMEjoget1
        volumeMounts:
        - name: $APP_NAMEjoget1-persistent-storage
          mountPath: /home/jboss/wflow
      volumes:
      - name: $APP_NAMEjoget1-persistent-storage
        persistentVolumeClaim:
          claimName: $APP_NAME-pv-claim
EOF
oc apply -f joget.yaml

echo === configure jboss clustering ===
#oc set env deployment/${APP_NAME} JGROUPS_PING_PROTOCOL=openshift.DNS_PING -e OPENSHIFT_DNS_PING_SERVICE_NAME=${APP_NAME}-ping -e OPENSHIFT_DNS_PING_SERVICE_PORT=8888 -e CACHE_NAME=http-session-cache
oc expose deployment/${APP_NAME} --port=8888 --name=${APP_NAME}-ping --cluster-ip=None

echo === assign cluster role view permission for the project service account (to read deployment info for licensing) ===
oc create clusterrolebinding default-view --clusterrole=view --serviceaccount=$PROJECT_NAME:default --namespace=$PROJECT_NAME

echo === expose service route for external excess ===
oc expose svc $APP_NAME --path=/jw
oc annotate route $APP_NAME --overwrite haproxy.router.openshift.io/timeout=600s
echo URL: https://$(oc get route $APP_NAME --template='{{ .spec.host }}')/jwjoget1-pvc
---         
kind: Service
apiVersion: v1
metadata:
  name: joget1-ping
  labels:
    app: joget1
spec:
  clusterIP: None
  ports:
    - name: joget1-ping
      port: 8888
  selector:
    app: joget1
---
kind: Route
apiVersion: route.openshift.io/v1
metadata:
  name: joget1
  labels:
    app: joget1
  annotations:
    haproxy.router.openshift.io/timeout: 600s
    openshift.io/host.generated: 'true'
spec:
  path: /jw
  to:
    kind: Service
    name: joget1
    weight: 100
  port:
    targetPort: 8080
  wildcardPolicy: None
EOF
oc apply -f joget.yaml


Setup Database

The first time the Joget platform is accessed, the Database Setup page will be displayed. Configure the database settings using the values defined when deploying the MySQL database previously e.g.

...