Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-1819

Setting up Apache Felix WebConsole in IGB

    Details

    • Type: New Feature
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Story Points:
      0.5
    • Sprint:
      Summer 2019 Sprint 8, Summer 2019 Sprint 9, Summer 2019 Sprint 10, Summer 2019 Sprint 11

      Description

      POC:

      Apache Felix web console is very handy when dealing with IGB bundles.

      In IGB Jetty server runs in the port: 7080. We can use this server and create an Apache Felix Web Console.

      Uses of Apache Felix web console in IGB:

      1. We can see all the bundles in IGB that are loaded in runtime.
      2. We can install and start new bundles in runtime.
      3. We can stop and uninstall old bundles in runtime.
      4. We don't have to use GOGO shell for doing this, because Apache Felix web-console is very user-friendly.
      5. We can search the bundles using filters.
      6. We can update the bundles and refresh the packages.

      I find this web console very useful and wanted to do POC on this. I think this might be very useful when working with bundles and when developing new apps.

      Test Steps:
      1. Install IGB
      2. Open Apache Felix Web Console Link. link: http://localhost:7080/system/console/bundles
      (Note: 7080 is Jetty server port)

        Attachments

          Issue Links

            Activity

            Hide
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment -

            To set up Apache web console in IGB we just need two more Felix dependencies they are:

            1. org.apache.felix.webconsole-4.3.12-all.jar
            2. org.apache.felix.eventadmin-1.5.0.jar

            Show
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment - To set up Apache web console in IGB we just need two more Felix dependencies they are: 1. org.apache.felix.webconsole-4.3.12-all.jar 2. org.apache.felix.eventadmin-1.5.0.jar
            Hide
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment -

            There is webconsole-all.jar in maven repository. We may have to add it to our nexus.

            Show
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment - There is webconsole-all.jar in maven repository. We may have to add it to our nexus.
            Hide
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment -

            [~aloraine]

            I tried creating an Apache web console without webconsole-all jar. To install it we need 15 plus jars and still expecting more dependencies. It is becoming more complicated and we end up downloading more jars.

            It would be better to add this jar to our nexus repo.

            Show
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment - [~aloraine] I tried creating an Apache web console without webconsole-all jar. To install it we need 15 plus jars and still expecting more dependencies. It is becoming more complicated and we end up downloading more jars. It would be better to add this jar to our nexus repo.
            Hide
            ann.loraine Ann Loraine added a comment -

            I agree. I think the "all" bundle is meant to be like a first-class application (built from bundles) that is meant to provide a service into the framework – very useful for development and possibly other things, as well.
            Maybe the next step is to investigate how they are building that jar so that we can build it ourselves, if required. Likewise, we can unpack it and review what it is exporting, if anything.

            Show
            ann.loraine Ann Loraine added a comment - I agree. I think the "all" bundle is meant to be like a first-class application (built from bundles) that is meant to provide a service into the framework – very useful for development and possibly other things, as well. Maybe the next step is to investigate how they are building that jar so that we can build it ourselves, if required. Likewise, we can unpack it and review what it is exporting, if anything.
            Hide
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment - - edited

            Branch: https://bitbucket.org/svallapu/charan_igb/branch/IGBF-1819-latest

            Apache Felix web-console is not supporting our older jetty version(2.2.2). Upgraded jetty to 4.0.10

            Added below dependencies in shared lib wrapper that are required by org.apache.felix.webconsole(4.3.12). These are OSGi bundles.
            1.commons-fileupload(1.4)
            2.commons.io(2.4)
            3.org.apache.felix.eventadmin(1.5.0)

            Show
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment - - edited Branch: https://bitbucket.org/svallapu/charan_igb/branch/IGBF-1819-latest Apache Felix web-console is not supporting our older jetty version(2.2.2). Upgraded jetty to 4.0.10 Added below dependencies in shared lib wrapper that are required by org.apache.felix.webconsole(4.3.12). These are OSGi bundles. 1.commons-fileupload(1.4) 2.commons.io(2.4) 3.org.apache.felix.eventadmin(1.5.0)
            Hide
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment -

            To Test:

            1. Install IGB (with the latest code)
            2. Open your browser
            3. Load http://localhost:7080/system/console/bundles

            Show
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment - To Test: 1. Install IGB (with the latest code) 2. Open your browser 3. Load http://localhost:7080/system/console/bundles
            Hide
            ann.loraine Ann Loraine added a comment -

            Tested as instructed:

            Installed:

            and opened:

            There was an error:

            snip
            HTTP ERROR 404
            Problem accessing /system/console/bundles. Reason:

            Not Found
            snip

            Question: Is this really the right workflow for testing? Seems like the main target user for this functionality is the developer. Testing instructions need to explain how I would use this new functionality in conjunction with my IDE. So maybe it doesn't matter that I get a 404 error after running from the installer.

            Show
            ann.loraine Ann Loraine added a comment - Tested as instructed: Installed: https://bitbucket.org/svallapu/charan_igb/downloads/IGB-IGBF-1819-latest.dmg and opened: http://localhost:7080/system/console/bundles There was an error: snip HTTP ERROR 404 Problem accessing /system/console/bundles. Reason: Not Found snip Question: Is this really the right workflow for testing? Seems like the main target user for this functionality is the developer. Testing instructions need to explain how I would use this new functionality in conjunction with my IDE. So maybe it doesn't matter that I get a 404 error after running from the installer.
            Hide
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment - - edited

            To Test:
            [~aloraine]
            (Note: As of now it only works with running IGB in development mode, it won't work by running IGB using igb_exe.jar)

            1. Open Netbeans
            2. Load IGB project
            3. A single click on main
            4. On the top click green run button.
            5. Load the below link when IGB is started
            http://localhost:7080/system/console/bundles

            Show
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment - - edited To Test: [~aloraine] (Note: As of now it only works with running IGB in development mode, it won't work by running IGB using igb_exe.jar) 1. Open Netbeans 2. Load IGB project 3. A single click on main 4. On the top click green run button. 5. Load the below link when IGB is started http://localhost:7080/system/console/bundles
            Hide
            ann.loraine Ann Loraine added a comment -

            See this slidedeck that explains how "development mode" works and how it can trigger bugs if one is not careful!

            IGBF-1366-Case-Study-DisappearingApps.pptx
            https://canvas.instructure.com/courses/1164217/files/67490997?module_item_id=19105206

            Show
            ann.loraine Ann Loraine added a comment - See this slidedeck that explains how "development mode" works and how it can trigger bugs if one is not careful! IGBF-1366 -Case-Study-DisappearingApps.pptx https://canvas.instructure.com/courses/1164217/files/67490997?module_item_id=19105206
            Hide
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment -

            [~aloraine] Srishti Tiwari
            Branch: https://bitbucket.org/svallapu/charan_igb/branch/IGBF-1819-latest#diff

            To Test:

            --> IGB in execution mode

            1. Clone latest branch or my branch
            2. mvn clean install (build the project)
            3. java -jar igb-exe.jar (execute jar)
            4. Open http://localhost:7080/system/console/bundles

            --> IGB in development mode

            1. Open Netbeans
            2. Load IGB project
            3. A single click on main
            4. On the top click green run button.
            5. Load the below link when IGB is started
            http://localhost:7080/system/console/bundles

            Show
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment - [~aloraine] Srishti Tiwari Branch: https://bitbucket.org/svallapu/charan_igb/branch/IGBF-1819-latest#diff To Test: --> IGB in execution mode 1. Clone latest branch or my branch 2. mvn clean install (build the project) 3. java -jar igb-exe.jar (execute jar) 4. Open http://localhost:7080/system/console/bundles --> IGB in development mode 1. Open Netbeans 2. Load IGB project 3. A single click on main 4. On the top click green run button. 5. Load the below link when IGB is started http://localhost:7080/system/console/bundles
            Hide
            stiwari8 Srishti Tiwari (Inactive) added a comment -

            Hello Dr. [~aloraine], I have tested this new feature in my system. Its working with both the modes, development and execution.

            Show
            stiwari8 Srishti Tiwari (Inactive) added a comment - Hello Dr. [~aloraine] , I have tested this new feature in my system. Its working with both the modes, development and execution.
            Hide
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment -

            Pull Request Submitted.

            Show
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment - Pull Request Submitted.
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment -

            The feature is working perfectly fine, in both, execution and development modes. Moving to closed.

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - The feature is working perfectly fine, in both, execution and development modes. Moving to closed.
            Hide
            ann.loraine Ann Loraine added a comment - - edited

            Minor question for Charan about this step:

            • 3. java -jar igb-exe.jar (execute jar)

            Are you able to run IGB using the run_igb.bat script (top level of project)?

            Show
            ann.loraine Ann Loraine added a comment - - edited Minor question for Charan about this step: 3. java -jar igb-exe.jar (execute jar) Are you able to run IGB using the run_igb.bat script (top level of project)?
            Hide
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment -

            [~aloraine] I didn't try using run_igb.bat script. I will run it and update you.

            Show
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment - [~aloraine] I didn't try using run_igb.bat script. I will run it and update you.
            Hide
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment -

            [~aloraine]

            run_igb.bat is running as expected without any issues. Apache web console is loading in the browser.

            Show
            svallapu Sai Charan Reddy Vallapureddy (Inactive) added a comment - [~aloraine] run_igb.bat is running as expected without any issues. Apache web console is loading in the browser.

              People

              • Assignee:
                svallapu Sai Charan Reddy Vallapureddy (Inactive)
                Reporter:
                svallapu Sai Charan Reddy Vallapureddy (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: