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

On-boarding: Step 5 - Learn OSGi basics from OSGi in Action text

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Story Points:
      2
    • Sprint:
      Fall 7 : 11 Nov to 22 Nov, Fall 8 : 25 Nov to 6 Dec, Fall 9 : 9 Dec to 20 Dec, Spring 2 : 20 Jan to 31 Jan, Spring 3 : 3 Feb to 14 Feb, Summer 6: 17 Aug - 28 Aug, Summer 7: 31 Aug - 11 Sep, Fall 1: 14 Sep - 25 Sep, Winter 5 Feb 22 - Mar 5, Winter 6 Mar 8 - Mar 19, Spring 1 2021 Mar 22 - Apr 2, Summer 2 2023 May 29, Summer 3 2023 June 12, Fall 4 2023 Oct 16, Fall 5, Fall 6, Spring 5, Fall 5, Fall 6, Fall 7, Winter 1, Spring 1

      Description

      IGB runs with an OSGi framework, so it's important to understand OSGi and how it works.

      To get familiar with OSGi, read "OSGi in Action" Chapters 1 to 3. Updated companion code for the text is here: https://bitbucket.org/lorainelab/osgi-in-action/src/master/

      To solidify your understanding, do one of the hands-on tasks below. Or, if you like, come up with your own idea for a deliverable that helps you – and others! – understand how OSGi bundles can form a modular application in Java.

      One you have done that, you should continuing reading the remaining chapters on your own time. Aim to finish by the end of your first semester on the team, or by the end of the first semester break after you join the team. Your ultimate goal: Become an expert on OSGi so that you can develop new aspects of the IGB API and help others do the same.

      Task suggestions:

      • Create a new shape implementation for the drawing program described above. Use the shell program from Chapter 3 to dynamically load and unload it. Submit a pull request to the bitbucket repository (see below).
      • Investigate the karaf OSGi container. Run the program from Chapter 3 in the karaf shell instead of the shell from Chapter 3. Create instructions for how to do that. Here's a short tutorial to get you started: https://www.javaindeed.com/playing-with-apache-karaf-console/
      • Look into how IGB application uses the felix OSGi framework. Create a flow diagram showing how launching IGB starts and manages the OSGi container.
      • Review the "core" modules in IGB and make a list of each package exported from same.

      See IGBF-3358 for additional tutorials on OSGI.

        Attachments

        1. How to set up environment and run the Paint Program in Karaf Console.docx
          8 kB
        2. kite_shape.png
          kite_shape.png
          27 kB
        3. octagon_paintframe.png
          octagon_paintframe.png
          428 kB
        4. paint2.png
          paint2.png
          21 kB
        5. PaintFrame.JPG
          PaintFrame.JPG
          52 kB
        6. paintframe.png
          paintframe.png
          48 kB
        7. PaintFrame2.png
          PaintFrame2.png
          208 kB
        8. rectangle.PNG
          rectangle.PNG
          5 kB
        9. Screenshot.png
          Screenshot.png
          1.20 MB
        10. screenshot-1.png
          screenshot-1.png
          287 kB
        11. screenshot-2.png
          screenshot-2.png
          383 kB
        12. Screenshot 2023-10-26 at 1.59.31 PM.png
          Screenshot 2023-10-26 at 1.59.31 PM.png
          88 kB
        13. screenshot-3.png
          screenshot-3.png
          1.18 MB
        14. steps to test (1).docx
          249 kB

          Issue Links

            Activity

            Hide
            pooja.nikhare Pooja Nikhare (Inactive) added a comment -

            Completed Task 1 , Task 2.
            1. Implemented a new Pentagon shape in Paint frame and used remote shell given in Chapter 3.
            2. Used Karaf shell to deploy Bundles , went through the life cycle followed by bundles in Karaf shell.
            Used auto deployment feature in Karaf shell to deploy the bundles easily.
            Attached screenshots for reference.
            Submitted a Pull request : https://bitbucket.org/lorainelab/osgi-in-action/pull-requests/1/igbf-2125/diff

            Show
            pooja.nikhare Pooja Nikhare (Inactive) added a comment - Completed Task 1 , Task 2. 1. Implemented a new Pentagon shape in Paint frame and used remote shell given in Chapter 3. 2. Used Karaf shell to deploy Bundles , went through the life cycle followed by bundles in Karaf shell. Used auto deployment feature in Karaf shell to deploy the bundles easily. Attached screenshots for reference. Submitted a Pull request : https://bitbucket.org/lorainelab/osgi-in-action/pull-requests/1/igbf-2125/diff
            Hide
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment -

            Successfully added a new shape to the PaintFrame: Hexagon.

            Kindly review:
            https://bitbucket.org/skulka2710/shamika-osgi-in-action/branch/IGBF-2125#diff

            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - Successfully added a new shape to the PaintFrame: Hexagon. Kindly review: https://bitbucket.org/skulka2710/shamika-osgi-in-action/branch/IGBF-2125#diff
            Show
            shamika Shamika Gajanan Kulkarni (Inactive) added a comment - PR submitted. https://bitbucket.org/lorainelab/osgi-in-action/pull-requests/2/igbf-2125-add-hexagon-to-paintframe-and-on/diff
            Hide
            ssegu Sai Supreeth Segu (Inactive) added a comment - - edited

            Successfully added Ellipse shape to PaintFrame.

            My fork link for osgi-in-action:
            https://bitbucket.org/supreeth27/supreeth-osgi-in-action/src/IGBF-2125/

            Show
            ssegu Sai Supreeth Segu (Inactive) added a comment - - edited Successfully added Ellipse shape to PaintFrame. My fork link for osgi-in-action: https://bitbucket.org/supreeth27/supreeth-osgi-in-action/src/IGBF-2125/
            Show
            ssegu Sai Supreeth Segu (Inactive) added a comment - - edited Please review my pull request submitted. https://bitbucket.org/lorainelab/osgi-in-action/pull-requests/3/igbf-2125-add-ellipse-shape-to-paintframe
            Hide
            ann.loraine Ann Loraine added a comment -

            Merged.

            Show
            ann.loraine Ann Loraine added a comment - Merged.
            Hide
            inaylor Irvin Naylor (Inactive) added a comment -

            Added a rectangle shape to the PaintFrame.

            Fork link: https://bitbucket.org/Inaylor01/osgi-in-action/src/IGBF-2125/

            Show
            inaylor Irvin Naylor (Inactive) added a comment - Added a rectangle shape to the PaintFrame. Fork link: https://bitbucket.org/Inaylor01/osgi-in-action/src/IGBF-2125/
            Hide
            ann.loraine Ann Loraine added a comment -

            Logan Weidenhammer - kindly review code and functionality. Please see "steps to test" document attached previously by Pooja N.

            Show
            ann.loraine Ann Loraine added a comment - Logan Weidenhammer - kindly review code and functionality. Please see "steps to test" document attached previously by Pooja N.
            Hide
            rweidenh Logan Weidenhammer (Inactive) added a comment -

            Code looks appropriate and functionality works as expected.

            I ran into several problems in setting up the environment to test the paint program.
            Irvin helped walk me though the process and we wrote a new document for how to set up the environment and test.
            I will include this as an attachment.

            Recommending pull request.

            Show
            rweidenh Logan Weidenhammer (Inactive) added a comment - Code looks appropriate and functionality works as expected. I ran into several problems in setting up the environment to test the paint program. Irvin helped walk me though the process and we wrote a new document for how to set up the environment and test. I will include this as an attachment. Recommending pull request.
            Show
            inaylor Irvin Naylor (Inactive) added a comment - Pull request: https://bitbucket.org/lorainelab/osgi-in-action/pull-requests/4/add-a-rectangle-shape-to-paintframe-for-on
            Hide
            omarne Omkar Marne (Inactive) added a comment - - edited

            Added a rectangle shape to the Paint.

            Link - https://bitbucket.org/omarne/osgi-in-action/branch/IGBF-2125

            Show
            omarne Omkar Marne (Inactive) added a comment - - edited Added a rectangle shape to the Paint. Link - https://bitbucket.org/omarne/osgi-in-action/branch/IGBF-2125
            Hide
            inaylor Irvin Naylor (Inactive) added a comment -

            Rectangle looks good, It shows up in the paint frame, and appears in the space when clicked. Recommend Pull Request.

            Show
            inaylor Irvin Naylor (Inactive) added a comment - Rectangle looks good, It shows up in the paint frame, and appears in the space when clicked. Recommend Pull Request.
            Hide
            ann.loraine Ann Loraine added a comment -

            The commit has changed a lot of files, and it's not clear if all of these changes are required.
            Request for Omkar Marne: Please review and make the changes more lightweight.

            Show
            ann.loraine Ann Loraine added a comment - The commit has changed a lot of files, and it's not clear if all of these changes are required. Request for Omkar Marne : Please review and make the changes more lightweight.
            Hide
            omarne Omkar Marne (Inactive) added a comment -

            Required changes have made and Included only the necessary files.

            Pull request : https://bitbucket.org/lorainelab/osgi-in-action/pull-requests/6

            Show
            omarne Omkar Marne (Inactive) added a comment - Required changes have made and Included only the necessary files. Pull request : https://bitbucket.org/lorainelab/osgi-in-action/pull-requests/6
            Hide
            inaylor Irvin Naylor (Inactive) added a comment -

            I reviewed the pull request and everything looks good to me. The right files for Omkar's changes show up in the commits with no extra files.

            I have approved it though I imagine [~aloraine] would want to have the final say regardless.

            Show
            inaylor Irvin Naylor (Inactive) added a comment - I reviewed the pull request and everything looks good to me. The right files for Omkar's changes show up in the commits with no extra files. I have approved it though I imagine [~aloraine] would want to have the final say regardless.
            Hide
            ann.loraine Ann Loraine added a comment -

            Merged and moved to Closed.

            Show
            ann.loraine Ann Loraine added a comment - Merged and moved to Closed.
            Hide
            kgopu Kaushik Gopu (Inactive) added a comment - - edited

            Added a kite shape to paint frame.
            https://bitbucket.org/kaushik-gopu/osgi-in-action/branch/IGBF-2125
            I have attached sample image of paint frame in attachments.

            Show
            kgopu Kaushik Gopu (Inactive) added a comment - - edited Added a kite shape to paint frame. https://bitbucket.org/kaushik-gopu/osgi-in-action/branch/IGBF-2125 I have attached sample image of paint frame in attachments.
            Hide
            jsirigin Jaya Sravani Sirigineedi (Inactive) added a comment -

            Added a Kite shape to the paint frame. Below is the pull request for the same.
            https://bitbucket.org/lorainelab/osgi-in-action/pull-requests/7
            I have attached the screenshot of the paint frame with the kite image below.

            Show
            jsirigin Jaya Sravani Sirigineedi (Inactive) added a comment - Added a Kite shape to the paint frame. Below is the pull request for the same. https://bitbucket.org/lorainelab/osgi-in-action/pull-requests/7 I have attached the screenshot of the paint frame with the kite image below.
            Hide
            ann.loraine Ann Loraine added a comment -

            Request for Kaushik Gopu: Since you were the last person (before Jaya Sravani Sirigineedi) to do On-boarding Step 5, could you review this ticket for her?
            Many thanks!!

            Show
            ann.loraine Ann Loraine added a comment - Request for Kaushik Gopu : Since you were the last person (before Jaya Sravani Sirigineedi ) to do On-boarding Step 5, could you review this ticket for her? Many thanks!!
            Hide
            kgopu Kaushik Gopu (Inactive) added a comment -
            • Code looks appropriate and functionality works as expected. I can see the image appearing in the applet frame.
            Show
            kgopu Kaushik Gopu (Inactive) added a comment - Code looks appropriate and functionality works as expected. I can see the image appearing in the applet frame.
            Hide
            ann.loraine Ann Loraine added a comment -

            Since Dylan Marrotte is going to be doing data analysis rather than IGB software development, I think it would be better for you to do tasks from the "learn the basics - data analysis" epic.

            Un-assigning and moving back to "DONE"

            Sorry for the confusion!

            Show
            ann.loraine Ann Loraine added a comment - Since Dylan Marrotte is going to be doing data analysis rather than IGB software development, I think it would be better for you to do tasks from the "learn the basics - data analysis" epic. Un-assigning and moving back to "DONE" Sorry for the confusion!
            Hide
            uchinta Udaya Chinta (Inactive) added a comment - - edited

            I created a new shape diamond for drawing the pattern in paint frame.

            • Initially, I encountered a Java issue. The code was using Java 1.5, but some parts of it had dependencies on Java 8. To resolve this, I updated the version to Java 8, which fixed the issue.
              To ensure there were no further issues after changing the Java version, I performed an Ant build for the entire osgi-in-action project. The build was successful. A screenshot is attached for reference:
            • While testing the code, I encountered the following error:
              org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: - This error occurred because multiple copies of the same bundles were being run. I resolved it by clearing the cache.
              Now, the bundles are running successfully without any issues. A screenshot is attached for reference:

            To simplify navigation between jdks I used sdkman as suggested by Professor Loraine.
            Branch : https://bitbucket.org/lorainelab_udaya/osgi-in-action/branch/IGBF-2125
            Raised PR for code changes :
            https://bitbucket.org/lorainelab/osgi-in-action/pull-requests/8

            Ann Loraine please verify the ticket.

            Show
            uchinta Udaya Chinta (Inactive) added a comment - - edited I created a new shape diamond for drawing the pattern in paint frame. Initially, I encountered a Java issue. The code was using Java 1.5, but some parts of it had dependencies on Java 8. To resolve this, I updated the version to Java 8, which fixed the issue. To ensure there were no further issues after changing the Java version, I performed an Ant build for the entire osgi-in-action project. The build was successful. A screenshot is attached for reference: While testing the code, I encountered the following error: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: - This error occurred because multiple copies of the same bundles were being run. I resolved it by clearing the cache. Now, the bundles are running successfully without any issues. A screenshot is attached for reference: To simplify navigation between jdks I used sdkman as suggested by Professor Loraine. Branch : https://bitbucket.org/lorainelab_udaya/osgi-in-action/branch/IGBF-2125 Raised PR for code changes : https://bitbucket.org/lorainelab/osgi-in-action/pull-requests/8 Ann Loraine please verify the ticket.
            Hide
            uchinta Udaya Chinta (Inactive) added a comment - - edited

            Steps to test:

            1. Install ant (https://ant.apache.org/bindownload.cgi) and jdk 8 (use sdkman to switch between jdks easily). Add them to the global variables.
            2. Install git bash.
            3. Open git bash and use command "cd E:\osgi-in-action\chapter03\paint-example"
            4. Use command "ant" to build the code , then a launcher.jar file will be generated.
            5. Run the command "java -jar launcher.jar bundles", a paint frame will be opened.
            6. Test the changes in paint frame.

            Karthik Raveendran please follow the above steps for testing.

            Show
            uchinta Udaya Chinta (Inactive) added a comment - - edited Steps to test: Install ant ( https://ant.apache.org/bindownload.cgi ) and jdk 8 (use sdkman to switch between jdks easily). Add them to the global variables. Install git bash. Open git bash and use command "cd E:\osgi-in-action\chapter03\paint-example" Use command "ant" to build the code , then a launcher.jar file will be generated. Run the command "java -jar launcher.jar bundles", a paint frame will be opened. Test the changes in paint frame. Karthik Raveendran please follow the above steps for testing.
            Hide
            karthik Karthik Raveendran added a comment -

            Apart from a change in Java version from 1.5 to 1.8, the rest of changes in code are similar to the changes made by Jaya Sravani Sirigineedi in her commit. I was able to run the paint application and test the diamond shape. Recommending PR

            Show
            karthik Karthik Raveendran added a comment - Apart from a change in Java version from 1.5 to 1.8, the rest of changes in code are similar to the changes made by Jaya Sravani Sirigineedi in her commit. I was able to run the paint application and test the diamond shape. Recommending PR
            Hide
            uchinta Udaya Chinta (Inactive) added a comment - - edited

            Thank you for reviewing the ticket.
            The code might appear similar because I chose to draw a diamond shape, which is similar to the pattern drawn by Sravani. However, I made specific changes to ensure that my shape is drawn correctly without any issues.
            PR submitted
            https://bitbucket.org/lorainelab/osgi-in-action/pull-requests/8

            Show
            uchinta Udaya Chinta (Inactive) added a comment - - edited Thank you for reviewing the ticket. The code might appear similar because I chose to draw a diamond shape, which is similar to the pattern drawn by Sravani. However, I made specific changes to ensure that my shape is drawn correctly without any issues. PR submitted https://bitbucket.org/lorainelab/osgi-in-action/pull-requests/8
            Hide
            ann.loraine Ann Loraine added a comment -

            A comment:

            There is just one commit, and the commit combines two different changes. One change is that the java version got increased to 1.8, up from 1.5. The other change adds the new shape.

            It would have been better to change the version in one commit, and then create a new commit that adds the new shape.

            in general, each individual commit should have one goal and one goal only. A commit can include edits to multiple files, but all those edits should have one common purpose.

            As an exercise to help Udaya Chinta get more familiar with git, I recommend re-doing the work so that the java version change happens in one commit and the other change happens in a second commit.

            Show
            ann.loraine Ann Loraine added a comment - A comment: There is just one commit, and the commit combines two different changes. One change is that the java version got increased to 1.8, up from 1.5. The other change adds the new shape. It would have been better to change the version in one commit, and then create a new commit that adds the new shape. in general, each individual commit should have one goal and one goal only. A commit can include edits to multiple files, but all those edits should have one common purpose. As an exercise to help Udaya Chinta get more familiar with git, I recommend re-doing the work so that the java version change happens in one commit and the other change happens in a second commit.
            Hide
            ann.loraine Ann Loraine added a comment -

            I have merged the PR. However, I noticed after the fact that the new commit messages look like IGBF 2125 instead of IGBF-2125. Don't forget the hyphen character next time please

            Thanks Udaya Chinta!

            Ready for final testing.

            Show
            ann.loraine Ann Loraine added a comment - I have merged the PR. However, I noticed after the fact that the new commit messages look like IGBF 2125 instead of IGBF-2125 . Don't forget the hyphen character next time please Thanks Udaya Chinta ! Ready for final testing.
            Hide
            uchinta Udaya Chinta (Inactive) added a comment -

            Apologies for the mistake! I'll make sure to include the hyphen in the commit messages moving forward.

            Show
            uchinta Udaya Chinta (Inactive) added a comment - Apologies for the mistake! I'll make sure to include the hyphen in the commit messages moving forward.
            Hide
            pbhatia1 Pranav Bhatia (Inactive) added a comment -

            I have successfully tested Udaya's code.

            I am able to run the application and draw diamond shape.

            Please find the attached screenshot for validation.

            Show
            pbhatia1 Pranav Bhatia (Inactive) added a comment - I have successfully tested Udaya's code. I am able to run the application and draw diamond shape. Please find the attached screenshot for validation.
            Hide
            sjagarap saideepthi jagarapu (Inactive) added a comment - - edited

            1. I have gone through chapters of osgi-in-action.
            2. Setup the necessary libraries sdkman, java 8, ant, karaf to run this repo.
            3. Implemented new Octagon shape in Paint frame, ant build is successful, auto deployed the bundles using Karaf shell.

            Worked Branch - https://bitbucket.org/lorainelab-deepthi/osgi-in-action/src/IGBF-2125/

            Attached screenshot of octagon shape implementation.

            Testing instructions can be found in the comments of this same ticket

            Show
            sjagarap saideepthi jagarapu (Inactive) added a comment - - edited 1. I have gone through chapters of osgi-in-action. 2. Setup the necessary libraries sdkman, java 8, ant, karaf to run this repo. 3. Implemented new Octagon shape in Paint frame, ant build is successful, auto deployed the bundles using Karaf shell. Worked Branch - https://bitbucket.org/lorainelab-deepthi/osgi-in-action/src/IGBF-2125/ Attached screenshot of octagon shape implementation. Testing instructions can be found in the comments of this same ticket
            Hide
            pbhatia1 Pranav Bhatia (Inactive) added a comment -

            Successfully tested Deepthi's code.

            I am able to run the application and draw Octagon shape.

            Please find the attached screenshot for validation.

            Show
            pbhatia1 Pranav Bhatia (Inactive) added a comment - Successfully tested Deepthi's code. I am able to run the application and draw Octagon shape. Please find the attached screenshot for validation.
            Show
            sjagarap saideepthi jagarapu (Inactive) added a comment - PR raised https://bitbucket.org/lorainelab/osgi-in-action/pull-requests/9
            Hide
            ann.loraine Ann Loraine added a comment -

            PR is merged. Ready for testing.

            Show
            ann.loraine Ann Loraine added a comment - PR is merged. Ready for testing.
            Hide
            pbhatia1 Pranav Bhatia (Inactive) added a comment -

            Tested the changes after merging and successfully drew developed and other shapes in the paint frame.
            Marking this as done.

            Show
            pbhatia1 Pranav Bhatia (Inactive) added a comment - Tested the changes after merging and successfully drew developed and other shapes in the paint frame. Marking this as done.

              People

              • Assignee:
                pbhatia1 Pranav Bhatia (Inactive)
                Reporter:
                ann.loraine Ann Loraine
              • Votes:
                0 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: