All Projects → wildfly → wildfly-operator

wildfly / wildfly-operator

Licence: Apache-2.0 license
Kubernetes Operator for WildFly

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to wildfly-operator

Camel K
Apache Camel K is a lightweight integration platform, born on Kubernetes, with serverless superpowers
Stars: ✭ 549 (+1860.71%)
Mutual labels:  openshift, operator
grafana-operator
An operator for Grafana that installs and manages Grafana instances, Dashboards and Datasources through Kubernetes/OpenShift CRs
Stars: ✭ 449 (+1503.57%)
Mutual labels:  openshift, operator
Deploy
Deploy Development Builds of Open Cluster Management (OCM) on RedHat Openshift Container Platform
Stars: ✭ 78 (+178.57%)
Mutual labels:  openshift, operator
argocd-operator-helm
[DEPRECATED] Argo CD Operator (Helm) installs Argo CD in OpenShift and Kubernetes.
Stars: ✭ 18 (-35.71%)
Mutual labels:  openshift, operator
cryostat-operator
An OpenShift Operator to facilitate setup and management of Cryostast and expose the Cryostat API through Kubernetes Custom Resources.
Stars: ✭ 25 (-10.71%)
Mutual labels:  openshift, operator
K8up
Kubernetes and OpenShift Backup Operator
Stars: ✭ 130 (+364.29%)
Mutual labels:  openshift, operator
Argocd Operator
A Kubernetes operator for managing Argo CD clusters.
Stars: ✭ 151 (+439.29%)
Mutual labels:  openshift, operator
pulp-operator
Kubernetes Operator for Pulp 3. Under active development.
Stars: ✭ 32 (+14.29%)
Mutual labels:  openshift, operator
loki-operator
viaq.github.io/loki-operator/
Stars: ✭ 30 (+7.14%)
Mutual labels:  openshift, operator
anthill
A Kubernetes/OpenShift operator to manage Gluster clusters
Stars: ✭ 35 (+25%)
Mutual labels:  openshift, operator
deploy
Deploy Development Builds of Open Cluster Management (OCM) on RedHat Openshift Container Platform
Stars: ✭ 133 (+375%)
Mutual labels:  openshift, operator
logging-operator
A golang based operator to create and manage EFK (Elasticsearch, Fluentd, and Kibana) stack on Kubernetes
Stars: ✭ 42 (+50%)
Mutual labels:  openshift, operator
ibm-spectrum-scale-csi
The IBM Spectrum Scale Container Storage Interface (CSI) project enables container orchestrators, such as Kubernetes and OpenShift, to manage the life-cycle of persistent storage.
Stars: ✭ 41 (+46.43%)
Mutual labels:  openshift, operator
oracle-database-operator
The Oracle Database Operator for Kubernetes (a.k.a. OraOperator) helps developers, DBAs, DevOps and GitOps teams reduce the time and complexity of deploying and managing Oracle Databases. It eliminates the dependency on a human operator or administrator for the majority of database operations.
Stars: ✭ 74 (+164.29%)
Mutual labels:  operator
hybrid-cloud-serverless
Bursting Cloud (K)native Services across clouds using OpenShift and Skupper
Stars: ✭ 35 (+25%)
Mutual labels:  openshift
k8s-notify
Turn kubernetes events into useful notifications & alerts
Stars: ✭ 46 (+64.29%)
Mutual labels:  operator
jbpm-spring-boot
Sample of a jbpm service with spring boot. It runs on OpenShift and it has prometheus metrics and a grafana dashboard
Stars: ✭ 16 (-42.86%)
Mutual labels:  openshift
spring-cloud-dataflow-server-openshift
This project provides a Spring Cloud Data Flow server for deployments to OpenShift 3
Stars: ✭ 26 (-7.14%)
Mutual labels:  openshift
techlab
This repository contains the APPUiO and OpenShift Techlab tutorials.
Stars: ✭ 51 (+82.14%)
Mutual labels:  openshift
verification-tests
Blackbox test suite for OpenShift.
Stars: ✭ 41 (+46.43%)
Mutual labels:  openshift

Go Docker Repository on Quay Go Report Card Join Chat

WildFly Operator for Kubernetes/OpenShift

The WildFly Operator for Kubernetes provides easy monitoring and configuration for Java applications deployed on WildFly application server using the Source-to-Image (S2I) template for WildFly.

Once installed, the WildFly Operator provides the following features:

  • Create/Destroy: Easily launch an application deployed on WildFly

  • Simple Configuration: Configure the fundamentals of WildFly-based application including number of nodes, application image, etc.

Custom Resource Definitions

The operator acts on the following Custom Resource Definitions (CRDs):

  • WildFlyServer, which defines a WildFly deployment. The Spec and Status of this resources are defined in the API documentation.

Quickstart

Install the Operator and associate resources:

The examples require that Minikube is installed and running.

# install WildFlyServer CRD
$ kubectl apply -f deploy/crds/wildfly.org_wildflyservers_crd.yaml
# Install all resources for the WildFly Operator
$ kubectl apply -f deploy/operator.yaml

Install a custom resource

An example of a custom resource of WildFlyServer is described in quickstart-cr.yaml:

apiVersion: wildfly.org/v1alpha1
kind: WildFlyServer
metadata:
  name: quickstart
spec:
  applicationImage: "quay.io/wildfly-quickstarts/wildfly-operator-quickstart:18.0"
  replicas: 2
  storage:
    volumeClaimTemplate:
      spec:
        resources:
          requests:
            storage: 3Gi
