mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-1415: Debian & Ubuntu packaging work
Some concepts included: * the replace.properties location used by maven is parameterized to allow for a build that does not modify the currently git tracked files * package naming is updated along the lines of what was discussed on the -dev mailing list and between committers at the Build a Cloud Day in Belgi * package version pattern is updated (since we redo all package names, we might as well drop the epoch)
This commit is contained in:
parent
23e232f5fa
commit
2f135be15f
|
|
@ -83,7 +83,7 @@
|
|||
<filterreader
|
||||
classname="org.apache.tools.ant.filters.ReplaceTokens">
|
||||
<param type="propertiesfile"
|
||||
value="${basedir}/../build/replace.properties" />
|
||||
value="${cs.replace.properties}" />
|
||||
</filterreader>
|
||||
</filterchain>
|
||||
</copy>
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
<filterreader
|
||||
classname="org.apache.tools.ant.filters.ReplaceTokens">
|
||||
<param type="propertiesfile"
|
||||
value="${basedir}/../build/replace.properties" />
|
||||
value="${cs.replace.properties}" />
|
||||
</filterreader>
|
||||
</filterchain>
|
||||
</copy>
|
||||
|
|
@ -106,6 +106,24 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/dependencies</outputDirectory>
|
||||
<includeScope>runtime</includeScope>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@
|
|||
<filterreader
|
||||
classname="org.apache.tools.ant.filters.ReplaceTokens">
|
||||
<param type="propertiesfile"
|
||||
value="${basedir}/../build/replace.properties" />
|
||||
value="${cs.replace.properties}" />
|
||||
</filterreader>
|
||||
</filterchain>
|
||||
</copy>
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@
|
|||
<filterreader
|
||||
classname="org.apache.tools.ant.filters.ReplaceTokens">
|
||||
<param type="propertiesfile"
|
||||
value="${basedir}/../build/replace.properties" />
|
||||
value="${cs.replace.properties}" />
|
||||
</filterreader>
|
||||
</filterchain>
|
||||
</copy>
|
||||
|
|
@ -319,7 +319,7 @@
|
|||
<globmapper from="*.in" to="*" />
|
||||
<filterchain>
|
||||
<filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
|
||||
<param type="propertiesfile" value="${basedir}/../build/replace.properties" />
|
||||
<param type="propertiesfile" value="${cs.replace.properties}" />
|
||||
</filterreader>
|
||||
</filterchain>
|
||||
</copy>
|
||||
|
|
@ -330,7 +330,7 @@
|
|||
<globmapper from="*.in" to="*" />
|
||||
<filterchain>
|
||||
<filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
|
||||
<param type="propertiesfile" value="${basedir}/../build/replace.properties" />
|
||||
<param type="propertiesfile" value="${cs.replace.properties}" />
|
||||
</filterreader>
|
||||
</filterchain>
|
||||
</copy>
|
||||
|
|
@ -341,7 +341,7 @@
|
|||
<globmapper from="*.in" to="*" />
|
||||
<filterchain>
|
||||
<filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
|
||||
<param type="propertiesfile" value="${basedir}/../build/replace.properties" />
|
||||
<param type="propertiesfile" value="${cs.replace.properties}" />
|
||||
</filterreader>
|
||||
</filterchain>
|
||||
</copy>
|
||||
|
|
@ -351,10 +351,26 @@
|
|||
</fileset>
|
||||
<filterchain>
|
||||
<filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
|
||||
<param type="propertiesfile" value="${basedir}/../build/replace.properties" />
|
||||
<param type="propertiesfile" value="${cs.replace.properties}" />
|
||||
</filterreader>
|
||||
</filterchain>
|
||||
</copy>
|
||||
<copy overwrite="true" todir="${basedir}/target/conf">
|
||||
<fileset dir="${basedir}/tomcatconf">
|
||||
<include name="*.in" />
|
||||
</fileset>
|
||||
<globmapper from="*.in" to="*" />
|
||||
<filterchain>
|
||||
<filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
|
||||
<param type="propertiesfile" value="${cs.replace.properties}" />
|
||||
</filterreader>
|
||||
</filterchain>
|
||||
</copy>
|
||||
<copy overwrite="true" todir="${basedir}/target/conf">
|
||||
<fileset dir="${basedir}/tomcatconf">
|
||||
<exclude name="*.in" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
|
|
|||
|
|
@ -16,23 +16,11 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
SYSTEMJARS="@SYSTEMJARS@"
|
||||
SCP=$(build-classpath $SYSTEMJARS 2>/dev/null) ; if [ $? != 0 ] ; then export SCP="@SYSTEMCLASSPATH@" ; fi
|
||||
MCP="@MSCLASSPATH@"
|
||||
DCP="@DEPSCLASSPATH@"
|
||||
CLASSPATH=$SCP:$DCP:$MCP:@MSCONF@:@SETUPDATADIR@
|
||||
for jarfile in "@PREMIUMJAVADIR@"/* ; do
|
||||
if [ ! -e "$jarfile" ] ; then continue ; fi
|
||||
CLASSPATH=$jarfile:$CLASSPATH
|
||||
done
|
||||
for plugin in "@PLUGINJAVADIR@"/* ; do
|
||||
if [ ! -e "$plugin" ] ; then continue ; fi
|
||||
CLASSPATH=$plugin:$CLASSPATH
|
||||
done
|
||||
for vendorconf in "@MSCONF@"/vendor/* ; do
|
||||
if [ ! -d "$vendorconf" ] ; then continue ; fi
|
||||
CLASSPATH=$vendorconf:$CLASSPATH
|
||||
# We use WEB-INF/lib in the webapp for including things into
|
||||
# the classpath nowdays
|
||||
|
||||
for jar in /usr/share/tomcat6/lib/*.jar; do
|
||||
CLASSPATH=$jar:$CLASSPATH
|
||||
done
|
||||
CLASSPATH=${CLASSPATH}/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/mysql-connector-java-5.1.21.jar
|
||||
export CLASSPATH
|
||||
PATH=/sbin:/usr/sbin:$PATH
|
||||
export PATH
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
The Debian Package
|
||||
----------------------------
|
||||
|
||||
This is part of the Cloud Stack collection of packages.
|
||||
|
||||
-- Manuel Amador (Rudd-O) <manuel@vmops.com> Thu, 25 Mar 2010 15:12:06 -0700
|
||||
|
|
@ -1,3 +1,9 @@
|
|||
cloudstack (4.1.0-incubating-0.0.snapshot) unstable; urgency=low
|
||||
|
||||
* Incorporate incubating into version, remove epoch
|
||||
|
||||
-- Noa Resare <noa@spotify.com> Tue, 05 Feb 2013 18:05:28 +0000
|
||||
|
||||
cloud (1:4.0.0-1) unstable; urgency=low
|
||||
|
||||
* Bumping the version to 4.0.0
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
# 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.
|
||||
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# 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.
|
||||
|
||||
/etc/cloud/cli/commands.xml
|
||||
/usr/bin/cloud-grab-dependent-library-versions
|
||||
/usr/bin/cloud-tool
|
||||
/usr/bin/cloudvoladm
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
# 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.
|
||||
|
||||
/usr/share/cloud/management/webapps/client/*
|
||||
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
# 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.
|
||||
|
||||
/etc/cloud/management/catalina.policy
|
||||
/etc/cloud/management/catalina.properties
|
||||
/etc/cloud/management/commands.properties
|
||||
/etc/cloud/management/components.xml
|
||||
/etc/cloud/management/context.xml
|
||||
/etc/cloud/management/db.properties
|
||||
/etc/cloud/management/environment.properties
|
||||
/etc/cloud/management/ehcache.xml
|
||||
/etc/cloud/management/log4j-cloud.xml
|
||||
/etc/cloud/management/logging.properties
|
||||
/etc/cloud/management/server.xml
|
||||
/etc/cloud/management/tomcat6.conf
|
||||
/etc/cloud/management/classpath.conf
|
||||
/etc/cloud/management/tomcat-users.xml
|
||||
/etc/cloud/management/web.xml
|
||||
/etc/cloud/management/server-nonssl.xml
|
||||
/etc/cloud/management/tomcat6-nonssl.conf
|
||||
/etc/cloud/management/virtualrouter_commands.properties
|
||||
/etc/cloud/management/f5bigip_commands.properties
|
||||
/etc/cloud/management/junipersrx_commands.properties
|
||||
/etc/cloud/management/netscalerloadbalancer_commands.properties
|
||||
/etc/cloud/management/cisconexusvsm_commands.properties
|
||||
/etc/cloud/management/Catalina
|
||||
/etc/cloud/management/Catalina/localhost
|
||||
/etc/cloud/management/Catalina/localhost/client
|
||||
/etc/init.d/cloud-management
|
||||
/usr/share/cloud/management/bin
|
||||
/usr/share/cloud/management/conf
|
||||
/usr/share/cloud/management/lib
|
||||
/usr/share/cloud/management/logs
|
||||
/usr/share/cloud/management/temp
|
||||
/usr/share/cloud/management/work
|
||||
/var/cache/cloud/management
|
||||
/var/cache/cloud/management/work
|
||||
/var/cache/cloud/management/temp
|
||||
/var/log/cloud/management
|
||||
/var/lib/cloud/mnt
|
||||
/var/lib/cloud/management
|
||||
/usr/bin/cloud-setup-management
|
||||
/usr/bin/cloud-update-xenserver-licenses
|
||||
/etc/cloud/management/commands-ext.properties
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
#!/bin/sh -e
|
||||
# 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.
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
if ! id cloud > /dev/null 2>&1 ; then
|
||||
adduser --system --home /var/lib/cloud/management --no-create-home \
|
||||
--group --disabled-password --shell /bin/sh cloud
|
||||
# update me in all the .postinst that you can find me in, as well
|
||||
fi
|
||||
|
||||
for i in /var/lib/cloud/mnt /var/cache/cloud/management \
|
||||
/var/cache/cloud/management/work /var/cache/cloud/management/temp \
|
||||
/var/log/cloud/management /etc/cloud/management/Catalina \
|
||||
/etc/cloud/management/Catalina/localhost /var/lib/cloud/management /etc/cloud/management/Catalina/localhost/client
|
||||
do
|
||||
chmod 0770 $i
|
||||
chgrp cloud $i
|
||||
done
|
||||
|
||||
for i in /etc/cloud/management/db.properties
|
||||
do
|
||||
chmod 0640 $i
|
||||
chgrp cloud $i
|
||||
done
|
||||
|
||||
if [ "$2" = "" ] ; then # no recently configured version, this is a first install
|
||||
/usr/sbin/update-rc.d cloud-management defaults || true
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
# 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.
|
||||
|
||||
/usr/share/java/cloud-core.jar
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
# 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.
|
||||
|
||||
/usr/share/java/ehcache-1.5.0.jar
|
||||
/usr/share/java/mail-1.4.jar
|
||||
/usr/share/java/httpcore-4.0.jar
|
||||
/usr/share/java/log4j-*.jar
|
||||
/usr/share/java/apache-log4j-extras-1.1.jar
|
||||
/usr/share/java/trilead-ssh2-build213-svnkit-1.3-patch.jar
|
||||
/usr/share/java/xmlrpc-common-3.*.jar
|
||||
/usr/share/java/xmlrpc-client-3.*.jar
|
||||
/usr/share/java/jstl-1.2.jar
|
||||
/usr/share/java/axis2-1.5.1.jar
|
||||
/usr/share/java/wsdl4j-1.6.2.jar
|
||||
/usr/share/java/bcprov-*.jar
|
||||
/usr/share/java/jasypt-1.*.jar
|
||||
/usr/share/java/ejb-api-3.0.jar
|
||||
/usr/share/java/javax.persistence-2.0.0.jar
|
||||
/usr/share/java/gson-1.7.1.jar
|
||||
/usr/share/java/xapi-5.6.100-1-SNAPSHOT.jar
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# 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.
|
||||
|
||||
/usr/lib/python*/dist-packages/cloud*
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
# 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.
|
||||
|
||||
/usr/lib/cloud/common/scripts/installer/*
|
||||
/usr/lib/cloud/common/scripts/network/*
|
||||
/usr/lib/cloud/common/scripts/storage/*
|
||||
/usr/lib/cloud/common/scripts/util/*
|
||||
/usr/lib/cloud/common/scripts/vm/network/*
|
||||
/usr/lib/cloud/common/scripts/vm/systemvm/*
|
||||
/usr/lib/cloud/common/scripts/vm/pingtest.sh
|
||||
/usr/lib/cloud/common/scripts/vm/hypervisor/kvm/*
|
||||
/usr/lib/cloud/common/scripts/vm/hypervisor/versions.sh
|
||||
/usr/lib/cloud/common/scripts/vm/hypervisor/xenserver/*
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
# 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.
|
||||
|
||||
/usr/share/java/cloud-server.jar
|
||||
/usr/share/java/cloud-ovm.jar
|
||||
/etc/cloud/server/*
|
||||
/usr/share/java/cloud-dp-user-concentrated-pod.jar
|
||||
/usr/share/java/cloud-dp-user-dispersing.jar
|
||||
/usr/share/java/cloud-host-allocator-random.jar
|
||||
/usr/share/java/cloud-plugin-elb.jar
|
||||
/usr/share/java/cloud-plugin-ovs.jar
|
||||
/usr/share/java/cloud-plugin-nicira-nvp.jar
|
||||
/usr/share/java/cloud-plugin-bigswitch-vns.jar
|
||||
/usr/share/java/cloud-storage-allocator-random.jar
|
||||
/usr/share/java/cloud-user-authenticator-ldap.jar
|
||||
/usr/share/java/cloud-user-authenticator-md5.jar
|
||||
/usr/share/java/cloud-user-authenticator-plaintext.jar
|
||||
/usr/share/java/cloud-plugin-hypervisor-xen.jar
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# 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.
|
||||
|
||||
/usr/lib/cloud/common/vms/systemvm.iso
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
# 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.
|
||||
|
||||
/usr/share/java/cloud-usage.jar
|
||||
/etc/init.d/cloud-usage
|
||||
/var/log/cloud/usage
|
||||
/etc/cloud/usage/usage-components.xml
|
||||
/etc/cloud/usage/log4j-cloud_usage.xml
|
||||
/etc/cloud/usage/db.properties
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
#!/bin/sh -e
|
||||
# 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.
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
|
||||
if ! id cloud > /dev/null 2>&1 ; then
|
||||
adduser --system --home /var/lib/cloud/management --no-create-home \
|
||||
--group --disabled-password --shell /bin/sh cloud
|
||||
# update me in cloud-client.postinst as well
|
||||
fi
|
||||
|
||||
for i in /var/log/cloud/usage
|
||||
do
|
||||
chmod 0770 $i
|
||||
chgrp cloud $i
|
||||
done
|
||||
|
||||
for i in /etc/cloud/usage/db.properties
|
||||
do
|
||||
chmod 0640 $i
|
||||
chgrp cloud $i
|
||||
done
|
||||
|
||||
if [ "$2" = "" ] ; then # no recently configured version, this is a first install
|
||||
/usr/sbin/update-rc.d cloud-usage defaults || true
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
# 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.
|
||||
|
||||
/usr/share/java/cloud-utils.jar
|
||||
/usr/share/java/cloud-api.jar
|
||||
/usr/share/doc/cloud/version-info
|
||||
/usr/bin/cloud-sccs
|
||||
/usr/bin/cloud-gitrevs
|
||||
|
|
@ -16,10 +16,10 @@
|
|||
# under the License.
|
||||
|
||||
/etc/cloud/agent/agent.properties
|
||||
/etc/cloud/agent/developer.properties.template
|
||||
/etc/cloud/agent/environment.properties
|
||||
/etc/cloud/agent/log4j-cloud.xml
|
||||
/etc/init.d/cloud-agent
|
||||
/usr/bin/cloud-setup-agent
|
||||
/usr/bin/cloud-ssh
|
||||
/var/log/cloud/agent
|
||||
/var/log/cloudstack/agent
|
||||
/usr/share/cloudstack-agent/lib/cloudstack-agent-kvm.jar
|
||||
|
|
@ -15,3 +15,4 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
/var/log/cloudstack/awsapi
|
||||
|
|
@ -13,5 +13,4 @@
|
|||
# "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.
|
||||
|
||||
# under the License.
|
||||
|
|
@ -15,5 +15,19 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
/usr/share/java/cloud-agent.jar
|
||||
/usr/share/java/cloud-plugin-hypervisor-kvm.jar
|
||||
/usr/share/cloudstack-common/lib/cloudstack-core.jar
|
||||
/usr/share/cloudstack-common/lib/cloudstack-api.jar
|
||||
/usr/share/cloudstack-common/vms/systemvm.iso
|
||||
/usr/share/cloudstack-common/scripts/installer/*
|
||||
/usr/share/cloudstack-common/scripts/network/*
|
||||
/usr/share/cloudstack-common/scripts/storage/*
|
||||
/usr/share/cloudstack-common/scripts/util/*
|
||||
/usr/share/cloudstack-common/scripts/vm/network/*
|
||||
/usr/share/cloudstack-common/scripts/vm/systemvm/*
|
||||
/usr/share/cloudstack-common/scripts/vm/pingtest.sh
|
||||
/usr/share/cloudstack-common/scripts/vm/hypervisor/kvm/*
|
||||
/usr/share/cloudstack-common/scripts/vm/hypervisor/versions.sh
|
||||
/usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/*
|
||||
/usr/bin/cloud-set-guest-password
|
||||
/usr/bin/cloud-set-guest-sshkey
|
||||
/usr/lib/python2.?/*-packages/*
|
||||
|
|
@ -13,5 +13,4 @@
|
|||
# "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.
|
||||
|
||||
# under the License.
|
||||
|
|
@ -15,11 +15,17 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
/etc/cloud/server/*
|
||||
/etc/cloud/management/*
|
||||
/etc/init.d/cloud-management
|
||||
/var/cache/cloudstack/management
|
||||
/var/cache/cloudstack/management/work
|
||||
/var/cache/cloudstack/management/temp
|
||||
/var/log/cloudstack/management
|
||||
/var/lib/cloud/mnt
|
||||
/var/lib/cloud/management
|
||||
/usr/bin/cloud-update-xenserver-licenses
|
||||
/usr/bin/cloud-setup-management
|
||||
/usr/bin/cloud-setup-databases
|
||||
/usr/bin/cloud-migrate-databases
|
||||
/usr/bin/cloud-set-guest-password
|
||||
/usr/bin/cloud-set-guest-sshkey
|
||||
/usr/share/cloud/setup/*.sql
|
||||
/usr/share/cloud/setup/*.sh
|
||||
/usr/share/cloud/setup/server-setup.xml
|
||||
/usr/share/cloud/setup/db/*.sql
|
||||
/usr/share/cloudstack-management/*
|
||||
|
|
@ -16,19 +16,11 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
|
||||
for i in /var/log/cloud/agent
|
||||
do
|
||||
chmod 0770 $i
|
||||
done
|
||||
|
||||
if [ "$2" = "" ] ; then # no recently configured version, this is a first install
|
||||
/usr/sbin/update-rc.d cloud-agent defaults || true
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
if [ "$1" = configure ]; then
|
||||
if ! getent passwd cloud >/dev/null; then
|
||||
adduser --quiet --system --group --no-create-home --home /usr/share/cloudstack-manager cloud
|
||||
fi
|
||||
chown cloud /var/log/cloudstack/management
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
|
@ -5,9 +5,9 @@
|
|||
# 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
|
||||
|
|
@ -15,4 +15,7 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
/usr/share/java/libvirt-0.4.9.jar
|
||||
/usr/share/cloudstack-usage/lib/cloudstack-usage.jar
|
||||
/etc/init.d/cloud-usage
|
||||
/var/log/cloudstack/usage
|
||||
/etc/cloud/usage/*
|
||||
|
|
@ -1,118 +1,51 @@
|
|||
Source: cloud
|
||||
Source: cloudstack
|
||||
Section: libs
|
||||
Priority: extra
|
||||
Maintainer: Wido den Hollander <wido@widodh.nl>
|
||||
Build-Depends: debhelper (>= 7), openjdk-6-jdk, tomcat6, libws-commons-util-java, libcommons-codec-java (>= 1.5), libcommons-httpclient-java (>= 3.1), libservlet2.5-java, genisoimage, python-mysqldb, maven3 | maven (>= 3), liblog4j1.2-java (>= 1.2.16)
|
||||
Build-Depends: debhelper (>= 7), openjdk-6-jdk, tomcat6, genisoimage,
|
||||
python-mysqldb, maven3 | maven (>= 3), python (>= 2.6.6-3~)
|
||||
Standards-Version: 3.8.1
|
||||
Homepage: http://www.cloudstack.org/
|
||||
|
||||
Package: cloud-deps
|
||||
Architecture: any
|
||||
Depends: openjdk-6-jre, libcommons-codec-java (>= 1.5), libcommons-httpclient-java (>= 3.1)
|
||||
Description: CloudStack library dependencies
|
||||
This package contains a number of third-party dependencies
|
||||
not shipped by distributions, required to run the CloudStack
|
||||
Management Server.
|
||||
Package: cloudstack-common
|
||||
Architecture: all
|
||||
Depends: bash, genisoimage
|
||||
Conflicts: cloud-scripts, cloud-utils, cloud-system-iso, cloud-console-proxy, cloud-daemonize, cloud-deps, cloud-python, cloud-setup
|
||||
Description: A common package which contains files which are shared by several CloudStack packages
|
||||
|
||||
Package: cloud-agent-deps
|
||||
Architecture: any
|
||||
Depends: openjdk-6-jre, cloud-deps (= ${source:Version})
|
||||
Description: CloudStack agent library dependencies
|
||||
This package contains a number of third-party dependencies
|
||||
not shipped by distributions, required to run the CloudStack
|
||||
Agent.
|
||||
|
||||
Package: cloud-utils
|
||||
Architecture: any
|
||||
Depends: openjdk-6-jre, python, libcglib-java (>= 2.2.2), libjsch-java (>= 0.1.42), libbackport-util-concurrent-java (>= 3.1), libcommons-dbcp-java (>= 1.4), libcommons-pool-java (>= 1.5.6)
|
||||
Description: CloudStack utility library
|
||||
The CloudStack utility libraries provide a set of Java classes used
|
||||
in the CloudStack environment.
|
||||
|
||||
Package: cloud-client-ui
|
||||
Architecture: any
|
||||
Depends: openjdk-6-jre, cloud-client (= ${source:Version})
|
||||
Description: CloudStack management server UI
|
||||
The CloudStack management server is the central point of coordination,
|
||||
management, and intelligence in the CloudStack Cloud Stack. This package
|
||||
is a requirement of the cloud-client package, which installs the
|
||||
CloudStack management server.
|
||||
|
||||
Package: cloud-server
|
||||
Architecture: any
|
||||
Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-deps (= ${source:Version}), cloud-scripts (= ${source:Version}), libservlet2.5-java
|
||||
Package: cloudstack-management
|
||||
Architecture: all
|
||||
Depends: cloudstack-common (= ${source:Version}), tomcat6, sysvinit-utils, chkconfig, sudo, jsvc, python-mysqldb, python-paramiko, augeas-tools
|
||||
Conflicts: cloud-server, cloud-client, cloud-client-ui
|
||||
Description: CloudStack server library
|
||||
The CloudStack server libraries provide a set of Java classes used
|
||||
in the CloudStack management server.
|
||||
The CloudStack management server
|
||||
|
||||
Package: cloud-scripts
|
||||
Replaces: cloud-agent-scripts
|
||||
Architecture: any
|
||||
Depends: openjdk-6-jre, python, bash, bzip2, gzip, unzip, nfs-common, openssh-client, lsb-release
|
||||
Description: CloudStack scripts
|
||||
This package contains a number of scripts needed for the CloudStack Agent and Management Server.
|
||||
Both the CloudStack Agent and Management server depend on this package
|
||||
|
||||
Package: cloud-core
|
||||
Architecture: any
|
||||
Depends: openjdk-6-jre, cloud-utils (= ${source:Version})
|
||||
Description: CloudStack core library
|
||||
The CloudStack core libraries provide a set of Java classes used
|
||||
in the CloudStack Cloud Stack.
|
||||
|
||||
|
||||
Package: cloud-client
|
||||
Architecture: any
|
||||
Depends: openjdk-6-jre, cloud-deps (= ${source:Version}), cloud-utils (= ${source:Version}), cloud-server (= ${source:Version}), cloud-client-ui (= ${source:Version}), cloud-setup (= ${source:Version}), cloud-python (= ${source:Version}), tomcat6, libws-commons-util-java, sysvinit-utils, chkconfig, sudo, jsvc, python-mysqldb, python-paramiko, augeas-tools, genisoimage, cloud-system-iso, libmysql-java (>= 5.1)
|
||||
Description: CloudStack client
|
||||
The CloudStack management server is the central point of coordination,
|
||||
management, and intelligence in the CloudStack Cloud Stack. This package
|
||||
is required for the management server to work.
|
||||
|
||||
Package: cloud-setup
|
||||
Architecture: any
|
||||
Depends: openjdk-6-jre, python, cloud-utils (= ${source:Version}), cloud-deps (= ${source:Version}), cloud-server (= ${source:Version}), cloud-python (= ${source:Version}), python-mysqldb
|
||||
Description: CloudStack client
|
||||
The CloudStack setup tools let you set up your Management Server and Usage Server.
|
||||
|
||||
Package: cloud-python
|
||||
Architecture: any
|
||||
Depends: python
|
||||
Description: CloudStack Python library
|
||||
The CloudStack Python library contains a few Python modules that the
|
||||
CloudStack uses.
|
||||
|
||||
Package: cloud-agent-libs
|
||||
Architecture: any
|
||||
Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-agent-deps (= ${source:Version})
|
||||
Description: CloudStack agent libraries
|
||||
The CloudStack agent libraries are used by the Cloud Agent.
|
||||
|
||||
Package: cloud-agent
|
||||
Architecture: any
|
||||
Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-agent-deps (= ${source:Version}), cloud-python (= ${source:Version}), cloud-agent-libs (= ${source:Version}), cloud-scripts (= ${source:Version}), cloud-system-iso (= ${source:Version}), libvirt0, sysvinit-utils, chkconfig, qemu-kvm, libvirt-bin, uuid-runtime, rsync, grep, iproute, ebtables, vlan, liblog4j1.2-java (>= 1.2.16), libjna-java, wget, jsvc, lsb-base (>= 3.2)
|
||||
Package: cloudstack-agent
|
||||
Architecture: all
|
||||
Depends: openjdk-6-jre, cloudstack-common (= ${source:Version}), lsb-base (>= 3.2), openssh-client, libvirt0, sysvinit-utils, chkconfig, qemu-kvm, libvirt-bin, uuid-runtime, rsync, grep, iproute, ebtables, vlan, wget, jsvc
|
||||
Conflicts: cloud-agent, cloud-agent-libs, cloud-agent-deps, cloud-agent-scripts
|
||||
Description: CloudStack agent
|
||||
The CloudStack agent is in charge of managing shared computing resources in
|
||||
a CloudStack powered cloud. Install this package if this computer
|
||||
will participate in your cloud as a KVM HyperVisor.
|
||||
|
||||
Package: cloud-system-iso
|
||||
Architecture: any
|
||||
Description: CloudStack system iso
|
||||
The CloudStack agent is in charge of managing shared computing resources in
|
||||
a CloudStack powered cloud. Install this package if this computer
|
||||
will participate in your cloud.
|
||||
|
||||
Package: cloud-usage
|
||||
Architecture: any
|
||||
Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-deps (= ${source:Version}), cloud-server (= ${source:Version}), cloud-setup (= ${source:Version}), cloud-client (= ${source:Version}), jsvc
|
||||
Package: cloudstack-usage
|
||||
Architecture: all
|
||||
Depends: openjdk-6-jre, cloudstack-common (= ${source:Version}), jsvc
|
||||
Description: CloudStack usage monitor
|
||||
The CloudStack usage monitor provides usage accounting across the entire cloud for
|
||||
cloud operators to charge based on usage parameters.
|
||||
|
||||
Package: cloud-cli
|
||||
Provides: cloud-cli
|
||||
Architecture: any
|
||||
Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-deps (= ${source:Version}), cloud-server (= ${source:Version}), cloud-setup (= ${source:Version}), cloud-client (= ${source:Version})
|
||||
Description: CloudStack commandline tool
|
||||
The CloudStack commandline tool for invoking APi
|
||||
Package: cloudstack-awsapi
|
||||
Architecture: all
|
||||
Depends: cloudstack-common (= ${source:Version}), cloudstack-management (= ${source:Version})
|
||||
Description: CloudStack Amazon EC2 API
|
||||
|
||||
Package: cloudstack-cli
|
||||
Architecture: all
|
||||
Depends: cloudstack-common (= ${source:Version})
|
||||
Description: The CloudStack CLI called CloudMonkey
|
||||
|
||||
Package: cloudstack-docs
|
||||
Architecture: all
|
||||
Description: The CloudStack documentation
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@
|
|||
# Modified to make a template file for a multi-binary package with separated
|
||||
# build-arch and build-indep targets by Bill Allombert 2001
|
||||
|
||||
DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
|
||||
VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[~-].*//')
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
export DH_VERBOSE=1
|
||||
|
||||
|
|
@ -19,55 +22,118 @@ export DH_OPTIONS
|
|||
configure: configure-stamp
|
||||
configure-stamp:
|
||||
dh_testdir
|
||||
cp packaging/debian/replace.properties build/replace.properties
|
||||
echo VERSION=$VERSION >> build/replace.properties
|
||||
cp packaging/debian/replace.properties replace.properties.tmp
|
||||
echo VERSION=${VERSION} >> replace.properties.tmp
|
||||
touch configure-stamp
|
||||
|
||||
build: build-arch
|
||||
build: build-indep
|
||||
|
||||
build-arch: build-arch-stamp
|
||||
build-arch-stamp: configure-stamp
|
||||
mvn package -Dsystemvm
|
||||
build-indep: build-indep-stamp
|
||||
|
||||
build-indep-stamp: configure
|
||||
mvn package -DskipTests -Dsystemvm \
|
||||
-Dcs.replace.properties=replace.properties.tmp
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -f build-arch-stamp build-indep-stamp configure-stamp
|
||||
rm -f replace.properties.tmp
|
||||
dh_clean
|
||||
|
||||
install:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_prep -s
|
||||
mkdir -p debian/tmp/usr/bin
|
||||
mkdir -p debian/tmp/usr/share/cloud/management
|
||||
mkdir -p debian/tmp/var/log/cloud
|
||||
mkdir debian/tmp/var/log/cloud/managament
|
||||
mkdir debian/tmp/var/log/cloud/awsapi
|
||||
mkdir debian/tmp/var/log/cloud/agent
|
||||
mkdir debian/tmp/var/log/cloud/ipallocator
|
||||
mkdir debian/tmp/var/log/cloud/usage
|
||||
|
||||
# Common packages
|
||||
mkdir -p debian/tmp/etc/cloud
|
||||
mkdir -p debian/tmp/etc/init.d
|
||||
mkdir -p debian/tmp/var/cache/cloudstack
|
||||
mkdir -p debian/tmp/var/log/cloudstack
|
||||
mkdir -p debian/tmp/var/lib/cloud
|
||||
mkdir -p debian/tmp/usr/bin
|
||||
mkdir -p debian/tmp/usr/share/cloud
|
||||
mkdir -p debian/tmp/usr/lib/cloud
|
||||
|
||||
# cloudstack-agent
|
||||
mkdir debian/tmp/etc/cloud/agent
|
||||
mkdir debian/tmp/var/log/cloudstack/agent
|
||||
install -D plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-4.1.0-SNAPSHOT.jar debian/tmp/usr/share/cloudstack-agent/lib/cloudstack-agent-kvm.jar
|
||||
install -D packaging/debian/init/cloud-agent debian/tmp/etc/init.d/
|
||||
install -D agent/bindir/cloud-setup-agent.in debian/tmp/usr/bin/cloud-setup-agent
|
||||
install -D agent/bindir/cloud-ssh.in debian/tmp/usr/bin/cloud-ssh
|
||||
cp agent/target/transformed/* debian/tmp/etc/cloud/agent
|
||||
|
||||
# cloudstack-management
|
||||
mkdir debian/tmp/etc/cloud/server
|
||||
mkdir debian/tmp/etc/cloud/management
|
||||
mkdir debian/tmp/etc/cloud/usage
|
||||
mkdir -p debian/tmp/var/cache/cloud
|
||||
mkdir debian/tmp/var/cache/cloud/management
|
||||
mkdir -p debian/tmp/usr/share/cloud
|
||||
mkdir debian/tmp/usr/share/cloud/setup
|
||||
mkdir -p debian/tmp/usr/share/cloud/management/webapps/client
|
||||
|
||||
cp -r client/target/utilities/scripts/db/* debian/tmp/usr/share/cloud/setup/
|
||||
cp -r client/target/cloud-client-ui-*-SNAPSHOT/* debian/tmp/usr/share/cloud/management/webapps/client/
|
||||
dh_installdirs -s
|
||||
dh_install -s
|
||||
mkdir -p debian/tmp/usr/share/cloudstack-management
|
||||
mkdir -p debian/tmp/usr/share/cloudstack-management/webapps/client
|
||||
mkdir debian/tmp/usr/share/cloudstack-management/setup
|
||||
mkdir debian/tmp/var/log/cloudstack/management
|
||||
mkdir debian/tmp/var/cache/cloudstack/management
|
||||
mkdir debian/tmp/var/cache/cloudstack/management/work
|
||||
mkdir debian/tmp/var/cache/cloudstack/management/temp
|
||||
mkdir debian/tmp/var/log/cloudstack/ipallocator
|
||||
mkdir debian/tmp/var/lib/cloud/management
|
||||
mkdir debian/tmp/var/lib/cloud/mnt
|
||||
cp -r client/target/utilities/scripts/db/* debian/tmp/usr/share/cloudstack-management/setup/
|
||||
cp -r client/target/cloud-client-ui-4.1.0-SNAPSHOT/* debian/tmp/usr/share/cloudstack-management/webapps/client/
|
||||
cp server/target/conf/* debian/tmp/etc/cloud/server/
|
||||
cp client/target/conf/* debian/tmp/etc/cloud/management/
|
||||
ln -s tomcat6-nonssl.conf debian/tmp/etc/cloud/management/tomcat6.conf
|
||||
mkdir -p debian/tmp/etc/cloud/management/Catalina/localhost/client
|
||||
install -D packaging/debian/init/cloud-management debian/tmp/etc/init.d/cloud-management
|
||||
install -D client/bindir/cloud-update-xenserver-licenses.in debian/tmp/usr/bin/cloud-update-xenserver-licenses
|
||||
install -D server/target/cloud-server-4.1.0-SNAPSHOT.jar debian/tmp/usr/share/cloudstack-management/lib/cloudstack-server.jar
|
||||
ln -s /usr/share/tomcat6/bin debian/tmp/usr/share/cloudstack-management/bin
|
||||
ln -s ../../../etc/cloud/management debian/tmp/usr/share/cloudstack-management/conf
|
||||
ln -s /usr/share/tomcat6/lib debian/tmp/usr/share/cloudstack-management/lib
|
||||
ln -s ../../../var/log/cloudstack/management debian/tmp/usr/share/cloudstack-management/logs
|
||||
ln -s ../../../var/cache/cloudstack/management/temp debian/tmp/usr/share/cloudstack-management/temp
|
||||
ln -s ../../../var/cache/cloudstack/management/work debian/tmp/usr/share/cloudstack-management/work
|
||||
|
||||
binary: binary-common
|
||||
binary-common:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
# cloudstack-common
|
||||
mkdir -p debian/tmp/usr/share/cloudstack-common
|
||||
mkdir debian/tmp/usr/share/cloudstack-common/scripts
|
||||
mkdir debian/tmp/usr/share/cloudstack-common/setup
|
||||
cp -r scripts/installer debian/tmp/usr/share/cloudstack-common/scripts
|
||||
cp -r scripts/network debian/tmp/usr/share/cloudstack-common/scripts
|
||||
cp -r scripts/storage debian/tmp/usr/share/cloudstack-common/scripts
|
||||
cp -r scripts/util debian/tmp/usr/share/cloudstack-common/scripts
|
||||
cp -r scripts/vm debian/tmp/usr/share/cloudstack-common/scripts
|
||||
install -D client/target/utilities/bin/cloud-migrate-databases debian/tmp/usr/bin
|
||||
install -D client/target/utilities/bin/cloud-set-guest-password debian/tmp/usr/bin
|
||||
install -D client/target/utilities/bin/cloud-set-guest-sshkey debian/tmp/usr/bin
|
||||
install -D client/target/utilities/bin/cloud-setup-databases debian/tmp/usr/bin
|
||||
install -D client/target/utilities/bin/cloud-setup-management debian/tmp/usr/bin
|
||||
install -D console-proxy/dist/systemvm.iso debian/tmp/usr/share/cloudstack-common/vms/systemvm.iso
|
||||
install -D core/target/cloud-core-4.1.0-SNAPSHOT.jar debian/tmp/usr/share/cloudstack-common/lib/cloudstack-core.jar
|
||||
install -D api/target/cloud-api-4.1.0-SNAPSHOT.jar debian/tmp/usr/share/cloudstack-common/lib/cloudstack-api.jar
|
||||
|
||||
# cloudstack-python
|
||||
mkdir -p debian/tmp/usr/lib/python2.7/dist-packages
|
||||
cp -r python/lib/cloud* debian/tmp/usr/lib/python2.7/dist-packages
|
||||
|
||||
# cloudstack-usage
|
||||
mkdir debian/tmp/etc/cloud/usage
|
||||
mkdir debian/tmp/var/log/cloudstack/usage
|
||||
install -D usage/target/cloud-usage-4.1.0-SNAPSHOT.jar debian/tmp/usr/share/cloudstack-usage/lib/cloudstack-usage.jar
|
||||
cp usage/target/transformed/* debian/tmp/etc/cloud/usage/
|
||||
ln -s ../management/db.properties debian/tmp/etc/cloud/usage/db.properties
|
||||
install -D packaging/debian/init/cloud-usage debian/tmp/etc/init.d
|
||||
|
||||
# cloudstack-awsapi
|
||||
mkdir debian/tmp/var/log/cloudstack/awsapi
|
||||
|
||||
dh_installdirs
|
||||
dh_install
|
||||
dh_python2
|
||||
|
||||
binary: install
|
||||
dh_install
|
||||
dh_installchangelogs
|
||||
dh_installdocs LICENSE
|
||||
dh_installdocs DISCLAIMER
|
||||
|
|
|
|||
|
|
@ -67,6 +67,10 @@
|
|||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-server</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-servlet_3.0_spec</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,167 @@
|
|||
#!/bin/bash
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: cloud agent
|
||||
# Required-Start: $network $local_fs
|
||||
# Required-Stop: $network $local_fs
|
||||
# Default-Start: 3 4 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Start/stop Apache CloudStack Agent
|
||||
# Description: This scripts Starts/Stops the Apache CloudStack agent
|
||||
## The CloudStack Agent is a part of the Apache CloudStack project and is used
|
||||
## for managing KVM-based Hypervisors and performing secondary storage tasks inside
|
||||
## the Secondary Storage System Virtual Machine.
|
||||
## JSVC (Java daemonizing) is used for starting and stopping the agent
|
||||
### END INIT INFO
|
||||
|
||||
# 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.
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
SHORTNAME="cloud-agent"
|
||||
PIDFILE=/var/run/"$SHORTNAME".pid
|
||||
LOCKFILE=/var/lock/subsys/"$SHORTNAME"
|
||||
PROGNAME="CloudStack Agent"
|
||||
CLASS="com.cloud.agent.AgentShell"
|
||||
PROG="jsvc"
|
||||
DAEMON="/usr/bin/jsvc"
|
||||
SHUTDOWN_WAIT="30"
|
||||
|
||||
unset OPTIONS
|
||||
[ -r /etc/default/"$SHORTNAME" ] && source /etc/default/"$SHORTNAME"
|
||||
|
||||
# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in $DEFAULT)
|
||||
JDK_DIRS="/usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.5-ibm"
|
||||
|
||||
for jdir in $JDK_DIRS; do
|
||||
if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
|
||||
JAVA_HOME="$jdir"
|
||||
fi
|
||||
done
|
||||
export JAVA_HOME
|
||||
|
||||
# We need to append the JSVC daemon JAR to the classpath
|
||||
# AgentShell implements the JSVC daemon methods
|
||||
export CLASSPATH="/usr/share/java/commons-daemon.jar:/usr/share/java/cloud-agent-kvm.jar:/etc/cloud/agent"
|
||||
|
||||
wait_for_network() {
|
||||
i=1
|
||||
while [ $i -lt 10 ]
|
||||
do
|
||||
# Under Ubuntu and Debian libvirt by default creates a bridge called virbr0.
|
||||
# That's why we want more then 3 lines back from brctl, so that there is a manually created bridge
|
||||
if [ "$(brctl show|wc -l)" -gt 2 ]; then
|
||||
break
|
||||
else
|
||||
sleep 1
|
||||
let i=$i+1
|
||||
continue
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
start() {
|
||||
if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
|
||||
log_daemon_msg "$PROGNAME apparently already running"
|
||||
log_end_msg 0
|
||||
exit 0
|
||||
fi
|
||||
|
||||
log_daemon_msg "Starting $PROGNAME" "$SHORTNAME"
|
||||
if hostname --fqdn >/dev/null 2>&1 ; then
|
||||
true
|
||||
else
|
||||
log_failure_msg "The host name does not resolve properly to an IP address. Cannot start $PROGNAME"
|
||||
log_end_msg 1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
wait_for_network
|
||||
|
||||
if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -pidfile "$PIDFILE" -errfile SYSLOG -D jna.nosys=true $CLASS
|
||||
RETVAL=$?
|
||||
then
|
||||
rc=0
|
||||
sleep 1
|
||||
if ! kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
|
||||
log_failure_msg "$PROG failed to start"
|
||||
rc=1
|
||||
fi
|
||||
else
|
||||
rc=1
|
||||
fi
|
||||
|
||||
if [ $rc -eq 0 ]; then
|
||||
log_end_msg 0
|
||||
else
|
||||
log_end_msg 1
|
||||
rm -f "$PIDFILE"
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
count="0"
|
||||
|
||||
log_daemon_msg "Stopping $PROGNAME" "$SHORTNAME"
|
||||
killproc -p $PIDFILE $DAEMON
|
||||
|
||||
until [ "$count" -gt "$SHUTDOWN_WAIT" ]
|
||||
do
|
||||
agentPid=$(ps aux|grep [j]svc|grep $SHORTNAME)
|
||||
if [ "$?" -gt "0" ];then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
let count="${count}+1"
|
||||
done
|
||||
|
||||
agentPid=$(ps aux|grep [j]svc|grep $SHORTNAME)
|
||||
if [ "$?" -eq "0" ]; then
|
||||
agentPid=$(ps aux|grep [j]svc|awk '{print $2}')
|
||||
if [ "$agentPid" != "" ]; then
|
||||
log_warning_msg "$PROG still running, forcing kill"
|
||||
kill -9 $agentPid
|
||||
fi
|
||||
fi
|
||||
|
||||
log_end_msg $?
|
||||
rm -f "$PIDFILE"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
status_of_proc -p "$PIDFILE" "$PROG" "$SHORTNAME"
|
||||
RETVAL=$?
|
||||
;;
|
||||
restart | force-reload)
|
||||
stop
|
||||
sleep 3
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|force-reload|status}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
|
|
@ -0,0 +1,244 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# /etc/init.d/tomcat6 -- startup script for the Tomcat 6 servlet engine
|
||||
|
||||
# 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.
|
||||
### BEGIN INIT INFO
|
||||
# Provides: tomcat-vmops
|
||||
# Required-Start: $local_fs $remote_fs $network
|
||||
# Required-Stop: $local_fs $remote_fs $network
|
||||
# Should-Start: $named
|
||||
# Should-Stop: $named
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Start Tomcat (CloudStack).
|
||||
# Description: Start the Tomcat servlet engine that runs the CloudStack Management Server.
|
||||
### END INIT INFO
|
||||
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
NAME=cloud-management
|
||||
DESC="CloudStack-specific Tomcat servlet engine"
|
||||
DAEMON=/usr/bin/jsvc
|
||||
CATALINA_HOME=/usr/share/cloud/management
|
||||
DEFAULT=/etc/cloud/management/tomcat6.conf
|
||||
JVM_TMP=/tmp/$NAME-temp
|
||||
|
||||
# We have to explicitly set the HOME variable to the homedir from the user "cloud"
|
||||
# This is because various scripts run by the management server read the HOME variable
|
||||
# and fail when this init script is run manually.
|
||||
HOME=$(echo ~cloud)
|
||||
|
||||
if [ `id -u` -ne 0 ]; then
|
||||
echo "You need root privileges to run this script"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure tomcat is started with system locale
|
||||
if [ -r /etc/default/locale ]; then
|
||||
. /etc/default/locale
|
||||
export LANG
|
||||
fi
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
. /etc/default/rcS
|
||||
|
||||
|
||||
# The following variables can be overwritten in $DEFAULT
|
||||
|
||||
# Run Tomcat 6 as this user ID
|
||||
TOMCAT6_USER=tomcat6
|
||||
|
||||
# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
|
||||
# defined in $DEFAULT)
|
||||
JDK_DIRS="/usr/lib/jvm/java-1.6.0-openjdk-amd64/ /usr/lib/jvm/java-1.6.0-openjdk-i386/ /usr/lib/jvm/java-1.6.0-openjdk/ /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun"
|
||||
|
||||
# Look for the right JVM to use
|
||||
for jdir in $JDK_DIRS; do
|
||||
if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
|
||||
JAVA_HOME="$jdir"
|
||||
fi
|
||||
done
|
||||
export JAVA_HOME
|
||||
|
||||
# Directory for per-instance configuration files and webapps
|
||||
CATALINA_BASE=/usr/share/cloud/management
|
||||
|
||||
# Use the Java security manager? (yes/no)
|
||||
TOMCAT6_SECURITY=no
|
||||
|
||||
# Default Java options
|
||||
# Set java.awt.headless=true if JAVA_OPTS is not set so the
|
||||
# Xalan XSL transformer can work without X11 display on JDK 1.4+
|
||||
# It also looks like the default heap size of 64M is not enough for most cases
|
||||
# so the maximum heap size is set to 128M
|
||||
if [ -z "$JAVA_OPTS" ]; then
|
||||
JAVA_OPTS="-Djava.awt.headless=true -Xmx128M"
|
||||
fi
|
||||
|
||||
# End of variables that can be overwritten in $DEFAULT
|
||||
|
||||
# overwrite settings from default file
|
||||
if [ -f "$DEFAULT" ]; then
|
||||
. "$DEFAULT"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CATALINA_HOME/bin/bootstrap.jar" ]; then
|
||||
log_failure_msg "$NAME is not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f "$DAEMON" ] || exit 0
|
||||
|
||||
POLICY_CACHE="$CATALINA_BASE/work/catalina.policy"
|
||||
|
||||
JAVA_OPTS="$JAVA_OPTS -Djava.endorsed.dirs=$CATALINA_HOME/endorsed -Dcatalina.base=$CATALINA_BASE -Dcatalina.home=$CATALINA_HOME -Djava.io.tmpdir=$JVM_TMP"
|
||||
|
||||
# Set the JSP compiler if set in the tomcat6.default file
|
||||
if [ -n "$JSP_COMPILER" ]; then
|
||||
JAVA_OPTS="$JAVA_OPTS -Dbuild.compiler=$JSP_COMPILER"
|
||||
fi
|
||||
|
||||
if [ "$TOMCAT6_SECURITY" = "yes" ]; then
|
||||
JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$POLICY_CACHE"
|
||||
fi
|
||||
|
||||
# Set juli LogManager if logging.properties is provided
|
||||
if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then
|
||||
JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" "-Djava.util.logging.config.file="$CATALINA_BASE/conf/logging.properties"
|
||||
fi
|
||||
|
||||
# Define other required variables
|
||||
CATALINA_PID="/var/run/$NAME.pid"
|
||||
BOOTSTRAP_CLASS=org.apache.catalina.startup.Bootstrap
|
||||
JSVC_CLASSPATH="/usr/share/java/commons-daemon.jar:$CATALINA_HOME/bin/bootstrap.jar"
|
||||
JSVC_CLASSPATH=$CLASSPATH:$JSVC_CLASSPATH
|
||||
|
||||
# Look for Java Secure Sockets Extension (JSSE) JARs
|
||||
if [ -z "${JSSE_HOME}" -a -r "${JAVA_HOME}/jre/lib/jsse.jar" ]; then
|
||||
JSSE_HOME="${JAVA_HOME}/jre/"
|
||||
fi
|
||||
export JSSE_HOME
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
log_failure_msg "no JDK found - please set JAVA_HOME"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$CATALINA_BASE/conf" ]; then
|
||||
log_failure_msg "invalid CATALINA_BASE: $CATALINA_BASE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log_daemon_msg "Starting $DESC" "$NAME"
|
||||
if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
|
||||
--user $TOMCAT6_USER --startas "$JAVA_HOME/bin/java" \
|
||||
>/dev/null; then
|
||||
|
||||
# Regenerate POLICY_CACHE file
|
||||
umask 022
|
||||
echo "// AUTO-GENERATED FILE from /etc/tomcat6/policy.d/" \
|
||||
> "$POLICY_CACHE"
|
||||
echo "" >> "$POLICY_CACHE"
|
||||
if ls $CATALINA_BASE/conf/policy.d/*.policy > /dev/null 2>&1 ; then
|
||||
cat $CATALINA_BASE/conf/policy.d/*.policy \
|
||||
>> "$POLICY_CACHE"
|
||||
fi
|
||||
|
||||
# Remove / recreate JVM_TMP directory
|
||||
rm -rf "$JVM_TMP"
|
||||
mkdir "$JVM_TMP" || {
|
||||
log_failure_msg "could not create JVM temporary directory"
|
||||
exit 1
|
||||
}
|
||||
chown $TOMCAT6_USER "$JVM_TMP"
|
||||
cd "$JVM_TMP"
|
||||
|
||||
|
||||
# fix storage issues on nfs mounts
|
||||
umask 000
|
||||
$DAEMON -user "$TOMCAT6_USER" -cp "$JSVC_CLASSPATH" \
|
||||
-outfile SYSLOG -errfile SYSLOG \
|
||||
-pidfile "$CATALINA_PID" $JAVA_OPTS "$BOOTSTRAP_CLASS"
|
||||
|
||||
sleep 5
|
||||
if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
|
||||
--user $TOMCAT6_USER --startas "$JAVA_HOME/bin/java" \
|
||||
>/dev/null; then
|
||||
log_end_msg 1
|
||||
else
|
||||
log_end_msg 0
|
||||
fi
|
||||
else
|
||||
log_progress_msg "(already running)"
|
||||
log_end_msg 0
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
|
||||
--user "$TOMCAT6_USER" --startas "$JAVA_HOME/bin/java" \
|
||||
>/dev/null; then
|
||||
log_progress_msg "(not running)"
|
||||
else
|
||||
$DAEMON -cp "$JSVC_CLASSPATH" -pidfile "$CATALINA_PID" \
|
||||
-stop "$BOOTSTRAP_CLASS"
|
||||
fi
|
||||
rm -rf "$JVM_TMP"
|
||||
log_end_msg 0
|
||||
;;
|
||||
status)
|
||||
if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
|
||||
--user $TOMCAT6_USER --startas "$JAVA_HOME/bin/java" \
|
||||
>/dev/null; then
|
||||
|
||||
if [ -f "$CATALINA_PID" ]; then
|
||||
log_success_msg "$DESC is not running, but pid file exists."
|
||||
exit 1
|
||||
else
|
||||
log_success_msg "$DESC is not running."
|
||||
exit 3
|
||||
fi
|
||||
else
|
||||
log_success_msg "$DESC is running with pid `cat $CATALINA_PID`"
|
||||
fi
|
||||
;;
|
||||
restart|force-reload)
|
||||
if start-stop-daemon --test --stop --pidfile "$CATALINA_PID" \
|
||||
--user $TOMCAT6_USER --startas "$JAVA_HOME/bin/java" \
|
||||
>/dev/null; then
|
||||
$0 stop
|
||||
sleep 1
|
||||
fi
|
||||
$0 start
|
||||
;;
|
||||
try-restart)
|
||||
if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \
|
||||
--user $TOMCAT6_USER --startas "$JAVA_HOME/bin/java" \
|
||||
>/dev/null; then
|
||||
$0 start
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
log_success_msg "Usage: $0 {start|stop|restart|try-restart|force-reload|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
#!/bin/bash
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: cloud usage
|
||||
# Required-Start: $network $local_fs
|
||||
# Required-Stop: $network $local_fs
|
||||
# Default-Start: 3 4 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: Start/stop Apache CloudStack Usage Monitor
|
||||
# Description: This scripts Starts/Stops the Apache CloudStack Usage Monitor
|
||||
## The CloudStack Usage Monitor is a part of the Apache CloudStack project and is used
|
||||
## for storing usage statistics from instances.
|
||||
## JSVC (Java daemonizing) is used for starting and stopping the usage monitor.
|
||||
### END INIT INFO
|
||||
|
||||
# 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.
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
SHORTNAME="cloud-usage"
|
||||
PIDFILE=/var/run/"$SHORTNAME".pid
|
||||
LOGFILE=/var/log/cloud/usage/usage-server.log
|
||||
PROGNAME="CloudStack Usage Monitor"
|
||||
CLASS="com.cloud.usage.UsageServer"
|
||||
PROG="jsvc"
|
||||
DAEMON="/usr/bin/jsvc"
|
||||
USER=@MSUSER@
|
||||
|
||||
unset OPTIONS
|
||||
[ -r @SYSCONFDIR@/default/"$SHORTNAME" ] && source @SYSCONFDIR@/default/"$SHORTNAME"
|
||||
|
||||
# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in $DEFAULT)
|
||||
JDK_DIRS="/usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-sun /usr/lib/jvm/jre-1.6.0 /usr/lib/j2sdk1.5-sun /usr/lib/jre-openjdk"
|
||||
|
||||
for jdir in $JDK_DIRS; do
|
||||
if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
|
||||
JAVA_HOME="$jdir"
|
||||
fi
|
||||
done
|
||||
export JAVA_HOME
|
||||
|
||||
SCP="@SYSTEMCLASSPATH@"
|
||||
DCP="@DEPSCLASSPATH@"
|
||||
UCP="@USAGECLASSPATH@"
|
||||
JCP="/usr/share/java/commons-daemon.jar"
|
||||
|
||||
# We need to append the JSVC daemon JAR to the classpath
|
||||
# AgentShell implements the JSVC daemon methods
|
||||
export CLASSPATH="$SCP:$DCP:$UCP:$JCP:@USAGESYSCONFDIR@"
|
||||
|
||||
start() {
|
||||
if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
|
||||
log_daemon_msg "$PROGNAME apparently already running"
|
||||
log_end_msg 0
|
||||
exit 0
|
||||
fi
|
||||
|
||||
log_daemon_msg "Starting $PROGNAME" "$SHORTNAME"
|
||||
if hostname --fqdn >/dev/null 2>&1 ; then
|
||||
true
|
||||
else
|
||||
log_failure_msg "The host name does not resolve properly to an IP address. Cannot start $PROGNAME"
|
||||
log_end_msg 1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" -outfile SYSLOG -errfile SYSLOG -Dpid=$$ $CLASS
|
||||
RETVAL=$?
|
||||
then
|
||||
rc=0
|
||||
sleep 1
|
||||
if ! kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
|
||||
log_failure_msg "$PROG failed to start"
|
||||
rc=1
|
||||
fi
|
||||
else
|
||||
rc=1
|
||||
fi
|
||||
|
||||
if [ $rc -eq 0 ]; then
|
||||
log_end_msg 0
|
||||
else
|
||||
log_end_msg 1
|
||||
rm -f "$PIDFILE"
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
log_daemon_msg "Stopping $PROGNAME" "$SHORTNAME"
|
||||
killproc -p $PIDFILE $DAEMON
|
||||
log_end_msg $?
|
||||
rm -f "$PIDFILE"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
status_of_proc -p "$PIDFILE" "$PROG" "$SHORTNAME"
|
||||
RETVAL=$?
|
||||
;;
|
||||
restart | force-reload)
|
||||
stop
|
||||
sleep 3
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|force-reload|status}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
||||
|
|
@ -37,12 +37,12 @@ CONFIGUREVARS=
|
|||
DEPSCLASSPATH=
|
||||
DOCDIR=
|
||||
IPALOCATORLOG=/var/log/cloud/management/ipallocator.log
|
||||
JAVADIR=/usr/share/java
|
||||
JAVADIR=/usr/share/cloudstack-management/webapps/client/WEB-INF/lib
|
||||
LIBEXECDIR=/usr/libexec
|
||||
LOCKDIR=/var/lock
|
||||
MSCLASSPATH=
|
||||
MSCONF=/etc/cloud/management
|
||||
MSENVIRON=/usr/share/cloud/management
|
||||
MSENVIRON=/usr/share/cloudstack-management
|
||||
MSLOG=/var/log/cloud/management/management-server.log
|
||||
MSLOGDIR=/var/log/cloud/management/
|
||||
MSMNTDIR=/var/lib/cloud/mnt
|
||||
|
|
@ -52,7 +52,7 @@ PLUGINJAVADIR=
|
|||
PREMIUMJAVADIR=
|
||||
PYTHONDIR=/usr/lib/python2.6/site-packages/
|
||||
SERVERSYSCONFDIR=/etc/cloud/server
|
||||
SETUPDATADIR=/usr/share/cloud/setup
|
||||
SETUPDATADIR=/usr/share/cloudstack-management/setup
|
||||
SYSCONFDIR=/etc
|
||||
SYSTEMCLASSPATH=
|
||||
SYSTEMJARS=
|
||||
|
|
|
|||
|
|
@ -43,6 +43,11 @@
|
|||
<artifactId>libvirt</artifactId>
|
||||
<version>0.4.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna</artifactId>
|
||||
<version>3.5.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
|
|
@ -50,68 +55,23 @@
|
|||
<testSourceDirectory>test</testSourceDirectory>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.3</version>
|
||||
<configuration>
|
||||
<finalName>kvm-agent</finalName>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<descriptors>
|
||||
<descriptor>agent-descriptor.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>make-agent</id>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/dependencies</outputDirectory>
|
||||
<includeScope>runtime</includeScope>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-resources</id>
|
||||
<!-- here the phase you need -->
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>dist</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>target</directory>
|
||||
<includes>
|
||||
<include>kvm-agent.zip</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>target/dependencies</outputDirectory>
|
||||
<includeScope>runtime</includeScope>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
|||
1
pom.xml
1
pom.xml
|
|
@ -90,6 +90,7 @@
|
|||
<cs.commons-io.version>1.4</cs.commons-io.version>
|
||||
<cs.reflections.version>0.9.8</cs.reflections.version>
|
||||
<cs.java-ipv6.version>0.10</cs.java-ipv6.version>
|
||||
<cs.replace.properties>build/replace.properties</cs.replace.properties>
|
||||
</properties>
|
||||
|
||||
<distributionManagement>
|
||||
|
|
|
|||
|
|
@ -130,6 +130,43 @@
|
|||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.7</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-resource</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<target>
|
||||
<copy overwrite="true"
|
||||
todir="${basedir}/target/conf">
|
||||
<fileset dir="${basedir}/conf">
|
||||
<include name="*.in" />
|
||||
</fileset>
|
||||
<globmapper from="*.in" to="*" />
|
||||
<filterchain>
|
||||
<filterreader
|
||||
classname="org.apache.tools.ant.filters.ReplaceTokens">
|
||||
<param type="propertiesfile"
|
||||
value="${cs.replace.properties}" />
|
||||
</filterreader>
|
||||
</filterchain>
|
||||
</copy>
|
||||
<copy
|
||||
todir="${basedir}/target/conf">
|
||||
<fileset dir="${basedir}/conf">
|
||||
<exclude name="*.in" />
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@
|
|||
<filterreader
|
||||
classname="org.apache.tools.ant.filters.ReplaceTokens">
|
||||
<param type="propertiesfile"
|
||||
value="${basedir}/../build/replace.properties" />
|
||||
value="${cs.replace.properties}" />
|
||||
</filterreader>
|
||||
</filterchain>
|
||||
</copy>
|
||||
|
|
@ -118,7 +118,7 @@
|
|||
<filterreader
|
||||
classname="org.apache.tools.ant.filters.ReplaceTokens">
|
||||
<param type="propertiesfile"
|
||||
value="${basedir}/../build/replace.properties" />
|
||||
value="${cs.replace.properties}" />
|
||||
</filterreader>
|
||||
</filterchain>
|
||||
</copy>
|
||||
|
|
|
|||
Loading…
Reference in New Issue