This repository contains the Vagrant configurations to quickly spin up a development server for the oneview-sdk-ruby repository found at oneview-sdk-ruby. It's really just a pretty bare-bones CentOS 6.7 box with Git installed and RVM with Ruby 2.2.0
- VirtualBox
- Vagrant and Vagrant plugins:
- vagrant-omnibus
- vagrant-proxyconf
- vagrant-share
- vagrant-vbguest
- NOTE: Run
$ vagrant plugin install PLUGIN_NAME
to install Vagrant plugins.
- ChefDK
- A ssh-agent running with any keys you want to use on this box added. See this article for more on this.
- Clone this repo and then cd into the directory it creates.
- Edit the Vagrantfile and change anything specific to your system that might not mesh, including the config.vm.network bridge adapter name.
- Note: To list your available Intel Ethernet network adapters, run
$ ipconfig /all | findstr /c:"Intel(R)\ Ethernet"
in a Windows Command Prompt.
- Run
$ vagrant status
to show the VM status and install any necessary plugins. - Run
$ vagrant up
to build the VM - Run
$ vagrant ssh
to login to the system
Although Vagrant and Chef are great for setting things up, there's still some user-specific configuration that you'll need to do to the VM after you've created it:
- Change the passwords for users 'vagrant' and 'root'. You should be prompted upon login to do this for both users, so simply log in to each user. The default password for both users is
vagrant
. - Make sure your ssh forwarding agent is working: run
$ ssh-add -L
and verify that these are the same keys that your host is using.
- Note: You'll also need to add this key to your GitHub account if you haven't already. See this article for a guide.
- Configure git and clone the oneview-sdk-ruby repository:
$ cd /home/vagrant
$ git config --global user.name "John Doe"
(replace with your name)$ git config --global user.email "[email protected]"
(replace with your email)$ git clone [email protected]:HewlettPackard/oneview-sdk-ruby.git
This Vagrant box is configured to serve the coverage report (expected to be in /home/vagrant/oneview-sdk-ruby/coverage
) to port 80 of the guest machine. To make this easier to access, it also uses port forwarding so you can access it from your guest by going to localhost:8080.
Note that this report gets generated by running $ rake test
or $ rake spec
; if you havent' done that yet, you won't see the report.
- Vagrant::Errors::SSHInvalidShell: The configured shell (config.ssh.shell) is invalid and unable...
- The system is waiting on password resets for the vagrant and/or root users. Log in with
$ vagrant ssh
and then$ su root
. Follow any password reset prompts.
- The system is waiting on password resets for the vagrant and/or root users. Log in with
- Cookbook not found
-
Update the vagrant-berkshelf plugin by running:
$ vagrant plugin uninstall vagrant-berkshelf $ vagrant plugin install vagrant-berkshelf`
-