• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

migrating EC2 on ECS and EKS

 
Ranch Hand
Posts: 686
Mac
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Marshal
Posts: 4501
572
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 4501
572
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Tim Holloway
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kubernetes is not a "framework". It is an administrative platform.

Kubernetes doesn't care whether the resources it controls are heavy or light. Its purpose is to ramp them up and down.
 
Jignesh Patel
Ranch Hand
Posts: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did not understood, about what Deepak trying suggest? Is it advisable to do containerized wildfly - I can say our wildfly is already customized to support OSGI so for sure it is a heavy app server.


Also Tim, what do you mean by "more the container tends to look like a full-fledged VM. But without the advantages of a real VM." - are there advantages of using VM vs container in our context?
 
Tim Holloway
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Containers are lightweight virtualization. They share many of their resources with their hosts and in many cases you only have access to resource if you configure the container accordingly - for example, to mount data that's external to the container or gain access to network ports.

VMs, on the other hand, emulate virtually (sorry, no pun intended) all of the characteristics that a physical machine would have.

I run VMs for my master databases because they provide a central repository for all critical data (which makes it easier to backup, recover, tune, and maintain). And because I can let them own entire disk drives if I like. I also have dedicated VMs for certain systems that don't easily containerize. In many cases, however, the choice between a VM and a container is simply preference, and I've been migrating apps from VMs into containers for quite a while now.

I suppose my general rule is that if I need something that is complex and/or runs a heavy workload and/or is a central subsystem, I'll put it in a VM. If it's lightweight, needs to be elastic, and is pretty much self-contained, it's a candidate for containerization.
 
Jignesh Patel
Ranch Hand
Posts: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:
I suppose my general rule is that if I need something that is complex and/or runs a heavy workload and/or is a central subsystem, I'll put it in a VM. If it's lightweight, needs to be elastic, and is pretty much self-contained, it's a candidate for containerization.



I am running 5(host)+1(domain) wildfly servers in each environment, so how about getting benefitted about containerizing concept, to replicate them in multiple environments vs running EC2 virtual, where I have to configure each machine.
 
Tim Holloway
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Certainly there is a simplicity about deploying containers. However, it's not that difficult to create custom VM images using cloud-init, Packer, Vagrant and Ansible.
 
Sasparilla and fresh horses for all my men! You will see to it, won't you tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic