The Artima Developer Community
Sponsored Link

Java Buzz Forum
Instant Java provisioning with Vagrant and Puppet: Stash one click install

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Mathias Bogaert

Posts: 618
Nickname: pathos
Registered: Aug, 2003

Mathias Bogaert is a senior software architect at Intrasoft mainly doing projects for the EC.
Instant Java provisioning with Vagrant and Puppet: Stash one click install Posted: Mar 13, 2013 12:25 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Mathias Bogaert.
Original Post: Instant Java provisioning with Vagrant and Puppet: Stash one click install
Feed Title: Scuttlebutt
Feed URL: http://feeds.feedburner.com/AtlassianDeveloperBlog
Feed Description: tech gossip by mathias
Latest Java Buzz Posts
Latest Java Buzz Posts by Mathias Bogaert
Latest Posts From Scuttlebutt

Advertisement
Being an efficiency and productivity freak, I always try to streamline and automate repetitive tasks. As such, my antennas went up immediately when I started hearing about Provisioning frameworks; I began to incorporate them more and more in my development workflow. A perfect opportunity to take advantage of this came up while ramping up as Developer Advocate here at Atlassian. Have you heard of Vagrant yet? It is awesome. Why? It automates much of the boilerplate work we developers have to endure while setting up our platforms and toolkits. So what does Vagrant do? In their words, it allows you to create and configure lightweight, reproducible, and portable development environments. So what better testbed for this tool than the shiny new Stash 2.2 release? Objective: provide me and fellow developers a (almost) one-click install for Stash. Alright I say almost because you need just a few dependencies if you want to use a configuration/provisioning framework, specifically a recent version of VirtualBox, Vagrant and of course git. First try out this magic for yourself and then I’ll walk you through some interesting details of the setup: Install VirtualBox and Vagrant and make sure you have git available. Open your favorite terminal and add a base virtual machine or provide your own: 1vagrant box add base http://files.vagrantup.com/precise32.box Clone the stash-vagrant-install project by typing at your command line: 123git clone https://bitbucket.org/durdn/stash-vagrant-install.git cd stash-vagrant-install Start up and provision automatically all dependencies in the vm: 1vagrant up ??? There is no step 5. *** You’re DONE! *** Note: be sure to let the process finish as it might take a while to download all the required packages. After it finishes you will be able to access your brand new Stash installation with a browser at http://localhost:7990/setup If you need to access the vm you can ssh into the box, you will find the stash installation in the /vagrant folder: 123    vagrant ssh     cd /vagrant And if you need to start Stash manually you can just type: 1    STASH_HOME=/vagrant/stash-home /vagrant/atlassian-stash-2.2.0/bin/start-stash.sh Under the hood Now let me explain how all this works in some detail. Under the hood I used an absolutely basic Vagrant setup and a single Puppet manifest. Here is the Vagrantfile: 12345678Vagrant::Config.run do |config|   config.vm.box = "base"   config.vm.forward_port 7990, 7990   config.vm.provision :puppet, :module_path => "modules" do |puppet|     puppet.manifests_path = "manifests"     puppet.manifest_file  = "default.pp"   end end As you can see it only specifies the port forwarding for where Stash will run (port 7990) and Puppet as provisioning system. Nothing more. Java Installation Blues The only major requirement (and the complication) of this setup comes from the task of installing Java 7 and automatically accept the Oracle license terms. Java is not included in Ubuntu repositories for various licensing reasons therefore we have to cater for it. First we need to instruct Puppet about apt; we do this by requiring the library: 1include apt This allows us to interact with Ubuntu packages in a [...]

Read: Instant Java provisioning with Vagrant and Puppet: Stash one click install

Topic: Spring Integration – Application from scratch, Part 1 Previous Topic   Next Topic Topic: Easy application development with Couchbase, Angular and Node.js

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use