Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

migrating EC2 on ECS and EKS

 
Ranch Hand
Posts: 640
Mac
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are running few servers on EC2 and we deployed wildfly onto them, I am thinking of migrating them to docker(i.e. ECS) and handle via  Kubernetes(i.e. EKS). Deepak do you think it will reduce the maintenance load on us?
While this  an off topic but is there some guideline I can find to create dockerfile for wildfly 10?
 
Sheriff
Posts: 3072
454
Android Eclipse IDE Angular Framework TypeScript Redhat MicroProfile Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jignesh Patel wrote:We are running few servers on EC2 and we deployed wildfly onto them, I am thinking of migrating them to docker(i.e. ECS) and handle via  Kubernetes(i.e. EKS). Deepak do you think it will reduce the maintenance load on us?


Good question.

I am thinking of doing something similar, but instead of continuing to run a JEE server (such as Wildfly), I want to move to single app per runtime microprofile deployments using Quarkus and GraalVM.  Any communications between the apps will continue to use JAX-RS or JMS.
 
Jignesh Patel
Ranch Hand
Posts: 640
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ron McLeod wrote:

Jignesh Patel wrote:We are running few servers on EC2 and we deployed wildfly onto them, I am thinking of migrating them to docker(i.e. ECS) and handle via  Kubernetes(i.e. EKS). Deepak do you think it will reduce the maintenance load on us?


Good question.

I am thinking of doing something similar, but instead of continuing to run a JEE server (such as wildfly), I want to move to single app per runtime microprofile deployments using Quarkus and GraalVM.  Any communications between the apps will continue to use JAX-RS or JMS.



Goods Thinking Ron!! Probably we will do the same for the new app development, but we need to continue using wildfy as we  have customized it to run with OSGI, so there is a still docker creation required for that.
How does Quarkus handle the authentication? can it be integrated with the identity manager (i.e. keycloak) and identity providers(OpenLDAP) deployed on other instances? Interestingly it has a description for the kafka and mongodb but no sample for hadoop/hbase?

Also how Quarkus linked to ECS and EKS?
 
Ron McLeod
Sheriff
Posts: 3072
454
Android Eclipse IDE Angular Framework TypeScript Redhat MicroProfile Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jignesh Patel wrote:How does Quarkus handle the authentication? can it be integrated with the identity manager (i.e. keycloak) and identity providers(OpenLDAP) deployed on other instances?


I haven't had a need to look at that yet, but I recently listened to a podcast from Adam Bien about Keycloak and there was discussion about a Keycloak adapter for Quarkus (if you know Adam Bien, you will know that the first half of his interviews are going-over his guests' background, so the Keycloak stuff starts around mid-way through).  There is a guide for integrating with Keycloak which describes it in some detail.  So far, I have just used servlet-filter-based authentication.


Jignesh Patel wrote:Also how Quarkus linked to ECS and EKS?


Quarkus applications can be compiled-down to native images and then deployed to ECS.  Start time is supposed to be only milliseconds, and memory utilization is less than half of JVM + application.  This is still new for me - lots to learn.
 
Jignesh Patel
Ranch Hand
Posts: 640
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ron McLeod wrote:
I haven't had a need to look at that yet, but I recently listened to a podcast from Adam Bien about Keycloak and there was discussion about a Keycloak adapter for Quarkus (if you know Adam Bien, you will know that the first half of his interviews are going-over his guests' background, so the Keycloak stuff starts around mid-way through).  There is a guide for integrating with Keycloak which describes it in some detail.  So far, I have just used servlet-filter-based authentication.



Thanks for sharing this info.

Ron McLeod wrote:
Quarkus applications can be compiled-down to native images and then deployed to ECS.  Start time is supposed to be only milliseconds, and memory utilization is less than half of JVM + application.  This is still new for me - lots to learn.



So I guess  for hadoop/hbase we have to create our own DAO layer, nothing is available and probably no OSGI support due to lower footprint.

 
Author
Posts: 64
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems like AWS ECS is being confused with EKS. ECS is for Docker and EKS is for Kubernetes. Use EKS, not ECS, for WildFly 10 on Kubernetes. Wildfly 10 kubernetes cluster could definitely be created on AWS EKS. WildFly Operator for Kubernetes could be used.

