Skip to content

Commit 1bad242

Browse files
committed
Adding management server startup to puppet config.
1 parent 3610401 commit 1bad242

3 files changed

Lines changed: 46 additions & 7 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32
21+
cd /opt/cloudstack/incubator-cloudstack/
22+
nohup ant run > /dev/null 2>&1 &
23+
exit 0

tools/devcloud/devcloudbox/puppet-devcloud/manifests/init.pp

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -283,22 +283,38 @@
283283
cwd => '/',
284284
}
285285

286+
package { 'mkisofs':
287+
ensure => latest,
288+
}
289+
286290
exec { "build_cloudstack":
287291
require => [
288292
Package['ant'],
289293
Exec["catalina_home"],
290294
File['/opt/cloudstack/incubator-cloudstack/dist'],
291-
File['/opt/cloudstack/incubator-cloudstack/target']
295+
File['/opt/cloudstack/incubator-cloudstack/target'],
296+
Package['mkisofs']
292297
],
293298
command => "/usr/bin/ant clean-all build-all deploy-server deploydb",
294299
cwd => "/opt/cloudstack/incubator-cloudstack/",
295300
timeout => '0',
296301
}
297302

298-
# exec { "start_cloudstack":
299-
# require => Exec["build_cloudstack"],
300-
# command => "/usr/bin/ant debug",
301-
# cwd => "/opt/cloudstack/incubator-cloudstack",
302-
# }
303+
file { '/opt/cloudstack/startdevcloud.sh':
304+
ensure => 'file',
305+
source => 'puppet:///modules/puppet-devcloud/startdevcloud.sh',
306+
mode => '777',
307+
owner => '0',
308+
group => '0',
309+
}
310+
311+
exec { "start_cloudstack":
312+
require => [
313+
Exec["build_cloudstack"],
314+
File["/opt/cloudstack/startdevcloud.sh"]
315+
],
316+
command => "/opt/cloudstack/startdevcloud.sh",
317+
cwd => "/opt/cloudstack/",
318+
}
303319

304320
}

tools/devcloud/devcloudsetup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ postsetup() {
121121
mkdir incubator-cloudstack/dist
122122
wget http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.zip -P /opt/cloudstack/
123123
unzip apache-tomcat-6.0.32.zip
124-
echo "exportCATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32" >> /root/.bashrc
124+
echo "export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32" >> /root/.bashrc
125125
cd ~
126126
fi
127127

0 commit comments

Comments
 (0)