Development environments

Showing 1-13 of 13 messages
Development environments Colin Rolfe 1/27/13 6:59 PM
Has anyone done any work on building some sort of a VMware or VirtualBox image for OpenMRS development?  

If not, would there be value in setting one up?   

If this would be useful, I propose that we consider building one (and I'm volunteering to do this) in order to streamline the process of on boarding new developers and avoid the classic "but it works on my machine".   

I've started using a really excellent tool called Vagrant that ties together VirtualBox and provisioning tools like Chef or Puppet to allow you to quickly and consistently build dev environments.  In order to spin up a new dev environment is to install VirtualBox and Vagrant, run a simple command and let the provisioning scripts handle all of the configuration.  The software runs on Mac, Windows and Linux, is free of charge and (I believe) open source.


Re: Development environments Gurpreet 1/27/13 7:22 PM
Colin,

Vagrant might be a nice idea. I have used RapidFTR's vagrant setup, and it worked real nice. I wrote a blog on it too: 

I had tried creating a VB Ubuntu image earlier for OpenMRS. It turned out to be too heavy for devs to work in. I didn't try Vagrant for OpenMRS. Someone from ThoughtWorks (Venky) had started working on creating a Vagrant image, but I don't know where he stands. I will try and find out today.


--
You received this message because you are subscribed to the Google Groups "OpenMRS Australia" group.
To post to this group, send an email to openmrs-...@googlegroups.com.
To unsubscribe from this group, send email to openmrs-austra...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msg/openmrs-australia/-/xFdqUVlKtbUJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Regards
Gurpreet
(M) +91-7798987124

Join the Beach & Volunteer Space to help OpenMRS, RapidFTR and Camfed. 
We are looking for Volunteers!
Re: Development environments Pete Johns 1/27/13 10:02 PM
I think this would certainly help lower the barrier to entry!

There are Puppet manifests for creating a build server here:
https://github.com/khaong/configuration-master/

Shout if I can help with anything.


--paj
--
Pete Johns                                   <http://johnsy.com/>
Contact information                  <http://johnsy.com/contact/>
++career                       <http://johnsy.com/20121206000349>
Sometimes you're the sea... <http://johnsy.com/albums/8419778310>
Re: Development environments David Sanders 1/27/13 11:10 PM
Good idea.  Perhaps we can talk more about it tomorrow!


--
You received this message because you are subscribed to the Google Groups "OpenMRS Australia" group.
To post to this group, send an email to openmrs-...@googlegroups.com.
To unsubscribe from this group, send email to openmrs-austra...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msg/openmrs-australia/-/xFdqUVlKtbUJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Development environments Gurpreet 1/27/13 11:24 PM
Here is the Github link to Vagrant for OpenMRS created by Venky (From ThoughtWorks). Need to try it out. 

--
Regards
Gurpreet
(M) +91-7798987124

Join the Beach & Volunteer Space to help OpenMRS, RapidFTR and Camfed. 
We are looking for Volunteers!
Re: Development environments Gede Suparsa 1/30/13 1:19 AM
@Colin great idea!

I don't know whether this might make the cycle time slightly easier, but perhaps a Vagrant image for CPM development that uses the OpenMRS war (rather than the standalone)?
Re: Development environments Olivia Platek 1/31/13 5:52 PM
This sounds ace! I'd love to be given a run through of how to set up once it's in place ;)

Olivia
Self-appointed on-boarder ;)


To unsubscribe from this group and stop receiving emails from it, send an email to openmrs-austra...@googlegroups.com.
To post to this group, send an email to openmrs-...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msg/openmrs-australia/-/yCpDQDK11OYJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Re: Development environments Colin Rolfe 2/19/13 3:18 PM
Glad to get rolling on this again last night.  

We were running into a problem with the OpenMRS installer not talking to MySQL, but after a strong coffee I have now figured out the problem: 
 
- MySQL was bound to the server's internal IP (10.x.x.x), but OpenMRS was expecting localhost (127.0.0.1) and unable 

This is being set by the MySQL cookbook in my.cnf, which will be something to watch out for when switching to Puppet (which seems the better option as there is more Puppet knowledge on the team).  Living through the pain of this issue strengthens my resolve that a solid dev environment is a necessity. 
Re: Development environments Colin Rolfe 2/26/13 9:01 PM
Take #2, now with 100% more Puppet!  

