The complete MoSKito integration guide – Step 0


Leon - December 4, 2013 - 6 comments

Despite the efforts we put into MoSKito documentation, we are continuously facing questions like ‘How to do this’ and ‘How to get that’.

Now we want to give you a guide for the whole setup cycle, which this posts starts.
The guide will cover a complete application lifecycle with MoSKito, from integration of the first MoSKito-Essential Producer to installing MoSKito-Control and MoSKito-Central setup.

But before we start, we need a guinea pig. This is what we do today – set up a simple application for experimental purposes.

Our cute little guinea pig will be The Burger Shop.

The Burger Shop was created in a brainstorming session in Oliva over some Veal medallion with rosemary and thyme (something you should definitely try if you are in Kiev). The app was designed and html-ized by Olena Mukha, one of our very talented Kiev designers.

Since The Burger Shop doesn’t sell any real burgers (surprisingly), I made a small straightforward spring mvc application out of it. The app consists of 10 classes (3 controllers, one service) and three JSPs. The code is not an example of a spring application or something, so take it as it is: an easy-to-understand small guinea pig for MoSKito integration.

The code is managed by github at https://github.com/anotheria/moskito-demo. This repository contains various versions of The Burger Shop and other MoSKito demonstration materials.

Clone the demo repository.

git clone https://github.com/anotheria/moskito-demo.git

If you want to follow this guide you need to use “burgershop-spring-stripped” and perform all the integration steps by yourself, or, if you just want to get a feel of how MoSKito works, you can take a look at “burgershop-spring-example“.

I. Running the shop.

To run the shop, you will need:

  1. Java SE, preferable 1.7.something. I am using 1.7.0_06.
  2. Maven, I am using 3.1.1.
  3. A servlet container like Tomcat, Jetty or Resin. I am using Tomcat 7.0.39.
  4. Git client. Mine came with my mac, the current version is 1.8.3.4 (Apple Git-47).

To run the shop build the project using Maven clean install:

mvn clean install

After the execution of Maven, which typically takes a few seconds (there is really not much to do), you will see the success message:

[INFO] -----------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] -----------------------------------------------------------
[INFO] Total time: 4.226s
[INFO] Finished at: Wed Dec 04 15:49:27 CET 2013
[INFO] Final Memory: 12M/30M
[INFO] -----------------------------------------------------------

This means that Maven has placed a web archive (*.war) under target/burgershop.war. Now copy burgershop.war into your servlet container and call http://localhost:8080/burgershop/.

Of course, the port may vary in your installation, but mine gives me following screen:

Front page of the burgershop

Front page of the burgershop

II. So we have a shop, now what?

As you see, we just got our brilliant shop for selling burgers of all kinds, perfectly approved by vegsource, michelin, weight watchers and even the government of albania. All you have to do now, is to click on the friendly red button “make your own burger now!”:

Burgershop selection

Pick some tasty ingredients (inside tip: try the cockroach)

Burgershop selection

Order the burger

Order now And in no more than 30 minutes your burger will wait for you somewhere in Timbuktu:

Order confirmation

Btw, we suggest a bottle of Chianti Classico Riserva 2009 with the burger. It fits perfectly the taste of a cockroach.

III.Next steps.

So now we have an application that we can MoSKitoRize (TM), monitor, break, scale, and play with. In the next step, we will add basic MoSKito integration for the Shop.

See you tomorrow 😉

Leon

Continue to next step.

6 comments

  1. […] Thresholds and Accumulators can easily be created during runtime on the Fly. Besides they can be configured also through XML or REST, it might make sense to set them up through Java. Fo more details pls follow our complete MoSkito integration guide: http://blog.anotheria.net/msk/the-full-complete-integration-guide-to-moskito-step-0/ […]

  2. Colin

    It’s a nice guide but fails at “mvn clean install”:

    [INFO] ————————————————————————
    [INFO] BUILD FAILURE
    [INFO] ————————————————————————
    [INFO] Total time: 11.995s
    [INFO] Finished at: Thu Apr 17 15:37:55 CDT 2014
    [INFO] Final Memory: 8M/240M
    [INFO] ————————————————————————
    [ERROR] Failed to execute goal on project burgershop: Could not resolve dependencies for project de.zaunberg:burgershop:war:1.0-SNAPSHOT: Could not find artifact blowfish:blowfish:jar:1.0 in nexus

  3. Hello Colin. Actually on step0 you shouldn’t experience any building problems, because there are no anotheria dependencies there. But anyway, in the next step http://blog.anotheria.net/msk/the-complete-moskito-integration-guide-step-1/ we explain how to deal with that problems.
    Regards
    Leon

  4. Marcos

    this is happening to me also, I’m pretty sure I am checking out the exact commit you describe, perhaps you should update this guide with a new commit?

Post a Comment

Your email address will not be published. Required fields are marked *