My experience at Open Source Summit North America 2017

I’m a student with a lot of extracurricular activities. I’m a passionate open source developer, past Google Summer of Code 2016 & 2017 Intern, Google Code-in mentor, Software Developer(Skylabase Inc.), Docker Campus Ambassador, Buea Java User Group Leader, Google Code-in Org Admin(OpenMRS).

During my the Google Summer of Code 2017 applications, I remember having some discussions with my friend Konrad and asked if he’ll be applying for GSoC again this 2017 and he was like man, I’m not sure I’ll have the time to prepare a proposal, I’ll be traveling to Germany for CloudNativeCon and I’m like man that’s so cool. Who’s sponsoring and he said Linux Foundation. And I was like wow you must be a hell of a contributor to linux then. I was shocked to find out he had never contributed to any of Linux Foundations projects before the scholarship was awarded though he is a very passion open source developer like me and was also a GSoCer in 2015. I’m happy to say Konrad later became a 2017 GSoCer with Cloud Native Foundation something that wouldn’t have happen without attending their conference. Before this discussion with him I had been to Linux Foundations Events website a couple of times but I always felt like I’m not qualified for their scholarship since I had never contributed to any of their projects. So after hearing Konrad’s testimony I quickly visited the website again looking for interesting conferences to attend. Then I found Open Source Summit North America. That quickly got my attention. I looked at the content and found very interesting talks and amazing speakers. I was awarded the scholarship which was a complementary pass to all events at the conference. So I applied for travel funding too from Linux Foundation which was also awarded. The funds provided by Linux Foundation covered my round trip to LA and my hotel for 5 nights at JW Marriot L.A LIVE and also part of my visa fee.

The scholarship team at Linux Foundation was really helpful and very polite all the time even when I kept changing my mind sometimes. I was confused between Brussels and Ethiopian Airlines. Brussels was a shorter flight but more expensive while Ethiopia was less expensive but a very long flight with short connecting times. But I later on decided to take Ethiopia which I didn’t regret as I coincidently met two of my friends at the airport traveling to LA for the same conference with me on the same flight.

me teche and blaize.png
From left to right is me, Teche and Blaize

The flight to LA from Douala was a very long one since I took Ethopian Airlines. Was about 25 hours. At LAX, I was separated from the other guys at the customs border control. But I was fortunate enough to meet my GSoC mentor Judy Gichoya outside and we both headed to JW Marriot where I finally rejoined the guys.

 

at airport with mentor.png
Me and my GSoC mentor

The keynotes were really interesting. Most of the technical talks needed some prerequisite knowledge which I lacked. Most of the technical talks were was centered around sysadmins. So I mostly attended only the keynotes and leadership talks.

The change in time zone was kind of hard for me. LA is 8 hours behind Cameroon. So by 2pm I was already feeling very tired and sleepy.

I got to meet a lot of new people and some not new but met them for my first in person time like my mentor. I also met with a past GSoCer from India Vishwajeet Srivastava

gsocer.jpg
Me and Vishwajeet