Note

It is based on the S2I application image jmesnil/wildfly-operator-quickstart:18.0 that provides a simple Java Web application wildfly-operator-quickstart on top of WildFly 18.0.0.Final which returns the IP address of its host:

$ curl http://localhost:8080/
{"ip":"172.17.0.3"}

This simple application illustrates that successive calls will be load balanced across the various pods that runs the application.

$ kubectl create -f deploy/crds/quickstart-cr.yaml
wildflyserver.wildfly.org/quickstart created

Once the application is deployed, it can be accessed through a load balancer:

$ curl $(minikube service quickstart-loadbalancer --url)
{"ip":"172.17.0.7"}
$ curl $(minikube service quickstart-loadbalancer --url)
{"ip":"172.17.0.8"}
$ curl $(minikube service quickstart-loadbalancer --url)
{"ip":"172.17.0.7"}

As illustrated above, calls to the application are load balanced across the pods that runs the application image (as we can see from the different IP addresses).

The WildFly operator describes the deployed application with $ kubectl describe wildflyserver quickstart:

Name:         quickstart
Namespace:    default
Labels:       <none>
Annotations:  <none>
API Version:  wildfly.org/v1alpha1
Kind:         WildFlyServer
Metadata:
  Creation Timestamp:  2019-04-09T08:49:24Z
  Generation:          1
  Resource Version:    7954
  Self Link:           /apis/wildfly.org/v1alpha1/namespaces/default/wildflyservers/quickstart
  UID:                 5feb0fd3-5aa4-11e9-af00-7a65e1e4ff53
Spec:
  Application Image:  quay.io/wildfly-quickstarts/wildfly-operator-quickstart:18.0
  Bootable Jar:       false
  Replicas:           2
  Storage:
    Volume Claim Template:
      Spec:
        Resources:
          Requests:
            Storage:  3Gi
Status:
  Pods:
    Name:    quickstart-0
    Pod IP:  172.17.0.7
    Name:    quickstart-1
    Pod IP:  172.17.0.8
Events:      <none>

The Status section is updated with the 2 pods names containing the application image.

You can modify this custom resource spec to scale up its replicas from 2 to 3:

$ kubectl edit wildflyserver quickstart
# Change the `replicas: 2` spec to `replicas: 3` and save

wildflyserver.wildfly.org/quickstart edited

The deployment will be updated to scale up to 3 Pods and the resource Status will be updated accordingly:

$ kubectl describe wildflyserver quickstart
Name:         quickstart
Namespace:    default
Labels:       <none>
Annotations:  <none>
API Version:  wildfly.org/v1alpha1
Kind:         WildFlyServer
Metadata:
  Creation Timestamp:  2019-04-09T08:49:24Z
  Generation:          2
  Resource Version:    8137
  Self Link:           /apis/wildfly.org/v1alpha1/namespaces/default/wildflyservers/quickstart
  UID:                 5feb0fd3-5aa4-11e9-af00-7a65e1e4ff53
Spec:
  Application Image:  quay.io/wildfly-quickstarts/wildfly-operator-quickstart:18.0
  Bootable Jar:       false
  Replicas:           3
  Storage:
    Volume Claim Template:
      Spec:
        Resources:
          Requests:
            Storage:  3Gi
Status:
  Pods:
    Name:    quickstart-0
    Pod IP:  172.17.0.7
    Name:    quickstart-1
    Pod IP:  172.17.0.8
    Name:    quickstart-2
    Pod IP:  172.17.0.9
Events:      <none>

You can then remove this custom resource and its assocated resources:

$ kubectl delete wildflyserver quickstart

wildflyserver.wildfly.org "quickstart" deleted

OpenShift

The examples can also be installed in OpenShift and requires a few additional steps.

The instructions requires that Minishift is installed and running.

Deploying the operator and its resources by executing the following commands:

$ oc login -u system:admin
$ oc adm policy add-cluster-role-to-user cluster-admin developer
$ oc apply -f deploy/crds/wildfly_v1alpha1_wildflyserver_crd.yaml
$ oc apply -f deploy/operator.yaml

$ oc login -u developer

After installing the WildFlyServer resource from deploy/crds/quickstart-cr.yaml, you have to create a route to expose it from OpenShift:

$ oc expose svc/quickstart-loadbalancer

route.route.openshift.io/quickstart-loadbalancer exposed

This will expose the service from OpenShift. To know the URL of the exposed service, run:

$ oc get route quickstart-loadbalancer --template='{{ .spec.host }}'

This will display the host of the route (on my local machine, it displays quickstart-loadbalancer-myproject.192.168.64.16.nip.io).

The application can then be accessed by running:

$ curl "http://$(oc get route quickstart-loadbalancer --template='{{ .spec.host }}')"
{"ip":"172.17.0.9"}

Developer Instructions

System Requirements

Building the WildFly Operator

  1. Add the source under $GOPATH:

    $ git clone https://github.com/wildfly/wildfly-operator.git $GOPATH/src/github.com/wildfly/wildfly-operator
  2. Change to the source directory.

    $ cd $GOPATH/src/github.com/wildfly/wildfly-operator
  3. Review the available build targets.

    $ make
  4. Run any build target. For example, compile and build the WildFly Operator with:

    $ make build

Run end-to-end (e2e) tests

The tests relies on Minikube as the container platform

` $ eval $(minikube -p minikube docker-env) && make test-e2e-minikube `

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].