3 Replies Latest reply on Oct 24, 2019 10:41 AM by yersan

    Migration of JBoss Application and server to Public Cloud and containerization

    ashutoshk78

      I am looking for tools and process for migration of existing on premise application to public cloud . In am looking for following things

       

      Containerize existing application

      Move to kubernetes environment in public cloud

      Copy configuration from existing on premise application server to cloud environment

      Modify configurations from JBoss AS to wildfly .

       

      Please let me which tools.methods  can be used .

       

      Thanks

      Ashutosh

        • 1. Re: Migration of JBoss Application and server to Public Cloud and containerization
          archana.katiyar

          I also have a similar question. By any chance, did you finalize a strategy for this?

          • 2. Re: Migration of JBoss Application and server to Public Cloud and containerization
            mnovak

            Hi,

             

            I'm not aware of this for WF (i'm pretty sure something exist) but JBoss EAP 7 (productized version of Wildfly) offers images for Openshift (basically Kubernetes + source to image framework). There is EAP 7.2 (based on Wildfly 14) image - Container Catalog - Red Hat Customer Portal  or more latest EAP 7.3.CD17 (based on Wildfly 17) image - Container Catalog - Red Hat Customer Portal

             

            There is doc how to use it in:

            Getting Started with JBoss EAP for OpenShift Container Platform JBoss Enterprise Application Platform Continuous Deliver…

             

            What's interesting on Openshift and source to image framework is that you specify just your github repository with your app and EAP 7 image to which you want to deploy it and it will automatically build your project and deploy into EAP7 "image" which results in completely new image "EAP7+your app" which can be deployed to Openshift. You can provide your standalone-openshift.xml and datasources for configuration in your application project in github. It's suitable when your app is not so complicated.

             

            I did try this with Openshift but most of it should work with Kubernetes as well.

             

            Cheers,

            Mirek

            • 3. Re: Migration of JBoss Application and server to Public Cloud and containerization
              yersan

              Complementing to the links supplied by mnovak I would suggest the following:

               

              * Containerize existing application

              You could take a look and get familiar with S2I: GitHub - openshift/source-to-image: A tool for building artifacts from source and injecting into container images

              S2I will allow you to create a Docker image from your WildFly server and your application. S2I is used internally by Openshift when you are creating a new application.

              The WildFly Docker images are released on quay.io/wildfly

               

               

              * Move to kubernetes environment in public cloud

              Red Hat OpenShift Container Platform is based on container technology and Kubernetes. You could try Openshift Online, there is a starter subscription for individual experimentation: Start a Free Trial - Red Hat OpenShift

              Instead of Openshift Online Starter, for development purposes and test your images in a Kubernetes environment you have Red Hat Code Ready Containers. It will install an Openshift 4 cluster on your local environment. Once you are fine testing on your local environment, you could take a look at OpenShift Online for Public Cloud Application Hosting - Red Hat OpenShift and move your application to a public cloud.

               

              * Copy configuration from existing on premise application server to cloud environment

              When you are using S2I with WildFly, you can copy to the final S2I generated image the server configuration you want to use. In some cases, that could be useful, however, a better approach is to configure your server using environment variables. The specific documentation about available environment variables to configure WildFly can be found here: GitHub - wildfly/wildfly-s2i: S2I for WildFly

               

              If you still need to copy a specific server configuration, you need to define the environment variable S2I_IMAGE_SOURCE_MOUNTS, which should point out to a directory on your application source code repository. During the S2I process with WildFly, the directory specified in this environment variable will be scanned and the content of the following directories will be copied to the final image generated by S2I:

               

              $S2I_IMAGE_SOURCE_MOUNTS/modules/* is copied to $WILDFLY_HOME/modules/system/layers/openshift

              $S2I_IMAGE_SOURCE_MOUNTS/configuration/* is copied to $WILDFLY_HOME/standalone/configuration

              $S2I_IMAGE_SOURCE_MOUNTS/deployments/* is copied to $WILDFLY_HOME/standalone/deployments

               

              For example, if you have a github application https://github.com/me/my-demo-app, you have created a directory named 'my-extensions' on your repository source code, and you have the following file my-extensions/configuration/standalone.xml, when you are using S2I with your application with yout application source code, you should use the following:

               

              s2i build -e S2I_IMAGE_SOURCE_MOUNTS=my-extensions https://github.com/me/my-demo-app wildfly/wildfly-centos7 wildfly-final-s2i-image

              (s2i build + env variables + application source code + server image -> final docker image)

               

              The final docker image generated, in this case 'wildfly-final-s2i-image', will contain the standalone.xml file from you GitHub repository in $WILDFLY_HOME/standalone/configuration

               

               

              * Modify configurations from JBoss AS to wildfly

               

              I don't follow you at all on your point here, but as mnovak pointed out, EAP is based on WildFly, so a configuration in EAP mostly can be done in WildFly, check the WildFly specific documentation about your requirement to see how to configure it in WildFly, the WildFly official documentation can be found here WildFly Documentation

               

              I would also recommend taking a look at WildFly News · WildFly  news where there are some entries talking about WildFly cloud images.