I'll have a look through Alex's manifests and use what I can from there.  For now I'm going to park what I've been working on and start fresh off a known clean box (i.e. precise32 aka Ubuntu 12.04 LTS).     



On Monday, 28 January 2013 13:59:13 UTC+11, Colin Rolfe wrote:
Re: Development environments Colin Rolfe 3/6/13 8:12 PM
There's still a few things yet to be worked out in some of the Puppet modules, but I was able to build and install the CPM module in my VM today!  
Re: Development environments Colin Rolfe 3/12/13 5:37 PM
I am reasonably confident that this is now ready for general use.  I've included documentation to try and hold your hand through the entire process, but there's bound to be an error or omission somewhere.    

This should get you with a machine sufficient for OpenMRS core or module development.  Let me know if anything is missing or incorrect (or better yet - send me a pull request!)

The following will be installed and setup for you:

- Ubuntu 12.04 LTS (32 bit) (user/pass: vagrant/vagrant)    NOTE: this is a headless VM (i.e. no GUI).  Write all of your code on your host machine and compile it on the VM.
- OpenJDK 6
- Tomcat 6
- MySQL 5.5 (root password: OpenMRS)
- git
- vim
- OpenMRS 1.9.2 war file (deployed to /var/lib/tomcat/webapps)

0) Ensure your laptop is plugged in and connected to the Internet  :)
4) from the command line, change to the vagrant-OpenMRS directory
5) type "vagrant up"
6) allow time (+/- 20 minutes)for the base image and packages to download and install.  It may look like it has hung or stopped working at times, but that's just part of the process - be patient!    
7) You will see errors on the last step for now, but that's OK.  I plan on fixing this though!  http://i.imgur.com/xwsi5Vk.png
8) If you're on Linux or OS X type this to connect to the box: vagrant ssh
    If you're on Windows, you will need an ssh client like Putty: http://www.putty.org/
        Additional info available here: http://docs-v1.vagrantup.com/v1/docs/getting-started/ssh.html
9) edit your .bashrc file and add the following to the end of the file:
             export MAVEN_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -XX:NewSize=128m"
             export JAVA_HOME="/usr/"
             export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
10) reload the .bashrc with this command: source ~/.bashrc
11) test the variables have been set: echo $JAVA_HOME  
      you should see this:  /usr/
12) restart the avahi-daemon service: sudo service avahi-daemon restart
13) Within a web browser on your host machine, go to this URL to install OpenMRS core: http://openmrs-dev.local:8080/openmrs
14) Follow the prompts and give this for the MySQL password: OpenMRS
15) Make note of the default admin credentials for this site: admin/Admin123
16) Heading back to your VM...there is a folder shared at /vagrant that points to the "vagrant-OpenMRS" folder on your host machine.  Create a folder called "code" in /vagrant to hold the cpm and/or core source:  mkdir code
13) change to the new directory and you should now be at /vagrant/code
14) setup git (using your name and email, of course!):
      git config --global user.name "John Doe"
git config --global user.email joh...@example.com
15) clone the cpm code: git clone https://github.com/johnsyweb/openmrs-cpm.git
16) Change to openmrs-cpm
17) Compile the cpm module: ./go package
18) Once complete, install the module:
      - click the "Administration" link
      - click "manage modules" link
      - click "Add or Upgrade modules" button
      - click "choose file" button"
      - open the /vagrant-OpenMRS/code/openmrs-cpm/omod/*.omod file generated by the compile
      - click upload and you're done!

Many, many thanks to Steph and Alex for writing some of the modules and helping me be less of a Puppet n00b!


On Monday, 28 January 2013 13:59:13 UTC+11, Colin Rolfe wrote:
Re: Development environments Gordon Oliver 3/14/13 4:23 PM
Hi Colin, I've got it all loaded and running (VBOX on WIN7), I'm using Putty and puttygen to get the private key loaded, but it is asking me for a password at the SSH prompt.  is this an indication the I haven't got the key loaded into Putty correctly?
"
login as: vagrant
vag...@127.0.0.1's password:
Access denied
vag...@127.0.0.1's password:

"

looks like I'm close...
Re: Development environments Gordon Oliver 3/14/13 4:42 PM
Disregard, I found the issue.  I had to tell Putty to look for the private key generated by puttygen in the Auth section. - logged in now...

Found this link to a reasonable tutorial: ( http://www.ualberta.ca/CNS/RESEARCH/LinuxClusters/pka-putty.html )

Gordon