Permalink
Browse files

switch to using submodules

  • Loading branch information...
1 parent d69efe3 commit 65b74dda35091930a7f70f6213c573c7e3f7073b @vishvananda vishvananda committed Mar 26, 2012
View
3 .gitignore
@@ -1,5 +1,4 @@
etc/vagrant.yaml
etc/localrc
.vagrant
-cache
-openstack-cookbooks
+cache/*
View
6 .gitmodules
@@ -0,0 +1,6 @@
+[submodule "cookbooks/devstack"]
+ path = cookbooks/devstack
+ url = git://github.com/osops/devstack.git
+[submodule "cookbooks/vagrant-openstack"]
+ path = cookbooks/vagrant-openstack
+ url = git://github.com/osops/vagrant-openstack.git
View
19 README.md
@@ -17,24 +17,15 @@ Now would be a good time to actually check out the project :
git clone http://github.com/bcwaldon/vagrant_devstack.git
-The project also requires a local copy of the `devstack_cookbooks` project. The suggested location for those is directly inside the vagrant\_devstack directory :
+The project has submodules for other recipes:
- cd vagrant_devstack
- git clone http://github.com/bcwaldon/devstack_cookbooks.git
+ git submodule init
+ git submodule update
-### Step 3: Set up a Box
-This project depends on having an Ubuntu 11.10 image (aka 'box') available in VirtualBox with the Guest Additions already installed. Run the following command to download a safe base box and make it availble under the name 'oneiric' :
-
- vagrant box add oneiric http://images.ansolabs.com/vagrant/oneiric64.box
-
-### Step 4: Configuration
+### Step 3: Configuration
You can set up a local yaml-formatted config file to override the default settings used with the project. Place your config file at `etc/vagrant.yaml` or set a custom location in the environment variable `VD_CONF`. See a sample config at `etc/vagrant.yaml.sample`.
-If you decide to place the cookbooks you checked out in step 2 in a non-default location, you must configure the `devstack_cookbooks_dir` attribute to point to the proper directory.
-
-Additionally, if the box you wish to use has a different name than 'oneiric', make sure you set the `box_name` attribute in your config file.
-
DevStack itself allows you to define a `localrc` file. This file is injected into your environment and sourced before the environment is built. You can use this to override settings such as `MYSQL_PASSWORD` or `NOVA_REPO`. See http://devstack.org for more information. If you decide to create your own localrc file, place it at `etc/localrc` file or set the `VD_LOCALRC` environment variable to its location.
-### Step 5: Execution
+### Step 4: Execution
At this point you can run `vagrant up` and ssh into your DevStack environment!
View
3 Vagrantfile
@@ -6,7 +6,6 @@ conf = {
'box_name' => 'precise',
'box_url' => 'http://c479942.r42.cf2.rackcdn.com/precise64.box',
'allocate_memory' => 1024,
- 'devstack_cookbooks_dir' => 'devstack_cookbooks/',
'cache_dir' => 'cache/',
'ssh_dir' => '~/.ssh/',
}
@@ -55,7 +54,7 @@ Vagrant::Config.run do |config|
cookbooks_dir = conf['devstack_cookbooks_dir']
config.vm.provision :chef_solo do |chef|
- chef.cookbooks_path = ["#{cookbooks_dir}/cookbooks", "cookbooks"]
+ chef.cookbooks_path = ["cookbooks"]
chef.log_level = :debug
chef.run_list = [
"recipe[vagrant-openstack::cache]",
View
0 cookbooks/vagrant-openstack/README.rdoc → cache/.gitignore
File renamed without changes.
1 cookbooks/devstack
@@ -0,0 +1 @@
+Subproject commit 968aa28c3afa6bdbcd79f86438cc12a7f072aec1
1 cookbooks/vagrant-openstack
@@ -0,0 +1 @@
+Subproject commit d1baa8d5cf9478438a37dfb68dbd921b0d4d6ecd
View
3 cookbooks/vagrant-openstack/attributes/default.rb
@@ -1,3 +0,0 @@
-default[:user] = "vagrant"
-default[:cache][:dir] = "/home/vagrant/cache"
-default[:dotfiles][:repository] = "https://github.com/vishvananda/.dotfiles.git -b linux"
View
32 cookbooks/vagrant-openstack/metadata.json
@@ -1,32 +0,0 @@
-{
- "recipes": {
- },
- "suggestions": {
- },
- "platforms": {
- },
- "long_description": "= DESCRIPTION:\n\n= REQUIREMENTS:\n\n= ATTRIBUTES: \n\n= USAGE:\n\n",
- "conflicting": {
- },
- "description": "Anso openstack helper scripts",
- "providing": {
- },
- "dependencies": {
- "apt": [
-
- ]
- },
- "maintainer": "Anso Labs",
- "version": "0.1.0",
- "attributes": {
- },
- "replacing": {
- },
- "maintainer_email": "support@ansolabs.com",
- "groupings": {
- },
- "name": "anso",
- "recommendations": {
- },
- "license": "Apache 2.0"
-}
View
8 cookbooks/vagrant-openstack/metadata.rb
@@ -1,8 +0,0 @@
-maintainer "Anso Labs"
-maintainer_email "support@ansolabs.com"
-license "Apache 2.0"
-description "Anso openstack helper scripts"
-long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
-version "0.1"
-
-depends "apt"
View
36 cookbooks/vagrant-openstack/recipes/cache.rb
@@ -1,36 +0,0 @@
-#
-# Cookbook Name:: vagrant-openstack
-# Recipe:: cache
-#
-# Copyright (c) 2012, OpenStack, LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-include_recipe "apt"
-
-d = node['cache']['dir']
-u = node['user']
-
-execute "rm -rf /var/cache/apt; mkdir -p #{d}/aptcache; ln -s #{d}/aptcache /var/cache/apt"
-
-execute "mkdir -p #{d}/pipcache; ln -s #{d}/pipcache /var/cache/pip" do
- not_if { File.directory?("/var/cache/pip") }
-end
-
-execute "ln -s /home/#{u}/.host-ssh/id_rsa /home/#{u}/.ssh/id_rsa" do
- user u
- group u
- not_if { File.exists?("/home/#{u}/.ssh/id_rsa") }
-end
-
View
27 cookbooks/vagrant-openstack/recipes/devstack-cache.rb
@@ -1,27 +0,0 @@
-#
-# Cookbook Name:: vagrant-openstack
-# Recipe:: devstack-cache
-#
-# Copyright (c) 2012, OpenStack, LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-include_recipe "apt"
-
-package 'rsync'
-
-d = node['cache']['dir']
-u = node['user']
-
-execute "mkdir -p #{d}/stack; rsync -vur --delete --exclude=stack/nova-volumes-backing-file --exclude=stack/glance/images/* #{d}/stack /opt; chown -R #{u} /opt/stack"
View
26 cookbooks/vagrant-openstack/recipes/devstack-update-cache.rb
@@ -1,26 +0,0 @@
-#
-# Cookbook Name:: vagrant-openstack
-# Recipe:: devstack-update-cache
-#
-# Copyright (c) 2012, OpenStack, LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-include_recipe "apt"
-
-package 'rsync'
-
-d = node['cache']['dir']
-
-execute "rsync -vur --delete --exclude=stack/nova-volumes-backing-file --exclude=stack/glance/images/* /opt/stack #{d}"
View
40 cookbooks/vagrant-openstack/recipes/dotfiles.rb
@@ -1,40 +0,0 @@
-#
-# Cookbook Name:: vagrant_devstack
-# Recipe:: dotfiles
-#
-# Copyright 2011, Anso Labs
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-include_recipe "apt"
-
-package "bzr"
-package "git"
-package "vim-gtk"
-package "screen"
-package "tmux"
-package "exuberant-ctags"
-
-u = node['user']
-execute "git clone #{node['dotfiles']['repository']} /home/#{u}/.dotfiles/" do
- user u
- group u
- not_if { File.exists?("/home/#{u}/.dotfiles/") }
-end
-
-execute "cd /home/#{u} && .dotfiles/link.sh || true" do
- user u
- group u
- not_if { File.exists?("/home/#{u}/.bashrc") }
-end
View
3 etc/vagrant.yaml.sample
@@ -1,10 +1,9 @@
-box_name: oneiric
+box_name: precise
allocate_memory: 1024
ip_prefix: 192.168.27
mac_prefix: 080027027
# These paths are all relative to the Vagrantfile
-devstack_cookbooks_dir: devstack_cookbooks/
cache_dir: cache/
ssh_dir: ~/.ssh/

0 comments on commit 65b74dd

Please sign in to comment.