This are installation notes for the upcoming 2.0 release of MMDB, this is work in progress and can change at any point.

Install rabbitMQ
 
sudo -s
 
echo "deb http://www.rabbitmq.com/debian/ testing main" >> /etc/apt/sources.d/rabbitmq.conf
 
wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
apt-key add rabbitmq-signing-key-public.asc
 
apt-get update
 
apt-get -y install rabbitmq-server rabbitmq-erlang-client git python-virtualenv mongodb-10gen


exit
 
mkdir git
cd git
git clone https://opensource.ncsa.illinois.edu/stash/scm/mmdb/medici-play.git
git clone https://opensource.ncsa.illinois.edu/stash/scm/mmdb/extractors-core.git


Install MongoDB

 sudo apt-get install mongodb-10gen

sudo /etc/init.d/mongodb start

 

Install Upstart script
We have created an Ubuntu Upstart script to handle running the Medici 2.0 web app. You can use this script to manually start and stop the Medici 2.0 web app, but more importantly you can use it to automatically start and stop the application when the server starts up or shuts down.

You can find the script attached to this wiki page here: medici.conf. Once downloaded copy this script into the /etc/init/ directory of your Ubuntu machine, and open it in your favorite text editor. For this script to work properly you must ensure that the JAVA_HOME variable points to the Java installation directory on your machine, and that the APPLICATION_PATH variable points to the base directory of the Medici app on your machine. It is recommended that you create a new user to run the application. This can be any user with permission to read/write/execute the files in your Medici directory. Change the USER variable to reflect the user that you want to run the Medici web app.

Now you will need to run these two commands 'ln -s /lib/init/upstart-job /etc/init.d/medici' and 'update-rc.d medici defaults' as root. At this point you should be able to use 'start medici' and 'stop medici,' as root, to manually start or stop the web application. Note that if you changed the name of the .conf file (e.g. foo.conf), you will need to use that name with start/stop (e.g. start foo, stop foo).

Note: You need to run the Play 'dist' command, either from the Play console or as an argument to play. This will create a universal distribution archive under target/universal. Unzip the file under /usr/share/medici-play (you can use a different path, but you will have to modify the medici.conf accordingly).

  • No labels

10 Comments

  1. Please note also that if you change the Medici port number in "medici.conf", you likely also need to change it in the network firewall rules.  On a Ubuntu machine, quoting Rob's instructions to me:

    You can now add new rules to a machine that has puppet. Just place the
    rule in /etc/iptables/rules.d and name it ##local.rules (where ## is a
    number). Puppet will ignore these files. To create the firewall you will
    need to run the following two commands:
    
    /etc/iptables/rules.sh > /etc/iptables/rules
    /etc/init.d/iptables-persistent reload

    In my case, the firewall rule exposed port 9000 on DTS1. I set the port number in "medici.conf" to 9000, and it worked fine.  When I changed it in "medici.conf" but did not update the firewall rule, the web clients' request couldn't reach the app, and to the web clients the port was not accessible.

    1. This is specific to NCSA since the firewall rules are distributed using puppet, in normal environments (i.e. VM's you setup yourself) you will not have to do this. By default Ubuntu does not have a firewall.

  2. git clone https://opensource.ncsa.illinois.edu/stash/scm/med/medici-play.git

    On mint 17, the command above gives me the following error:

    Cloning into 'medici-play'...
    fatal: unable to access 'https://opensource.ncsa.illinois.edu/stash/scm/med/medici-play.git/': gnutls_handshake() failed: Handshake failed
    1. Jong, the repository changed right? It should be opensource.ncsa.illinois.edu/stash/scm/mmdb/medici-play.git. I've updated the document. 

      1. I got same error with your URL. I think that it's not about the URL. The git version on mint 17 (or Ubuntu 14.x) has a problem with SSL provided by opensource server.

    2. This is a known issue with ubuntu 14.04 related installs. This is discussed, with a solution in questions "43515971".

  3. How to install Medici 2 on Arch linux machine? 

    1. The hardest part will be installing all the dependencies. The Medici app (medici-play) runs on the JVM 1.7. If you can install JVM 1.7. and MongoDB you should be able to run the basic application. If you want the extraction bus you need to install rabbitmq > 3.0 and the individual extractors you want to run. Most of the basic ones are python or java. So if you have both it's just a matter of installing the different extractor dependencies. This is extractor specific.

      This will get you started. There are other components, such as text based search that require other services, but those should be easy once you have the basics in place.

      Does this help?

    2. I have a pull request to add a INSTALL.md to medici that will describe the steps to take for Ubuntu. If you have some notes about Arch Linux or Debian I would love to see them to see how different they are and incorporate them into the documentation.

      1. Thanks Luigi and Rob, I installed all the dependencies and followed the installation steps in the mentioned tutorial. Mongodb and rabbitmq are working, I was able to access Mongoddb and write data on http://192.17.33.139:27017/. Here are the changes that i made, and Medici service doesn't start up.

        (1) The script to start/stop medici service => I installed in etc directly

        (2) ln -s /lib/init/upstart-job /etc/init.d/medici => ln -s /sbin/init /etc/medici (medici is the config file)

        (3) update-rc.d medici defaults => systemctl enable medici 

        Error: No such file

        When I try to run the /etc/medici the error is Failed to full start up daemon: Address already in use