Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the Operator Wildfly based but also EAP based #148

Merged
merged 9 commits into from
Aug 23, 2022

Conversation

carlosthe19916
Copy link
Member

@carlosthe19916 carlosthe19916 commented Jun 30, 2022

Depends on #159

What needs to be changed in the Operator

Due to windup/windup-openshift#49 Windup can not be based on Wildfly and EAP. The mounting volume points to /opt/wildfly/standalone/data or /opt/eap/standalone/data hence the volume path needs to be defined through the operator.

How to create container images of the operator

Checkout this PR and execute:

For creating the operator based on Wildfly:

mvn clean package -DskipTests -Pnative \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.registry=quay.io \
-Dquarkus.container-image.group=carlosthe19916 \
-Dquarkus.container-image.name=windup-operator \
-Dquarkus.container-image.tag=wildfly

For creating the operator based on EAP:

mvn clean package -DskipTests -Pnative \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.registry=quay.io \
-Dquarkus.container-image.group=carlosthe19916 \
-Dquarkus.container-image.name=windup-operator \
-Dquarkus.container-image.tag=eap \
-Dapp-base-server=eap

Push your images:

docker push quay.io/carlosthe19916/windup-operator:wildfly
docker push quay.io/carlosthe19916/windup-operator:eap

You need to use your own quay.io username

Observe that for creating the EAP based container image we are passing a BuildTime property -Dapp-base-server=eap

Deploy the Operator in Minikube

  • Start minikube
minikube start --driver=podman --memory=10g
minikube addons enable ingress
minikube addons enable olm
  • Open the file src/main/resources/k8s/def/windup.deployment.yaml and change the line 20 to point to your image:
containers:
        - image: image: quay.io/carlosthe19916/windup-operator:wildfly
        # - image: image: quay.io/carlosthe19916/windup-operator:eap
  • Open the file src/test/resources/windup-test.yaml and replace it its content by:
apiVersion: windup.jboss.org/v1
kind: Windup
metadata:
  namespace: mta
  name: winduptest
  labels:
    application: windup
spec:
  webLivenessInitialDelaySeconds: "240"
  webReadinessInitialDelaySeconds: "240"
  webLivenessTimeoutSeconds: "100"
  webReadinessTimeoutSeconds: "100"
  webReadinessFailureThreshold: "20"
  webLivenessFailureThreshold: "20"
  web_cpu_request: "0.5"
  web_mem_request: 0.5Gi
  web_cpu_limit: "4"
  web_mem_limit: 4Gi
  executor_cpu_request: "0.5"
  executor_mem_request: 0.5Gi
  executor_cpu_limit: "4"
  executor_mem_limit: 4Gi
  messaging_serializer: http.post.serializer
  mta_Volume_Capacity: 5G
  db_database: mta
  volumeCapacity: 5G
  sso_url: /auth
  sso_realm: mta
  max_post_size: "4294967296"
  sso_force_legacy_security: "false"
  db_password: pas345678
  db_username: userXYZ
  postgresql_cpu_request: "0.5"
  postgresql_mem_request: "0.5Gi"
  postgresql_cpu_limit: "2"
  postgresql_mem_limit: "2Gi"
  # This is you quay.io username
  docker_images_user: "carlosthe19916"
  # This is your image tag
  docker_images_tag: wildfly
  # docker_images_tag: eap
  docker_images_repository: quay.io
  docker_image_web: windup-web-openshift
  docker_image_executor: windup-web-openshift-messaging-executor
  postgresql_image: centos/postgresql-96-centos7:latest
  executor_desired_replicas: 1
  • Create the Kubernetes resources
kubectl create ns mta
cd src/main/resources/k8s/def/
./script.create.all.sh
cd ../../../../../
  • Create an instance of Windup
kubectl apply -f src/test/resources/windup-test.yaml -n mta

Minikube dashboard

You can see the deployments and pods executing:

minikube dashboard

@jmle jmle merged commit 0e02316 into windup:master Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants