From f25842f142faa88d7482b31bf89416a7f3a66724 Mon Sep 17 00:00:00 2001 From: Chip Childers Date: Thu, 2 Aug 2012 15:17:10 -0400 Subject: [PATCH] Devcloud setup scripts - work in progress --- tools/devcloud/README | 34 ++++++++++++++++--- tools/devcloud/build_vagrant_basebox.sh | 43 +++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 tools/devcloud/build_vagrant_basebox.sh diff --git a/tools/devcloud/README b/tools/devcloud/README index 49fc0866887..ef2bcc00574 100644 --- a/tools/devcloud/README +++ b/tools/devcloud/README @@ -1,6 +1,30 @@ -This folder contains various scripts used to build the devcloud image. +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you 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 -Folders: -puppet - puppet conf files and module directories for the various build phases -vagrant - basic vagrant configuration for a devcloud box (and a puppet manifest to help configure the system to be a valid vagrant box) -ubuntu_install - ubuntu installation / initial configuration + 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. + +=========================================================== + +NOTE - This folder is a work in progress. The project has not determined +how to best establish a nightly DevCloud build process, or how to distribute +the image. + +This folder contains various scripts used to build the devcloud image. +devcloudsetup.sh - the origional devcloud build script (assumes an Ubuntu 12.04 VM image) + +build_vagrant_basebox.sh - a script that uses VirtualBox, VeeWee, Vagrant (patched) and puppet to create a devcloud basebox +veewee - configuration files used to build a basic Ubuntu 12.04 vagrant box via VeeWee +basebuild - The Vagrantfile and puppet module that gets applied to the basic Ubuntu 12.04 box +devcloudbox - The Vagrantfile and puppet module that is used with the [hopefully] distributed devcloud base box diff --git a/tools/devcloud/build_vagrant_basebox.sh b/tools/devcloud/build_vagrant_basebox.sh new file mode 100644 index 00000000000..8bdb81a1c18 --- /dev/null +++ b/tools/devcloud/build_vagrant_basebox.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. + +# Assumes that rvm is installed and you have ruby 1.9.2 installed +# Assumes that you have virtual box installed + +mkdir ~/builddevcloud +cd ~/builddevcloud +git clone https://github.com/jedi4ever/veewee.git +#TODO: We need to get this patched version of Vagrant to the upstream project +# or implement the desired changes to Vagrant as plugin modules and +# host it within the ASF git repo +git clone https://github.com/chipchilders/vagrant.git +export rvm_trust_rvmrcs_flag=1 +cd veewee +bundle install +rake install +vagrant basebox define 'devcloudbase' 'ubuntu-12.04-server-i386' +wget --no-check-certificate -O ./definitions/devcloudbase/definition.rb https://git-wip-us.apache.org/repos/asf\?p\=incubator-cloudstack.git\;a\=blob_plain\;f\=tools/devcloud/veewee/definition.rb\;hb\=HEAD +wget --no-check-certificate -O ./definitions/devcloudbase/postinstall.sh https://git-wip-us.apache.org/repos/asf\?p\=incubator-cloudstack.git\;a\=blob_plain\;f\=tools/devcloud/veewee/postinstall.sh\;hb\=HEAD +wget --no-check-certificate -O ./definitions/devcloudbase/preseed.cfg https://git-wip-us.apache.org/repos/asf\?p\=incubator-cloudstack.git\;a\=blob_plain\;f\=tools/devcloud/veewee/preseed.cfg\;hb\=HEAD +vagrant basebox build 'devcloudbase' -f -a -n +# possibly use -r here too ^ +vagrant basebox export 'devcloudbase' -f +vagrant basebox destroy 'devcloudbase' -f +vagrant box add 'devcloud' 'devcloudbase.box' -f +rm -f devcloudbase.box +