Installing Maglev via Vagrant

25 views
Skip to first unread message

Charles A. Monteiro

unread,
Dec 15, 2012, 3:26:51 PM12/15/12
to maglev-d...@googlegroups.com
This went surprisingly well. First of all to categorize what I did. I don't have a full recipe to everything automatically but I used vagrant and added the Ubuntu lucid 64 bit box. I then :

  1. vagrant up
  2. vagrant ssh
  3. and used sudo apt-gets for git, curl, openssl
  4. used curl to install rvm
  5. proceeded with maglev install
a maglev status proved that the gemstone servers started successfully.

This all worked perfectly, I then used the vagrant "package" command. The result was 664 mb "box", 

I then used the resulting box image and sure enough Maglev was there.

Now for issues,  this time when I tried to start Maglev I realized that I had not added the exports to the bashrc. I went ahead and manually did the exports , maglev status showed that there were gs servers up. I tried to start the server i.e. via "maglev start" and it crapped out. Now, I'm pretty sure its because the created VM only has 364 mb of memory.

Conclusion:

Building from Vagrant based on the Ubuntu Lucid 64 seems to work great.

I now need to learn how to add the Chef provisioning recipes so that I don ' have to take on some of the manual steps that I did  and I need to add a step where I make sure the VM is configured to have enough memory i.e. over 2gb.

That's about learning some Puppet/Chef configurations.

Anyhow , this looks very promising i.e. as far as a repeatable process that will grab from maglev git repository and create a working VM.


more later,

-Charles

Charles A. Monteiro

unread,
Dec 15, 2012, 3:36:19 PM12/15/12
to maglev-d...@googlegroups.com
correction, I meant to say that the second time around maglev status show there were NO gs servers up which is as expected , I had done a shutdown of maglev prior to packaging image

Monty Williams

unread,
Dec 15, 2012, 5:29:53 PM12/15/12
to maglev-d...@googlegroups.com
Congratulations! Sounds almost simple.   364MB is definitely too small. 1GB is probably fine depending how many MagLev VMs you're running & how much data you have. Remember to set Shared Page Cache size appropriately. 

-- Monty

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "MagLev Discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msg/maglev-discussion/-/oFSKiv4ZxoEJ.
To post to this group, send email to maglev-d...@googlegroups.com.
To unsubscribe from this group, send email to maglev-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maglev-discussion?hl=en.

charles....@gmail.com

unread,
Dec 15, 2012, 5:59:25 PM12/15/12
to maglev-d...@googlegroups.com
Right, the deal is that the default vagrant file sets it up that way. One has to set up the appropriate chef/puppet directives to jack up the memory

Sent from my Virgin Mobile Android-Powered Device

Michal Papis

unread,
Dec 16, 2012, 2:37:31 PM12/16/12
to maglev-d...@googlegroups.com
I have started a project for automatically build binary ruby packages for different platforms https://github.com/mpapis/rvm-binary

I will be working with travis to automate it even further so no human action should be needed in case tests pass.

I guess it might be good to not duplicate efforts ;)

Charles A. Monteiro

unread,
Dec 16, 2012, 10:17:42 PM12/16/12
to maglev-d...@googlegroups.com
OK, so what does this do exactly ? Maybe its something I can use.  I see that you seem to be leveraging vagrant. My objectives are simply to be able to "vagrant up"  a Maglev "latest" system i.e. one command based on a config file i.e. vagrantfile, That right now entails rvm  , well easiest way so far to get rake available which Maglev needs, but other Ruby's are secondary to that task. 

Off the top of my head the path of least resistance for my purposes seems to use Vagrant based on a virgin ubuntu lucid 64 image

  1. install git 
  2. install curl
  3. install openssl
  4. install rvm with ruby
  5. git in maglev.git from repo
  6. setup appropriate install folders with permissions
  7. setup exports
  8. run install.sh
then vagrant package and use the resulting box for dev

if there's a way that I can accomplish part of that with your project please let me know.

thanks

-Charles

Michal Papis