Some references:
https://medium.com/@andrevcf/wildfly-10-kubernetes-cluster-dee7d4d377c6
https://github.com/wildfly/wildfly-operator
 
Jignesh Patel
Ranch Hand
Posts: 640
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Deepak Vohra wrote:Wildfly 10 kubernetes cluster could definitely be created on AWS EKS. WildFly Operator for Kubernetes could be used.

Some references:
https://medium.com/@andrevcf/wildfly-10-kubernetes-cluster-dee7d4d377c6
https://github.com/wildfly/wildfly-operator



Thanks Deepak for sharing, this certainly helps. I am trying to digest the details but I didn't get the point about creating docker, since wildfly is deployed on EC2, do I need to containerized wildfly on EC2 machine?
The above statement is context of following line:
"Create a docker with the artifacts in a wildfly’s module;"
 
Deepak Vohra
Author
Posts: 64
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- A Docker image is needed to run any containerized application.
- Kubernetes is a container orchestration platform.
- AWS EKS is a managed service for Kubernetes.
 
Jignesh Patel
Ranch Hand
Posts: 640
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Deepak, I really appreciate that.  This is something I wanted to implement from long time.
Not sure if I am asking too much(Sorry for that), is there a guideline to create a docker image for wildfly? I show couple of readyamade docker image for the wildfly, but ours is a customized wildfly so we have to build our own image.
 
Deepak Vohra
Author
Posts: 64
10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The WildFly image on Docker hub could be used as template. Creating a Docker image for WildFly is no different from creating any other Docker image.
https://hub.docker.com/r/jboss/wildfly/dockerfile
 
Saloon Keeper
Posts: 21960
149
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The one downside to this is that Wildfly is a fairly heavy application. Docker containers are generally used with lightweight apps like Tomcat. The more demanding a containerized app is, the more the container tends to look like a full-fledged VM. But without the advantages of a real VM.
 
Jignesh Patel
Ranch Hand
Posts: 640
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Holloway wrote:The one downside to this is that Wildfly is a fairly heavy application. Docker containers are generally used with lightweight apps like Tomcat. The more demanding a containerized app is, the more the container tends to look like a full-fledged VM. But without the advantages of a real VM.



Thank you Tim for the insight, it is certainly helpful. But I believe in his book Deepak, even mention to containerize hadoop/hbase  etc.. How practical to containerize db?
 
Tim Holloway
Saloon Keeper
Posts: 21960
149
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Databases are often containerized, actually. However, you'll likely not be running many instances of a database in containers on the same machine. And, of course, for a really heavy database like Oracle, the license fees alone would kill you. From what I've seen, though, containerized databases tend to be per-application instances, as opposed to Grand Central Repositories of All Data, so they aren't going to demand as much in the way of resources.

On the other hand, most of the weight in a full-stack Enterprise Java server is in the server itself. So you'd need a ton of RAM and quite a bit of CPU to launch an instance, and here again, you'd expect to be hosting only one webapp per instance. So I'd be more prone to run the full-stack servers in their own VMs. And, where reasonable, host multiple webapps.

Tomcat, on the other hand can run practical apps in as little as 500K (some have said less, but that was several Tomcats - and JVMs - ago). Since it doesn't support EJBs, JMS, JSF or all of those other things that when added together make a large server, it's more convenient to containerize one Tomcat per webapp and elastically spin them up and down. And of course, these days, you can build a Spring Boot server/app and that's very easy to containerize.

 
Deepak Vohra
Author
Posts: 64
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An Enterprise server such as WildFly could take up a lot of CPU and RAM, and what would a framework like Kubernetes be suitable for if not have a fix for the CPU/RAM intensive server. One of the benefits of using Kubernetes is that it is loosely coupled, which implies that the replication controller is independent of service. Multiple user-interfacing services could be linked or routed to the same replica set  or other replication controller.
 
"To do good, you actually have to do something." -- Yvon Chouinard
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic