diff --git a/tools/devcloud/devcloudbox/puppet-devcloud/files/startdevcloud.sh b/tools/devcloud/devcloudbox/puppet-devcloud/files/startdevcloud.sh new file mode 100644 index 00000000000..f496891d40f --- /dev/null +++ b/tools/devcloud/devcloudbox/puppet-devcloud/files/startdevcloud.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# 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. + +export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32 +cd /opt/cloudstack/incubator-cloudstack/ +nohup ant run > /dev/null 2>&1 & +exit 0 diff --git a/tools/devcloud/devcloudbox/puppet-devcloud/manifests/init.pp b/tools/devcloud/devcloudbox/puppet-devcloud/manifests/init.pp index 96f931db68e..b84ec265ddf 100644 --- a/tools/devcloud/devcloudbox/puppet-devcloud/manifests/init.pp +++ b/tools/devcloud/devcloudbox/puppet-devcloud/manifests/init.pp @@ -283,22 +283,38 @@ class puppet-devcloud { cwd => '/', } + package { 'mkisofs': + ensure => latest, + } + exec { "build_cloudstack": require => [ Package['ant'], Exec["catalina_home"], File['/opt/cloudstack/incubator-cloudstack/dist'], - File['/opt/cloudstack/incubator-cloudstack/target'] + File['/opt/cloudstack/incubator-cloudstack/target'], + Package['mkisofs'] ], command => "/usr/bin/ant clean-all build-all deploy-server deploydb", cwd => "/opt/cloudstack/incubator-cloudstack/", timeout => '0', } -# exec { "start_cloudstack": -# require => Exec["build_cloudstack"], -# command => "/usr/bin/ant debug", -# cwd => "/opt/cloudstack/incubator-cloudstack", -# } + file { '/opt/cloudstack/startdevcloud.sh': + ensure => 'file', + source => 'puppet:///modules/puppet-devcloud/startdevcloud.sh', + mode => '777', + owner => '0', + group => '0', + } + + exec { "start_cloudstack": + require => [ + Exec["build_cloudstack"], + File["/opt/cloudstack/startdevcloud.sh"] + ], + command => "/opt/cloudstack/startdevcloud.sh", + cwd => "/opt/cloudstack/", + } } diff --git a/tools/devcloud/devcloudsetup.sh b/tools/devcloud/devcloudsetup.sh index b5a97cb091a..f8b69faa92e 100644 --- a/tools/devcloud/devcloudsetup.sh +++ b/tools/devcloud/devcloudsetup.sh @@ -121,7 +121,7 @@ postsetup() { mkdir incubator-cloudstack/dist wget http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.zip -P /opt/cloudstack/ unzip apache-tomcat-6.0.32.zip - echo "exportCATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32" >> /root/.bashrc + echo "export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32" >> /root/.bashrc cd ~ fi