Giter VIP home page Giter VIP logo

gitlab-vagrant-vm's Introduction

Gitlab-Vagrant-VM

Description

Setup a dev environment for Gitlab.

The final product contain all databases set up, working tests and all gems installed.

Requirements

  • VirtualBox
  • Vagrant
  • the NFS packages. Already there if you are using Mac OS, and not necessary if you are using Windows.
  • some patience :)

Installation

Clone the repository:

$ git clone https://github.com/gitlabhq/gitlab-vagrant-vm
$ cd gitlab-vagrant-vm

And install gems and chef's necessary packages:

$ bundle install
$ bundle exec librarian-chef install

Finally, you should be able to use:

$ vagrant up

You'll be asked for your password to set up NFS shares.

Once everything is done you can log into the virtual machine to run tests:

$ vagrant ssh
$ cd /vagrant/gitlabhq/
$ bundle exec rake gitlab:test

You should also configure your own remote since by default it's going to grab gitlab's master branch.

$ git remote add mine git://github.com/me/gitlabhq.git
$ # or if you prefer set up your origin as your own repository
$ git remote set-url origin git://github.com/me/gitlabhq.git

Virtual Machine Management

When done just log out with ^D and suspend the virtual machine

$ vagrant suspend

then, resume to hack again

$ vagrant resume

Run

$ vagrant halt

to shutdown the virtual machine, and

$ vagrant up

to boot it again.

You can find out the state of a virtual machine anytime by invoking

$ vagrant status

Finally, to completely wipe the virtual machine from the disk destroying all its contents:

$ vagrant destroy # DANGER: all is gone

Information

  • Virtual Machine IP: 192.168.3.14
  • User/password: vagrant/vagrant
  • MySQL user/password: vagrant/Vagrant
  • MySQL root password: nonrandompasswordsaregreattoo
  • Xvfb is used as a service and it should be already running, but in case you need to restart it manually:
$ sudo /etc/init.d/xvfb stop
$ sudo /etc/init.d/xvfb start

Troubleshooting

Error executing action install on resource 'rvm_global_gem[bundler]' in chef when booting VM

Stacktrace of this failure can be found in this gist . This is caused by an error in rvm which causes chef-rvm cookbook to fail. This problem should be fixed with rvm version 1.16.18. Temporary solution for this is provided in this commit. In cookbooks/rvm/libraries/chef_rvm_ruby_helpers.rb change the line 41 to

@installed_rubies = @rvm_env.list_strings.reject {|e| e == 'nil'}

and run vagrant up again to complete the installation.

gitlab-vagrant-vm's People

Contributors

saitowu avatar kouno avatar dzaporozhets avatar dosire avatar jirutka avatar maxlazio avatar justahero avatar vsizov avatar

Watchers

James Cloos avatar Fabián Sellés Rosa 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.