Giter Club home page Giter Club logo

rubysoup's Introduction

RubySoup

Vagrant virtual environment for learning and developing with Ruby, SSH, SCP and unit testing.

It’s hard to be chunkier… Use at your own risk.

Introduction

This project automates setting up a virtual development environment for Ruby, SSH (secure shell), SCP (secure copy) and public/private key authentication.

Some of the current key features are:

  • Setup two virtual machines with Vagrant: A master with ip address 10.11.1.100 and a slave with ip address 10.11.1.101.
  • Use Puppet for provisioning.
  • RVM updates the Ruby version automatically to the latest version on the master machines.
  • Allow password less SSH authentication from the master to the slave.
  • A set of unit test are provided in order to validate that the environment is setup correctly.
  • TDD in mind: Even if doing SSH doesn’t comply with the strict definition of TDD, the intent of this project is to provide an environment that enable to write tests first and to run those tests in a few seconds.

I started that project in order to experiment with code quickly and to deal with intermittent Internet connection, such as in the train or in remote part of Canada. I found out that this environment was more efficient than using remote servers for learning purpose. It helps me to learn and refine concepts quickly.

Requirements

In order to use that project you need to have the following tools installed on your host:

Tips for beginners

If you are learning this stack of technology from scratch, or you don’t know where to start, I suggest starting with the Vagrant documentation. Walking through a couple of tutorial is beneficial. From there you can start learning about VirtualBox or Ruby.

Building the environment

Building the virtual machines and the environment is really simple:

host$ git clone https://github.com/StephenBergeron/RubySoup.git
host$ cd RubySoup
host$ vagrant up

If the base box is not present that command fetches it first. The setup itself takes less than 5 minutes on my Dell Latitude E6420 with a WiFi connection. After the installation has finished, you can access the master virtual machine with

host$ vagrant ssh master

Post-Install and Validation

From the master node, go to the default Vagrant shared folder (/vagrant) and execute the validate.sh script. That will enable the public and private key authentication from the master machine to the slave machine. Answer the questions and remember that the vagrant user uses the vagrant password. The final step will run a series of unit test. The Ruby code is located in /vagrant/ruby.

Suggested Usage

From the master, you use the slave as the remote machine for SSH execution. I recommend using that environment accordingly to the normal Vagrant workflow:

  • Use your favorite editor with personal customization in the host computer.
  • Test within the master virtual machine.

Going from here and TODOs

Experiment with NFS synced folders and measure performances http://docs.vagrantup.com/v2/synced-folders/nfs.html

rubysoup's People

Contributors

stephenbergeron avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.