forked from dtzinov/ggrc-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup for the new project. Add a Cheffile for use with librarian-chef,
add Vagrantfile, fill in the README a bit, add needed cookbook to get started and have GAE SDK installed in the development vm.
- Loading branch information
Showing
7 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.*.swp | ||
cookbooks | ||
.vagrant | ||
Cheffile.lock | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
cookbook "apt", | ||
:git => "https://github.com/cookbooks/apt.git", | ||
:ref => "1.3.2" | ||
|
||
cookbook "build-essential", | ||
:git => "https://github.com/opscode-cookbooks/build-essential.git", | ||
:ref => "1.3.4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
**** | ||
GGRC | ||
**** | ||
|
||
Requirements | ||
============ | ||
|
||
* VirtualBox | ||
* Vagrant | ||
* librarian (ruby gem) | ||
|
||
Getting Started | ||
=============== | ||
|
||
* clone the repo | ||
* cwd to the project directory | ||
* run the following: | ||
|
||
.. sourcecode:: bash | ||
librarian-chef install | ||
vagrant up | ||
vagrant ssh | ||
cd /vagrant | ||
ls | ||
|
||
Now you're in and your in the project directory in the VM. Get to work! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure("2") do |config| | ||
config.vm.box = "ggrc" | ||
|
||
# Fetched the box if it doesn't already exist. | ||
config.vm.box_url = "http://files.vagrantup.com/lucid64.box" | ||
|
||
# Create a private network, which allows host-only access to the machine | ||
# using a specific IP. | ||
config.vm.network :private_network, ip: "192.168.33.10" | ||
|
||
# Provider-specific configuration so you can fine-tune various | ||
# backing providers for Vagrant. These expose provider-specific options. | ||
# Example for VirtualBox: | ||
# | ||
# config.vm.provider :virtualbox do |vb| | ||
# # Don't boot with headless mode | ||
# vb.gui = true | ||
# | ||
# # Use VBoxManage to customize the VM. For example to change memory: | ||
# vb.customize ["modifyvm", :id, "--memory", "1024"] | ||
# end | ||
# | ||
# View the documentation for the provider you're using for more | ||
# information on available options. | ||
|
||
# Enable provisioning with chef solo, specifying a cookbooks path, roles | ||
# path, and data_bags path (all relative to this Vagrantfile), and adding | ||
# some recipes and/or roles. | ||
# | ||
config.vm.provision :chef_solo do |chef| | ||
chef.cookbooks_path = ["cookbooks","site-cookbooks"] | ||
chef.add_recipe "ggrc" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
default[:ggrc] = { | ||
:app_engine_version => "1.7.6" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
maintainer "Reciprocity, Inc" | ||
maintainer_email "david@reciprocitylabs.com" | ||
license "Apache 2.0" | ||
description "Installs requirements for GGRC" | ||
version "0.1" | ||
long_description "Installs requirements for GGRC. Rails, etc.." | ||
depends "apt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
include_recipe "apt" | ||
|
||
package "unzip" do | ||
action :install | ||
end | ||
|
||
version = node[:ggrc][:app_engine_version] | ||
zipfile = "google_appengine_#{version}.zip" | ||
|
||
unless File.exists?("/opt/#{zipfile}") | ||
remote_file "/opt/#{zipfile}" do | ||
source "http://googleappengine.googlecode.com/files/#{zipfile}" | ||
action :create | ||
end | ||
|
||
execute "Unzip Google App Engine SDK" do | ||
command "unzip /opt/#{zipfile}" | ||
cwd "/opt" | ||
action :run | ||
end | ||
|
||
execute "Add Google App Engine SDK to the PATH" do | ||
command "sed -i -e 's/PATH=\"/PATH=\"\\/opt\\/google_appengine:/' /etc/environment" | ||
action :run | ||
end | ||
end | ||
|