unread,
Dec 17, 2012, 4:13:01 PM12/17/12
to maglev-d...@googlegroups.com
it's similar, especially the initial part and building ruby, but the end target is a bit different, in both cases all needed libraries, rvm and ruby are installed, the difference start on what happens with it, my project packages the ruby for binary distribution - you plan on using the VM for development, you can either have a look on chef-rvm from fnichol for automating the provisoning or extract my chef script to separate repo - that was my initial idea but I did not wanted to do to many repositories for start while i was only playing with the idea on the beginning

Charles Monteiro

unread,
Dec 17, 2012, 5:32:39 PM12/17/12
to maglev-d...@googlegroups.com
hmmm, can your mechanism possibly be also used to distribute one's ruby code as ruby binaries ?

To view this discussion on the web visit https://groups.google.com/d/msg/maglev-discussion/-/kX6rJVszG-YJ.

To post to this group, send email to maglev-d...@googlegroups.com.
To unsubscribe from this group, send email to maglev-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maglev-discussion?hl=en.



--
Charles A. Monteiro
www.monteirosfusion.com
sent from the road

Michal Papis

unread,
Dec 18, 2012, 2:45:22 PM12/18/12
to maglev-d...@googlegroups.com
I use it for building binary rubies, distribution is just hosting the files online, s3 or a vps should do the task, rvm has support for installing binary rubies so it's just placing the files on the server in proper directory structure (per distribution/version/platform) and adding the server url to rvm configuration file

Charles Monteiro

unread,
Dec 18, 2012, 2:58:45 PM12/18/12
to maglev-d...@googlegroups.com
ah, I see , finally got around too googling and found your blog post. Good thing. So there is no place already hosting binary rubies ?

To view this discussion on the web visit https://groups.google.com/d/msg/maglev-discussion/-/GWZtMl_chI8J.

To post to this group, send email to maglev-d...@googlegroups.com.
To unsubscribe from this group, send email to maglev-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maglev-discussion?hl=en.

Jesse Cooke

unread,
Dec 18, 2012, 4:12:42 PM12/18/12
to maglev-d...@googlegroups.com
On Tue, Dec 18, 2012 at 11:58 AM, Charles Monteiro <charles....@gmail.com> wrote:
ah, I see , finally got around too googling and found your blog post. Good thing. So there is no place already hosting binary rubies ?
I think RVM hosts the most, but there isn't a "sanctioned" host for all Rubies (including JRuby, Rubinius, etc)

Charles Monteiro

unread,
Dec 18, 2012, 5:28:14 PM12/18/12
to maglev-d...@googlegroups.com

Sorry maybe I'm just confused , when I do "ram install 1.9.3", am I getting ruby binaries or source ?

Jesse Cooke

unread,
Dec 18, 2012, 5:37:31 PM12/18/12
to maglev-d...@googlegroups.com

On Tue, Dec 18, 2012 at 2:28 PM, Charles Monteiro <charles....@gmail.com> wrote:

Sorry maybe I'm just confused , when I do "ram install 1.9.3", am I getting ruby binaries or source ?

If there is a binary available for your arch, then you'll get the binary. But, you'll get RVM's prebuilt binary, not a "Ruby sanctioned" binary.

Michal Papis

unread,
Dec 19, 2012, 2:48:31 PM12/19/12
to maglev-d...@googlegroups.com
the list of providers for binary rubies is available here https://github.com/wayneeseguin/rvm/blob/master/config/db#L76-L80 - as there is no standard of naming platforms / architectures rvm builds a new scheme <platform>/<version>/<architecture> for example ubuntu/12.04/i386 - but it can be overwritten if needed, I have also required more disk space for http://rvm.io/binaries - so we can host more builds, also I'm planning / working on building a system for automated building binary rubies => https://gist.github.com/3880409 - I have already few ideas to allow "safe" upload from independent sources if you prefer to build the rubies manually, or you could just provide your own hosting of binaries like rubinius is planning to do => https://github.com/wayneeseguin/rvm/pull/1378/files#L0R79

Charles Monteiro

unread,
Dec 19, 2012, 2:50:35 PM12/19/12
to maglev-d...@googlegroups.com

interesting , thanks

To view this discussion on the web visit https://groups.google.com/d/msg/maglev-discussion/-/4kcwjPptdqAJ.

To post to this group, send email to maglev-d...@googlegroups.com.
To unsubscribe from this group, send email to maglev-discuss...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maglev-discussion?hl=en.
Reply all
Reply to author
Forward
0 new messages