-
Notifications
You must be signed in to change notification settings - Fork 32
Manos release notes
Notice these release notes are superseded with the 1/13 release including BakeCalavera.sh script.
==================
Manos is a Vagrant configuration and a simple associated Java servlet application. It's basically a "Hello World" appliance for Java development, including:
- JDK
- Ant
- JUnit
- Tomcat
The Java project is laid out using the Maven directory approach, although Ant is currently the only build tool. It consists of two classes, one of which has a Test class. The Ant build compiles, tests, and deploys the Java to the local Tomcat instance, which can then be accessed from an external browser on the workstation. This functionality is the first major module (more on the architecture to come). I am tentatively naming this sub-module, "Manos". (More on the naming to come.)
Accessing the Manos project is supposed to be dead simple.
- Install VirtualBox
- Install Vagrant
- Clone the Calavera project to your desktop
- Open a command prompt in the Manos subdirectory and type "vagrant up."
- This initializes and provisions the VM and does an initial build of the Java code.
- Open a browser and navigate to http://localhost:8081/MainServlet
You can edit the Java and easily re-build and re-deploy it:
- Go to the /vagrant/manos/src/main/java/biz/calavera/MainServlet.java file
- Find the comment starting with "Edit this message" and edit the string enclosed in quotes below
- Open a command prompt in the Manos subdirectory and type "ant." This will rebuild the Java project and restart the Tomcat server. (Don't do this twice in quick succession at this time.)
- Optionally, you can edit Class1.java and edit or create a corresponding test in TestClass1.java. If you then run the Ant build, deployment will fail if the tests do.
This is all relatively simple, although it represents a few weeks' work on my part reviewing what little I knew of Java, and climbing a number of new learning curves. But it's nice to have all the environment variable and classpath issues sorted out and have a functioning appliance for test driven development.
More discussion....
As always, choices had to be made and reasonable people can certainly question them. Let's start with requirements:
- End to end development pipeline involving an actual compile step
- No recurring Cloud charges or credit card #s required from students (or faculty!) Assumption (for next couple years) is at least one reasonably sized physical server in a lab. This will likely change...
- End state application accessible via a browser
- Test driven development and continuous integration
- Support for Mac, Windows, and Linux
- Little time or desire on my part to support student workstation configuration issues
- Support for (currently) lower end machines - I can't require my students to have 8 gb of RAM, but I can require them to have 2. (My line in the sand.) This in turn meant the virtual machines had to stay headless (no GUI).
- Reasonable transparency as to "what is going on" with the system - stay close to the command line.
- No use yet of Mockito or similar tools - hence, difficult to write a Junit test for the servlet class.
This led to the need for essentially a virtual appliance on which the core development and build activity could be based. I considered using Eclipse (and in fact had a completely working Eclipse/Junit/Ant configuration) but when I turned to servlet development the assumption seemed to be that Eclipse needed to live on the same box as Tomcat. (Yes, I am sure there are workarounds, but I wanted to keep things very straightforward.)
The package name is biz.calavera as that domain was available (now owned by Charles Betz).
