Baruch Sadogursky, recently joined JFrog as the Developers Advocate following years of working alongside JFrog’s founding team. Prior to joining JFrog, Baruch was an innovations expert with BMC Software Incubator team after 6 years with AlphaCSP as a senior Java consultant, architect and training division manager. Baruch is hacking around Java technologies and Continuous-Integration tools since 2001, including module development for open source projects like Gradle & Spring. Baruch is also active in community development around Artifactory, participating in the development of it’s plugin ecosystem and enriching it’s functionality with open-source user plugins. As JFrog’s Developers Advocate, Baruch contributes to the strong collaboration with leading open-source projects such as SpringSource, Grails and Gradle by providing them with the Artifactory Cloud platform, and fuels the Continuous-Integration ecosystem with open-source plugins for leading tools such as Jenkins, TeamCity & Bamboo. Baruch blogs at http://blogs.jfrog.org & blog.sadogursky.com and tweets as @jbaruch. Baruch is a DZone MVB and is not an employee of DZone and has posted 17 posts at DZone. You can read more from them at their website. View Full User Profile

Artifactory as Training Labs Provisioning Platform

01.20.2010
| 4050 views |
  • submit to reddit

As AlphaCSP's training guy I deliver a lot of training. They come in different flavors, on different topics, and in different companies. What is common in all companies is the problem I encounter on labs setups. First, the problem definition: Let's take, for example, some serious global financial company, which needs training in Spring, Hibernate and JAX-RS. My contact point is a nice Training Activities Administrator. She just organized "Micro-Expressions Training for HR" and her next task is to organize my Java course. What do you say, will she be able to install IntelliJ IDEA (or Eclipse?), Spring 3 bundles, Hibernate dependencies and Jersey? And yes, the classroom network is detached from both Intranet and Internet (BIG financial company, remember?). Oh, I almost forgot a bonus - the training workstations rollback all changes after every restart.

Now, here are two possible provisioning solutions:

  1. Come over day before for installs. Well, probably the classroom is occupied with another course. If not, the guy that should let me in the classroom, the network, and the computers is busy, sick or in Thailand, but probably all three in the same time. Ah, and I have another work to do on this day! And the customer won't pay for it anyway. You got the point - bad idea.
  2. Prepare the labs on CDs. Well, it generally works, most of the software courses delivered that way, one successful example is SpringSource trainings. You get nicely branded CD full of all you need - The IDE, the dependencies, and the labs source code. Good stuff, really. It works for SpringSource because of the high volume of catalog courses they deliver. They have a stock of identical CDs they use during every single training, worldwide. When it comes to tailor-made courses, things are different. No course is similar to any other course, the topics, installs, dependencies and exercises are unique set each time. That rather complicates the CDs craft - composing, burning, labeling. I don't say it's impossible - I did it for each and every course, but it's a real PITA. And thanks to the reverting workstations, students will have to copy, extract, setup, define variables every day from scratch over and over again. Did I mention PITA?
And there is a third solution. The best one. You can use Enterprise Repository Manager to recreate students environment in a couple of minutes in any given time. Now, it rocks. It really is. Watch the steps:
  1. Customer Requirements
    1. Two simple installs, every Training Administrator and/or Sysadmin can manage:
      1. IntelliJ IDEA (next-next-next) from JetBrains site. Or Eclipse?
      2. Maven2 (unzip) from Apache site.
    2. Create .m2 directory under user home for Maven user settings.
    3. Permission to connect your notebook to the class' Intranet. It is isolated, the machines revert themselves, shouldn't be a problem.
  2. Exercises development
    1. Develop the exercises on your notebook with all the Maven goodies - pom.xml, dependencies, superb IntelliJ-Maven integration (or Eclipse?).
    2. Install Artifactory locally (you'll see why Artifactory and not Nexus in the following steps). I mean - download and unzip, heh. Run it (not even as a service)
    3. Import your local repository to Artifactory (can't do it in Nexus #1) - zip it and make half-dozen of clicks in Artifactory UI.
    4. Deploy the exercises to the local repository. They probably won't compile - they are exercises, right? Then just zip them and deploy from UI. Students will download them through Artifactory UI.
    5. Take the Artifactory down. You are ready to go to class.
  3. Exercises delivery
    1. "Good morning, students!" - deliver the hell of the course, get to the hands-on part.
    2. Connect your notebook to the class' Intranet, get dynamic IP (yap, dynamic is good enough).
    3. Get Artifactory up and running.
    4. Let the students browse to Artifactory's homepage. There they will found Maven Settings Generator (can't do it in Nexus #2), which will generate settings.xml to work with your instance of Artifactory from their machines. All they need to do is check "Mirror-Any", select "repo" and save the generated file under .m2 directory. That's all, their machines are fully configured to get all the dependencies needed for Spring, Hibernate, Jersey, and whatever you need for your training.
    5. Let the students browse the repository to download the exercises zip, unzip it, export Maven project into IntelliJ IDEA (or Eclipse?) and just start working!

As you saw, using Artifactory as labs provisioning platform dramatically simplifies both lecturer's and student's life, enabling rapid exercises development and rollout without any preparation from student's part and minimal preparation from training organizer's part, all those thanks to Maven2 dependency management capabilities, good IDE Maven integration, and, of course, Artifactory's ease of use. And frankly, there is nothing I love more than ease of use. Maybe only chocolate ice-cream.

 From http://jbaruch.wordpress.com/2010/01/18/artifactory-as-training-labs-delivery-platform/

Published at DZone with permission of Baruch Sadogursky, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Yoav Aharoni replied on Thu, 2010/01/21 - 3:07am

I don't say it often: Great blog man :)

Steve Keylin replied on Thu, 2010/01/21 - 3:14pm

Mazal Tov, hope to see you here more recently :-)

Sindy Loreal replied on Sat, 2012/02/25 - 8:16am

artifactory is getting better and better, now if only it had a plugin sdk for third-party addons like nexus it would be really complete

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.