I had a great time at the sponsors showcase too. Found out about a lot of cool technologies that these tech companies are using. Participated in a couple jackpots though I didn’t win any :(. I also got a lot of swag from the booths.

It was great watching the interview of Linus Tovalds by Jim Zemlin. What was even cooler was taking a picture with him 😀

IMG-20170911-WA0008
Me and Tovalds

Also met with some 2 Kenyan guys and a Cameroon based in boston

IMG-20170913-WA0000
Part of the African crew at OSSNA

One of the other activities I really enjoyed too was the 5k fun run. Though I got tired quickly and ended up been in the last group.

20170912_065649.jpg
morning before 5k fun run

 

We also had a bus tour which was short but fun.

20170913_070253.jpg
Getting ready for the tour

I got to take a picture at the Walt Disney Concert Hall

20170913_072513.jpg
Photo taken at the Walt Disney Concert Hall

The reception at Paramount Studios was one of the best. The choice of the venue couldn’t have been better. I saw a lot of movie artifacts. I even took a picture close to the famous star trek suit.

20170913_201402
Me at Paramount Studios

And at the end of the conference even though I didn’t get much from the technical sessions because they needed some exposure I lacked and also because they were mostly centered around sysadmins, at least I now know what I should be learning and the next time I come for a conference like this I’ll benefit more from the technical sessions. I also learned a lot from the leadership tracks and I’m now so much involved into mentoring. I’m mentoring 2 of my juniors from university to code on the LibreHealth Radiology project. I also volunteered to be Google Code-in Org Admin for OpenMRS and a Google Code-in mentor at LibreHealth.

This was a great conference. It broadened my perspective about tech and pointed to the direction I should be going and also made me understand that, there is a lot I still need to learn. I wish a lot of people from my community will get a chance like this. Attending events like this does not only motivate you to work harder but also builds new skills in you. I can’t thank Linux Foundation enough for this.

Advertisements

Setting up a development environment for LibreHealth Radiology without Docker

The recommended way of setting up development environment for LibreHealth Radiology  is using Docker. See this blog posts for instructions on how to use docker for your development environment. See blog post here Development environment with Docker.

But some people have been having some timeout issues with mysql using the docker setup. So this is an alternative way to setup your environment. But I’d recommend you try with the docker setup first.

Prerequisites

  • Java 8
  • Tomcat
  • mysql
  • git
  • maven
  • IDE

Please see their respective documentations for instructions on how to install them.

Procedure

Setup Toolkit

LibreHealth Radiology is just a module that runs on a LibreHealth Toolkit server. So to setup radiology you need to first setup a toolkit server.

Clone the toolkit code from GitLab

git clone https://gitlab.com/librehealth/lh-toolkit.git

Now build the code

cd lh-toolkit

mvn clean package

You might encounter a test failure during the build. I did. You should skip the tests using

mvn clean package -DskipTests

Now you need to deploy the generated .war file to tomcat. But the build generated an openmrs.war file instead of lh-toolkit.war. This is because toolkit is a fork from openmrs and the build still generates an openmrs.war instead. That is easy to fix. We’ll just rename the file to lh-toolkit.war. For that run the following code

cd /webapp/target/

mv openmrs.war lh-toolkit.war

Now you need to copy this .war file to the tomcat webapps folder. My tomcat installation directory is /Library/Tomcat. You need to replace that in the command below with your actual tomcat directory

mv lh-toolkit /Library/Tomcat/webapps/

Now you restart tomcat and open your browser to http://localhost:8080/lh-toolkit/

You’ll be presented with an installation wizard to complete the installation of toolkit.

 

Screen Shot 2017-09-27 at 9.55.04 PM.png

Select your language and take next

Screen Shot 2017-09-27 at 9.56.10 PM.png

Make sure simple install is selected and move forward

Screen Shot 2017-09-27 at 9.57.04 PM.png

Enter your mysql root password and move forward.

Screen Shot 2017-09-27 at 9.58.43 PM

Scroll to the bottom of this page and take note of the directory where the

lh-toolkit-runtime.properties file is kept.

Screen Shot 2017-09-27 at 10.01.10 PM.png

For me it’s in /Users/larry/.OpenMRS/lh-toolkit/ it might be different for you. Take note of it and move forward.

Screen Shot 2017-09-27 at 10.02.10 PM.png

Wait for installation to complete.

Screen Shot 2017-09-27 at 10.03.29 PM.png

If your output is like mine above that means you have successfully installed toolkit. The OpenMRS name there is a bug. I’ll create an issue for it. Now you need to install a user interface since as from 2.0 of toolkit the user interface was removed and it’s just an api server now. You are free to build which ever user interface you want to work interact with it.

For Radiology, we’ll be using the legacyui module. You have to clone and build it too then install the module. For that Follow the instructions below.

Install a User Interface

We’ll first clone the legacyui module from gitlab using

git clone https://gitlab.com/librehealth/lh-toolkit-legacyui.git

Now build a .omod file

cd lh-toolkit-legacyui/

mvn clean package

Once the build is done and successful, do

ls omod/target

And you’ll see a file called legacyui-1.2-SNAPSHOT.omod the version number may differ from this depending on when you doing the setup.

Remember the directory I told you to take note of, the directory containing the lh-toolkit-runtime.properties file?

Yes. That one. For me it was /Users/larry/.OpenMRS/lh-toolkit. There is a  subdirectory called modules. You have to copy the .omod file to that directory. For that do

cp omod/target/legacyui-1.2-SNAPSHOT.omod  /Users/larry/.OpenMRS/lh-toolkit/modules

Don’t forget to replace this /Users/larry/.OpenMRS/lh-toolkit/modules with the equivalent on your machine

Now restart tomcat and visit http://localhost:8080/lh-toolkit/

You should see this

Screen Shot 2017-09-27 at 10.58.38 PM.png

Instead of the page above you may see the error below

Screen Shot 2017-09-27 at 10.47.51 PM.png

Try restarting tomcat one or two times again and see.

You may notice that home page is a little different from the demo website. In the demo website the green bar is orange. That is easy to fit

Go to Administration under the maintenance section, click on settings

Screen Shot 2017-09-26 at 10.50.03 AM.png

You’ll see a setting for theme. Enter orange and safe.

Screen Shot 2017-09-26 at 10.51.38 AM.png

Your application should now look like below

Screen Shot 2017-09-26 at 10.52.18 AM

Now we are going to deploy the radiology module.

Deploy Radiology Module

The radiology module has dependencies on OpenMRS REST module and Open Web Apps module. You have to download those and install first before proceeding with deploying radiology. To get these modules visit https://modules.openmrs.org/#/search and search for open web apps to download the open web apps module. You should endup with a file named owa-1.7.0.omod. The version may differ depending on the time you do the download.

Search `rest webservices` to get the webservices module. You may see to versions like below. Don’t take the extension. See the screenshot below, the second one is the right one

Screen Shot 2017-09-28 at 12.57.04 AM.png

You’ll end up with a file like webservices.rest-2.20.0.omod and you can now install these omods just like you installed the legacyui module. But I’ll show you another method below how to do it graphically. This just so you know that this method is also available. In the future you are free to either us command line or this method.

While logged in to toolkit, go to Administration

Screen Shot 2017-09-28 at 1.01.59 AM.png

Click on manage modules

Screen Shot 2017-09-28 at 1.04.34 AM.png

Click on the Add or Upgrade Module button

Screen Shot 2017-09-28 at 1.05.44 AM.png

Now choose the omod files of the module you want to install and click upload

Screen Shot 2017-09-28 at 1.07.41 AM.png

Now proceed with radiology

Since you’ll be contributing to the radiology module, you should fork the repo.

Clone your fork

git clone https://gitlab.com/YourGitLabID/lh-radiology.git

cd lh-radiology

Add a remote pointing to the original repo

git remote add upstream https://gitlab.com/librehealth/lh-radiology.git

Fetch all branches

git fetch --all

Pull latest changes

git pull --rebase upstream master

Then build code

mvn clean package

That will generate a .omod file and you are free to deploy it using any of the methods see fit. You final home page should look like this, note the link to Radiology on the navbar

Screen Shot 2017-09-28 at 1.12.31 AM.png

Please leave feedback in the comment sections below.

 

 

 

 

 

 

 

 

Setting up development environment for LibreHealth Radiology using Docker

Introduction

The LibreHealth Radiology Module provides features of a Radiology Information System powered by LibreHealth Toolkit. It’s a spring framework application that uses JSP for it’s UI. There is a new UI in development that uses Angular 2/4 and communicates with the backend via REST but that UI is not production ready yet. To develop on the module you need a server running LibreHealth Toolkit(lh-toolkit). But good for you that has been dockerized.

We have a demo website you can visit if you just want to have a feel of the features. The link to the demo is https://radiology.librehealth.io/lh-toolkit/ and username and password is admin/Admin123

This tutorial is for those wanting to develop the backend. So it does not demonstrate setting up development environment for the Angular 2/4 UI. That will be in another blog post.

Prerequisites

To complete this tutorial, you need the following installed. Please see their respective documentations on how to install these on your platform.

  • Java 8
  • Maven
  • Git
  • IDE of your choice. I use Idea
  • Docker

LibreHealth Radiology runs on Java8 and uses Maven to build. Git is used to get the code and Docker packages the module in a docker image making deployment easy.

Procedure

Get the code

If you plan to make contributions to this module, you’d need to fork the repo on GitLab

Go to https://gitlab.com/librehealth/lh-radiology and fork the repo.

Clone your fork

git clone https://gitlab.com/YourGitLabId/lh-radiology.git

Add a remote repository pointing to the original repo on LibreHealth

cd lh-radiology

git remote add upstream https://gitlab.com/librehealth/lh-radiology.git

Fetch all branches

git fetch --all

Build your code

Make sure you are in the root directory of the project (lh-radiology)

mvn clean package docker:build

mvn clean package will compile your code to a .omod file which is just a custom file extension designed by OpenMRS for it’s modules. That is the file you’d have to deploy to a running toolkit server. But with introduction of docker you don’t have to worry about that.

docker:build builds a docker image from the contents of the compiled module. This docker image contains a Toolkit server, REST webservices, legacyui and your newly built radiology module all installed.

Run your application

mvn docker:start

Your application will be running on http://localhost:8080/lh-toolkit, default username and password is admin/Admin123

You should see this

Screen Shot 2017-09-26 at 10.43.27 AM

You may notice that this a little different from the demo website. In the demo website the green bar is orange. That is easy to fit

Go to Administration under the maintenance section, click on settings

Screen Shot 2017-09-26 at 10.50.03 AM.png

You’ll see a setting for theme. Enter orange and safe.

Screen Shot 2017-09-26 at 10.51.38 AM.png

Your application should now look like below

Screen Shot 2017-09-26 at 10.52.18 AM

 

Import your code into an IDE(Optional)

This step is optional and can be done at any point after getting the code. Must not be done after deploying the application. But I always chose to do it last or at least after building the code with mvn. This is because depending on your IDE, it maybe intelligent enough to identify this project as a maven project during import and while importing the module, your IDE may try to download all dependencies specified in the pom.xml of the project. This tends to take a while with some IDEs and sometimes fail even if it’s the first time these dependencies are been fetched. That is why I like building first because all the dependencies will now be cashed in your local maven repo and when importing into an IDE it won’t take much time.

 

 

There are a number of IDEs you can choose from. You may already have one you are using that like and that’s ok. I will not be showing how to do this with every possible IDE but with just the one I’m using InteliJ IDEA. If you use something else, please see it’s documentation on how to import maven projects.

Launch IDEA and select import project

Screen Shot 2017-09-26 at 11.00.24 AM.png

Select your project directory and hit next. Now select import from external model and make sure it is set to Maven

Screen Shot 2017-09-26 at 11.07.54 AM.png

Take next, next, next

When you asked to select and SDK, use Java 8. If you have not already setup an SDK, click on the plus sign to add and SDK then look for your java8 installation folder.

Click finish and your code will be imported by IDEA

Screen Shot 2017-09-26 at 11.11.12 AM.png

 

You can now make changes to the module. Every time you make a change, you have to redeploy the module but that is every easy. From the terminal, execute the following commands in the project folder

# first stop the already running application

mvn docker:stop

# then build again

mvn clean package docker:build

# and deploy

mvn docker:start