Skip to content

Commit

Permalink
[resolves #2825] Support for WildFly Kubernetes operator
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton committed Aug 2, 2019
1 parent 4bff813 commit 3759c4a
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/guide/cloud/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ include::openshift-local.adoc[]
include::openshift-ec2.adoc[]

include::openshift-s2i.adoc[]

include::openshift-operator.adoc[]
43 changes: 43 additions & 0 deletions docs/guide/cloud/openshift-operator.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
### WildFly OpenShift Operator

It is useful to deploy and manage containerized WildFly-Camel applications on OpenShift via the https://operatorhub.io/operator/wildfly[WildFly Operator,window=_blank].
#### Installation
##### Operator Lifecycle Manager (OLM)
With OpenShift 4, the operator can be installed from the OLM marketplace. Browse the operator catalog, select the WildFly item, click the 'install' button and follow the instructions.
OLM can be installed on an OpenShift 3 cluster by following the https://github.com/operator-framework/operator-lifecycle-manager/blob/master/Documentation/install/install.md#openshift[installation instructions,window=_blank].
##### Manual installation
To manually install the WildFly operator, apply the required Custom Resource Definition (CRD), roles and deployments to your cluster by following the https://github.com/wildfly/wildfly-operator#install-the-operator-and-associate-resources[instructions, window=_blank].
#### Deploying a operator managed application
For the WildFly operator to manage a containerized WildFly-Camel application deployment, you need to create WildFlyServer resources on your cluster.
[source,shell,options="nowrap"]
----
$ cat <<EOF | oc create -f -
apiVersion: wildfly.org/v1alpha1
kind: WildFlyServer
metadata:
name: example-camel-rest
spec:
applicationImage: "docker.io/wildflyext/example-camel-rest"
size: 3
EOF
----
This results in 3 replicas of the example-camel-rest application backed by a service and route.
[source,shell,options="nowrap"]
----
$ oc get pods -l app.kubernetes.io/name=example-camel-rest
NAME READY STATUS RESTARTS AGE
example-camel-rest-0 1/1 Running 0 5m
example-camel-rest-1 1/1 Running 0 5m
example-camel-rest-2 1/1 Running 0 5m
----
6 changes: 3 additions & 3 deletions docs/guide/cloud/openshift-s2i.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ http://{ec2-pub-ip}:8080/example-camel-cdi?name=Kermit[,window=_blank]
Hello Kermit
#### S2I with OpenShift Origin
#### S2I with OpenShift
{wildfly-camel} provides an OpenShift builder image, which enables you to do a source to image in OpenShift.
{wildfly-camel} provides an S2I builder image, which enables you to do source to image builds in OpenShift.
First add the {wildfly-camel} S2I ImageStream and the application template.
First add the {wildfly-camel} S2I ImageStream and application template.
[source,bash,options="nowrap"]
----
Expand Down

0 comments on commit 3759c4a

Please sign in to comment.