-
Notifications
You must be signed in to change notification settings - Fork 770
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
Added Fabric8 Maven Plugin in Integration #836
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
hey @piyush1594 , you have to sign CLA first |
docs/integrations.md
Outdated
|
||
### Fabric8 Maven Plugin by Red Hat | ||
|
||
__Description:__ "To bring docker-compose based JAVA application to Kubernetes/Openshift Cluster using Maven Plugin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 'Java' instead of 'JAVA'. It is a registered trademark.
@piyush1594 Ideally it would be nice to add a longer description (paragraph length) as well as quick tutorial on how to use this. Since ideally, this would be one of the "top" integrations for Kompose that's most widely used. |
00cce64
to
2fad6be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey all!
Good work so far.
I'm pretty straight-forward when doing reviews, but please elaborate on the installation instructions. Was difficult to understand from someone who has never used Maven or Fabric8 before, and that's what most of our users will be experiencing too.
I've gone ahead and made comments!
docs/integrations.md
Outdated
|
||
### Fabric8 Maven Plugin by Red Hat | ||
|
||
__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." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Openshift -> OpenShift
Images -> images
There's an extra spec between or Openshift
A Docker Compose configuration is one of the methods to bring up deployments on a Kubernetes or OpenShift cluster
Fabric8-maven -> Fabric8 Maven Plugin
The Fabric8-maven plugin processes the external
docker-compose.yaml file and generates Kubernetes or OpenSHift resources via Kompose.
Please separate sentences too, it's quite long. Markdown doesn't cut-off sentences if there is a newline.
docs/integrations.md
Outdated
__Links:__ | ||
|
||
* [Quickstart](http://kompose.io/maven-example/) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove newline
docs/maven-example.md
Outdated
# Fabric8 Maven Plugin + Kompose: | ||
|
||
Lets deploy a Springboot Java application with Docker Compose file using fabric8 maven plugin to Kubernetes/Openshift. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to add a "requirements" section.
ex:
Required:
- Linux/macOS/Windows (or whatever platform Maven runs on)
- Kompose
- etc..
Figure out the requirements.
Also have installation instructions for maven (just a link would do).
Try to make it so that if someone has NO IDEA how to use Maven / Fabric8, they can easily follow this tutorial (example: me)
docs/maven-example.md
Outdated
|
||
__1. Clone the example project from github__ | ||
```bash | ||
$ git clone https://github.com/piyush1594/Kompose-Example.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick, but would be better having Kompose-Example
lowercase, could you change the name of your repo?
docs/maven-example.md
Outdated
|
||
Lets deploy a Springboot Java application with Docker Compose file using fabric8 maven plugin to Kubernetes/Openshift. | ||
|
||
__1. Clone the example project from github__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub needs to be capitalized
docs/maven-example.md
Outdated
``` | ||
$ mvn fabric8:install | ||
``` | ||
This command installs the `kompose` and other binaries on the host. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what other binaries? link?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this command: mvn fabric8:install
has no description... What are we doing here? I believe the sentence "This command installs.." should be above it. Also needs to be changed to "This command installs Fabric8 and Kompose" or something similar.
docs/maven-example.md
Outdated
This command installs the `kompose` and other binaries on the host. | ||
|
||
|
||
__3. Add the fabric8 maven plugin to project__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fabric8 needs to be capitalized?
docs/maven-example.md
Outdated
``` | ||
$ mvn io.fabric8:fabric8-maven-plugin:3.5.28:setup | ||
``` | ||
This command adds the fabric8 maven plugin to `pom.xml` of project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to start sentences with "This command".
You can simply say: "Add the Fabric8 maven plugin to the pom.xml
of the project.
Speaking of pom.xml
, as someone who has never used Maven, can you describe what this does? Need to elaborate on the instructions.
docs/maven-example.md
Outdated
|
||
__5. Deploy application on Kubernetes/OpenShift__ | ||
|
||
Make sure that Kubernetes/OpenShift cluster or Minikube/MiniShift is running. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MiniShift is suppose to be minishift
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps add instructions to "start" minishift or minikube.
docs/maven-example.md
Outdated
$ mvn fabric8:deploy | ||
``` | ||
|
||
Now that your service has been deployed, let's access it by querying `pod`, `service` from Kubernetes/OpenShift. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are the instructions on how to access it?
docs/integrations.md
Outdated
|
||
__Links:__ | ||
|
||
* [Quickstart](http://kompose.io/maven-example/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change link to /docs/maven-example
@cdrage updated integrations.md and maven-example.md |
67a0bac
to
ab9daea
Compare
docs/integrations.md
Outdated
### Fabric8 Maven Plugin by Red Hat | ||
|
||
__Description:__ "Maven is one of the widely used build tool for Java applications. The Fabric8 Maven Plugin is a maven extension that simplifies the deployment of Java applications to Kubernetes or OpenShift cluster. The main task of this plugin is to build Docker images, generate Kubernetes or OpenShift resource descriptors and run/deploy the application on Kubernetes or OpenShift cluster. Plugin has wide range of configuration options and Docker Compose is one of them to bring up deployments on Kubernetes or OpenShift cluster. The Fabric8 Maven Plugin processes the external `docker-compose.yml` file and generates Kubernetes or OpenShift resources via Kompose." | ||
__Links:__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add blank line before __link:__
docs/integrations.md
Outdated
|
||
* [Quickstart](/docs/maven-example) | ||
|
||
* [Documentation](https://maven.fabric8.io/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will be better if you point towards part of maven docs where kompose
is being used.
like, https://maven.fabric8.io/#fabric8:resource
docs/maven-example.md
Outdated
|
||
Now that your service has been deployed, let's access it by querying `pod`, `service` from Kubernetes or OpenShift. | ||
```bash | ||
$ kubectl get pods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
show output of these commands as well
docs/maven-example.md
Outdated
$ kubectl get pods | ||
``` | ||
```bash | ||
$ kubectl get svc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, show output of command
docs/maven-example.md
Outdated
```bash | ||
$ kubectl get svc | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove extra line
docs/maven-example.md
Outdated
|
||
__1. Clone the example project from GitHub__ | ||
```bash | ||
$ git clone https://github.com/piyush1594/kompose-example.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name of repo kompose-maven-example
will be good, I think
docs/maven-example.md
Outdated
Lets deploy a Springboot Java application with Docker Compose file using Fabric8 Maven Plugin to Kubernetes or OpenShift. | ||
##### Requirements | ||
* Linux or MacOS or Windows | ||
* JDK 1.7+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
openjdk installation link will be better here, http://openjdk.java.net/install/
docs/maven-example.md
Outdated
```bash | ||
$ git clone https://github.com/piyush1594/kompose-example.git | ||
``` | ||
Navigate (cd) to `kompose-example` directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mention command
$ cd kompose-example
@surajnarwade @cdrage Updates done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still needs improvement on how to use Maven.. Add tutorial on how to use Maven + Kompose from a total beginners perspective.
docs/maven-example.md
Outdated
$ kubectl get pods | ||
NAME READY STATUS RESTARTS AGE | ||
springboot-docker-compose-1-vk80j 1/1 Running 0 5m | ||
springboot-docker-compose-s2i-1-build 0/1 Completed 0 7m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this still hasn't completed? 0/1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to add instructions on how to actually access these services.
hint: minikube service sprintboot
would possibly bring it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its s2i-1-build pod as I have observed numerous time shows readiness like this only
But status column shows Completed
May be we can remove the build pod entry or give the hint: minikube service sprintboot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay.
No. It wouldn't be wise to remove an entry or else people would be wondering what in the world it this other container.
Yes, adding an instruction on how to access via minikube service
would be wise!
docs/integrations.md
Outdated
|
||
### Fabric8 Maven Plugin by Red Hat | ||
|
||
__Description:__ "Maven is one of the widely used build tool for Java applications. The Fabric8 Maven Plugin is a maven extension that simplifies the deployment of Java applications to Kubernetes or OpenShift cluster. The main task of this plugin is to build Docker images, generate Kubernetes or OpenShift resource descriptors and run/deploy the application on Kubernetes or OpenShift cluster. Plugin has wide range of configuration options and Docker Compose is one of them to bring up deployments on Kubernetes or OpenShift cluster. The Fabric8 Maven Plugin processes the external `docker-compose.yml` file and generates Kubernetes or OpenShift resources via Kompose." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again, please separate this into different sentences... add some newlines.
docs/maven-example.md
Outdated
@@ -0,0 +1,74 @@ | |||
# Fabric8 Maven Plugin + Kompose: | |||
Lets deploy a Springboot Java application with Docker Compose file using Fabric8 Maven Plugin to Kubernetes or OpenShift. | |||
##### Requirements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need newline
docs/maven-example.md
Outdated
* Linux or MacOS or Windows | ||
* JDK 1.7+ - [JDK Quick Installation Guide](http://openjdk.java.net/install/) | ||
* Maven 3.x+ - [Maven Installation Guide](https://maven.apache.org/install.html) | ||
* Kompose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no link to kompose
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really needed? as the tutorial is on Kompose website only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Other ones have links. May as well add one. It doesn't hurt.
can you add a WIP (work in progress) into your title since you're still working on this @piyush1594 |
you also need to merge your commits (one commit) |
docs/maven-example.md
Outdated
* JDK 1.7+ - [JDK Quick Installation Guide](http://openjdk.java.net/install/) | ||
* Maven 3.x+ - [Maven Installation Guide](https://maven.apache.org/install.html) | ||
* Kompose | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps add a previous step here saying that you must install Maven, here are the links to install to windows, etc. Add some commands here, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+* Maven 3.x+ - [Maven Installation Guide]
here we have given the link for installation guide. Isn't it sufficient?
In that way it would stay consistent with Java
installation link in the same section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright. 👍 Let's just keep it like this for-now.
docs/maven-example.md
Outdated
$ cd kompose-maven-example | ||
``` | ||
__2. Install Kompose through Maven__ | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs some spacing here, try to always keep a newline between ``` and new headers.
docs/maven-example.md
Outdated
``` | ||
$ mvn fabric8:install | ||
``` | ||
This command installs the `kompose` and 'fabric8' on the host. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fabric8 should be
`fabric8`
docs/maven-example.md
Outdated
``` | ||
This command installs the `kompose` and 'fabric8' on the host. | ||
|
||
__3. Add Fabric8 Maven Plugin to project__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to your project
docs/maven-example.md
Outdated
``` | ||
$ mvn io.fabric8:fabric8-maven-plugin:3.5.28:setup | ||
``` | ||
Adds the Fabric8 Maven Plugin configuration to `pom.xml` of project. `pom.xml` is manifest or deployment descriptor file of maven project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of a maven project
docs/maven-example.md
Outdated
``` | ||
Adds the Fabric8 Maven Plugin configuration to `pom.xml` of project. `pom.xml` is manifest or deployment descriptor file of maven project. | ||
|
||
__4. Configure Fabric8 Maven Plugin to use Docker Compose file__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to use a Docker Compose file
docs/maven-example.md
Outdated
<groupId>io.fabric8</groupId> | ||
<artifactId>fabric8-maven-plugin</artifactId> | ||
|
||
<!-- ... --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this?
docs/maven-example.md
Outdated
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` | ||
|
||
__5. Deploy application on Kubernetes or OpenShift__ | ||
Make sure that Kubernetes/OpenShift cluster or Minikube/minishift is running. In case, if anything of this is not running, you can run Minikube to test this application by using following command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be minishift
Make a newline here for separated sentences.
docs/maven-example.md
Outdated
$ minikube start | ||
``` | ||
Below command deploys this application on Kubernetes or OpenShift. | ||
```bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again, add some newlines between "```" and sentences
docs/maven-example.md
Outdated
$ kubectl get svc | ||
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE | ||
springboot-docker-compose 172.30.205.137 <none> 8080/TCP 6m | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to add a tutorial on how to actually access these... bringing up the web interface aka minikube service foobar
or minishift openshift service foobar
if a route has been made.
0c152ae
to
89667cc
Compare
@cdrage done changes. |
Created the new window in existing browser session. | ||
``` | ||
|
||
It will open your application endpoint in default browser. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add screenshot of output screen ?
docs/integrations.md
Outdated
|
||
### Fabric8 Maven Plugin by Red Hat | ||
|
||
__Description:__ "Maven is one of the widely used build tool for Java applications. The Fabric8 Maven Plugin is a maven extension that simplifies the deployment of Java applications to Kubernetes or OpenShift cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one of the widely used build tools
|
||
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` | ||
|
||
__5. Deploy application on Kubernetes or OpenShift__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add blank line here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@piyush1594 please fix this comment then LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cdrage I already fixed it in the last commit.
docs/maven-example.md
Outdated
$ git clone https://github.com/piyush1594/kompose-maven-example.git | ||
``` | ||
|
||
Change current directory to `kompose-maven-example` directory. Use command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would better if we remove 'use command'
Fixed typo Updated documents Updated integrations.md and maven-example.md Added output for commands and some minor updates Added coomand to access service and minor updates Fixed minor typing errors Added screenshot of output Added output image in image folder and minor typing errors Fixed typo Updated minor typos
b7385b9
to
d0fff4c
Compare
@cdrage Review needed. |
LGTM after minor comment fix. |
LGTM. |
Changes for #732