Skip to content

Commit 2fad6be

Browse files
committed
Updated documents
1 parent 15d9c06 commit 2fad6be

File tree

2 files changed

+59
-5
lines changed

2 files changed

+59
-5
lines changed

docs/integrations.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@ __Link:__ [https://github.com/chouseknecht/kompose-install-role](https://github.
3434

3535
### Fabric8 Maven Plugin by Red Hat
3636

37-
__Description:__ "To bring docker-compose based Java application to Kubernetes/Openshift Cluster using Maven Plugin"
37+
__Description:__ "The fabric8-maven-plugin is used to bring your Java applications onto Kubernetes or Openshift. The main task of this plugin is to build Docker Images and generate Kubernetes or Openshift resource descriptors. A docker-compose configuration is one of the method to bring up docker compose deployments on a Kubernetes/Openshift cluster. Fabric8-maven Plugin processes the external docker-compose file and generates Kubernetes/Openshift resources using Kompose."
3838

3939
__Links:__
4040

41-
* [Introduction](https://maven.fabric8.io/#introduction)
41+
* [Quickstart](http://kompose.io/maven-example/)
4242

43-
* [Maven-Configuration](https://maven.fabric8.io/#configuration)
44-
45-
* [Example](https://maven.fabric8.io/#docker-compose)
43+
* [Documentation](https://maven.fabric8.io/)

docs/maven-example.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Fabric8 Maven Plugin + Kompose:
2+
3+
Lets deploy a Springboot Java application with Docker Compose file using fabric8 maven plugin to Kubernetes/Openshift.
4+
5+
__1. Clone the example project from github__
6+
```bash
7+
$ git clone https://github.com/piyush1594/Kompose-Example.git
8+
```
9+
Navigate (cd) to `Kompose-Example` directory.
10+
11+
__2. Install the kompose through maven plugin__
12+
```
13+
$ mvn fabric8:install
14+
```
15+
This command installs the `kompose` and other binaries on the host.
16+
17+
18+
__3. Add the fabric8 maven plugin to project__
19+
```
20+
$ mvn io.fabric8:fabric8-maven-plugin:3.5.28:setup
21+
```
22+
This command adds the fabric8 maven plugin to `pom.xml` of project.
23+
24+
__4. Configure the fabric8 maven plugin to use Docker Compose file__
25+
```
26+
<plugin>
27+
<groupId>io.fabric8</groupId>
28+
<artifactId>fabric8-maven-plugin</artifactId>
29+
30+
<!-- ... -->
31+
32+
<configuration>
33+
<composeFile>path for docker compose file</composeFile>
34+
</configuration>
35+
36+
<executions>
37+
<execution>
38+
<goals>
39+
<goal>resource</goal>
40+
<goal>build</goal>
41+
</goals>
42+
</execution>
43+
</executions>
44+
</plugin>
45+
```
46+
Add the `<configuration>` and `<executions>` sections to `pom.xml` as shown in above `pom.xml` snippet. Update the `<composeFile>` to provide the relative path of Docker Compose file from `pom.xml`
47+
48+
__5. Deploy application on Kubernetes/OpenShift__
49+
50+
Make sure that Kubernetes/OpenShift cluster or Minikube/MiniShift is running.
51+
52+
```bash
53+
$ mvn fabric8:deploy
54+
```
55+
56+
Now that your service has been deployed, let's access it by querying `pod`, `service` from Kubernetes/OpenShift.

0 commit comments

Comments
 (0)