Successfully building devcloud now. Added option in params.pp for compiling cloudstack or not. moved ebtables stuff to devcloudinitial update build scripts in builddevcloud.sh.erb

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
James Martin 2012-12-07 01:26:14 -05:00 committed by Rohit Yadav
parent 7340433e51
commit a990f7abe4
6 changed files with 30 additions and 28 deletions

View File

@ -19,7 +19,7 @@
# under the License. # under the License.
Vagrant::Config.run do |config| Vagrant::Config.run do |config|
config.vm.network :hostonly, "192.168.56.10" config.vm.network :hostonly, "192.168.56.10", :auto_config => false
#config.vm.box = "devcloud" #config.vm.box = "devcloud"
config.vm.box = "devcloudbase-xen" config.vm.box = "devcloudbase-xen"
#config.vm.box_url = "http://basho-cloudstack.s3.amazonaws.com/devcloud.box" #config.vm.box_url = "http://basho-cloudstack.s3.amazonaws.com/devcloud.box"

0
tools/devcloud/boxit.sh Normal file → Executable file
View File

View File

@ -34,6 +34,8 @@ else {
ensure => latest; ensure => latest;
"iptables": "iptables":
ensure => latest; ensure => latest;
"ebtables":
ensure => latest;
} }
file { file {

View File

@ -33,8 +33,8 @@ class devcloud (
$md5sum_local = $devcloud::params::md5sum_local, $md5sum_local = $devcloud::params::md5sum_local,
$md5sum_remote = $devcloud::params::md5sum_remote, $md5sum_remote = $devcloud::params::md5sum_remote,
$hostuuid = $::xen_hostuuid, $hostuuid = $::xen_hostuuid,
$bridge_device_mac = $::macaddress_xenbr0 $bridge_device_mac = $::macaddress_xenbr0,
$build_cloudstack = $devcloud::params::build_cloudstack
) inherits devcloud::params { ) inherits devcloud::params {
@ -43,7 +43,6 @@ class devcloud (
service { service {
'ebtables': 'ebtables':
require => Package['ebtables'],
ensure => 'running', ensure => 'running',
enable => true; enable => true;
'nfs-kernel-server': 'nfs-kernel-server':
@ -55,8 +54,6 @@ class devcloud (
package { [ package { [
"ant", "ant",
"ebtables",
"iptables",
"git", "git",
"mkisofs", "mkisofs",
"mysql-server", "mysql-server",
@ -102,7 +99,6 @@ class devcloud (
unless => '/usr/bin/xe sr-list | /bin/egrep \'local-storage|Cloud Stack Local EXT Storage Pool\'', unless => '/usr/bin/xe sr-list | /bin/egrep \'local-storage|Cloud Stack Local EXT Storage Pool\'',
require => [ require => [
File["${storage_dir}/primary"], File["${storage_dir}/primary"],
File["/etc/iptables.save"]
]; ];
"configvnc": "configvnc":
@ -131,19 +127,6 @@ class devcloud (
require => Exec['unziptomcat'], require => Exec['unziptomcat'],
timeout => '0'; timeout => '0';
"build_cloudstack":
require => [
Package["ant"],
Exec["install_maven"],
File["${cs_dir}/incubator-cloudstack/dist"],
File["${cs_dir}/incubator-cloudstack/target"],
Package['mkisofs'],
File["${cs_dir}/buildcloudstack.sh"]
],
command => "/opt/cloudstack/buildcloudstack.sh",
cwd => "/opt/cloudstack/",
timeout => '0';
"install_maven": "install_maven":
require => Exec["downloadmaven"], require => Exec["downloadmaven"],
@ -165,14 +148,30 @@ class devcloud (
require => [ require => [
Service['ebtables'] Service['ebtables']
], ],
command => "/sbin/ebtables -I FORWARD -d ! $bridge_device_mac -i eth0 -p IPV4 --ip-prot udp --ip-dport 67:68 -j DROP", command => "/sbin/ebtables -I FORWARD -d ! $bridge_device_mac -i eth1 -p IPV4 --ip-prot udp --ip-dport 67:68 -j DROP",
subscribe => Package["ebtables"], unless => "/sbin/ebtables -L | grep \"-I FORWARD -d ! $bridge_device_mac -i eth1 -p IPV4 --ip-prot udp --ip-dport 67:68 -j DROP\"",
unless => "/sbin/ebtables -L | grep \"-I FORWARD -d ! $bridge_device_mac -i eth0 -p IPV4 --ip-prot udp --ip-dport 67:68 -j DROP\"",
refreshonly => true, refreshonly => true,
cwd => "/", cwd => "/",
path => "/sbin/:/usr/bin/:/bin" path => "/sbin/:/usr/bin/:/bin"
} }
if $build_cloudstack {
exec {
"build_cloudstack":
require => [
Package["ant"],
Exec["install_maven"],
File["${cs_dir}/incubator-cloudstack/dist"],
File["${cs_dir}/incubator-cloudstack/target"],
Package['mkisofs'],
File["${cs_dir}/buildcloudstack.sh"]],
command => "${cs_dir}/buildcloudstack.sh",
cwd => "${cs_dir}",
timeout => '0';
}
}
file { file {

View File

@ -27,7 +27,7 @@ class devcloud::params {
$md5sum_local = "${storage_dir}/secondary/template/tmpl/1/md5sum.txt" $md5sum_local = "${storage_dir}/secondary/template/tmpl/1/md5sum.txt"
$template_dir = "${storage_dir}/secondary/template/tmpl/1" $template_dir = "${storage_dir}/secondary/template/tmpl/1"
$gitrepo = "https://github.com/apache/incubator-cloudstack.git" $gitrepo = "https://github.com/apache/incubator-cloudstack.git"
$build_cloudstack = true
$downloads = [ $downloads = [

View File

@ -20,9 +20,10 @@
export CATALINA_HOME=<%= @tomcat_home %> export CATALINA_HOME=<%= @tomcat_home %>
export M2_HOME=<%= @maven_home %> export M2_HOME=<%= @maven_home %>
export M2=$M2_HOME/bin export M2=$M2_HOME/bin
MAVEN_OPTS="-Xms256m -Xmx512m" MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=800m -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
PATH=$M2:$PATH PATH=$M2:$PATH
cd <%= @cs_dir %>/incubator-cloudstack/ cd <%= @cs_dir %>/incubator-cloudstack/
<%= @maven_home %>/bin/mvn -P developer clean install <%= @maven_home %>/bin/mvn clean install -P developer,systemvm
<%= @maven_home %>/bin/mvn -P developer -pl developer,tools/devcloud -Ddeploydb <%= @maven_home %>/bin/mvn -pl developer,tools/devcloud -Ddeploydb -P developer
<%= @maven_home %>/bin/mvn -P developer -pl tools/devcloud -Ddeploysvr <%= @maven_home %>/bin/mvn -P developer -pl tools/devcloud -Ddeploysvr
<%= @maven_home %>/bin/mvn -pl client jetty:run