mirror of https://github.com/apache/cloudstack.git
Merge branch 'master' into affinity_groups
This commit is contained in:
commit
90172c38f8
64
LICENSE
64
LICENSE
|
|
@ -180,70 +180,6 @@ Copyright (c) 2013 The Apache Software Foundation
|
|||
|
||||
|
||||
This distribution contains third party resources.
|
||||
Within the . directory
|
||||
licensed under the BSD (3-clause) http://www.opensource.org/licenses/BSD-3-Clause (as follows)
|
||||
|
||||
Copyright (c) 2005-2010 Thomas Nagy
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from Thomas Nagy http://code.google.com/p/waf/
|
||||
waf
|
||||
|
||||
Within the awsapi directory
|
||||
licensed under the BSD (3-clause) http://www.opensource.org/licenses/BSD-3-Clause (as follows)
|
||||
|
||||
Copyright (c) 2005-2010 Thomas Nagy
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from Thomas Nagy http://code.google.com/p/waf/
|
||||
waf
|
||||
|
||||
Within the console-proxy/js directory
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
|
|
|
|||
|
|
@ -225,6 +225,8 @@
|
|||
<ref bean="DirectNetworkGuru"/>
|
||||
<ref bean="OvsGuestNetworkGuru"/>
|
||||
<ref bean="PrivateNetworkGuru"/>
|
||||
<ref bean="NiciraNvpGuestNetworkGuru"/>
|
||||
<ref bean="MidoNetGuestNetworkGuru"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
|
|
|||
|
|
@ -306,6 +306,8 @@
|
|||
<ref bean="DirectNetworkGuru"/>
|
||||
<ref bean="OvsGuestNetworkGuru"/>
|
||||
<ref bean="PrivateNetworkGuru"/>
|
||||
<ref bean="NiciraNvpGuestNetworkGuru"/>
|
||||
<ref bean="MidoNetGuestNetworkGuru"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
|
|
|||
|
|
@ -1,231 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<!-- Note: A "Server" is not itself a "Container", so you may not
|
||||
define subcomponents such as "Valves" at this level.
|
||||
Documentation at /docs/config/server.html
|
||||
-->
|
||||
<Server port="8005" shutdown="SHUTDOWN">
|
||||
|
||||
<!--APR library loader. Documentation at /docs/apr.html -->
|
||||
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
|
||||
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
|
||||
<Listener className="org.apache.catalina.core.JasperListener" />
|
||||
<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
|
||||
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
|
||||
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
|
||||
|
||||
<!-- Global JNDI resources
|
||||
Documentation at /docs/jndi-resources-howto.html
|
||||
-->
|
||||
<GlobalNamingResources>
|
||||
<!-- Editable user database that can also be used by
|
||||
UserDatabaseRealm to authenticate users
|
||||
-->
|
||||
<Resource name="UserDatabase" auth="Container"
|
||||
type="org.apache.catalina.UserDatabase"
|
||||
description="User database that can be updated and saved"
|
||||
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
|
||||
pathname="conf/tomcat-users.xml" />
|
||||
</GlobalNamingResources>
|
||||
|
||||
<!-- A "Service" is a collection of one or more "Connectors" that share
|
||||
a single "Container" Note: A "Service" is not itself a "Container",
|
||||
so you may not define subcomponents such as "Valves" at this level.
|
||||
Documentation at /docs/config/service.html
|
||||
-->
|
||||
<Service name="Catalina">
|
||||
|
||||
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
|
||||
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
|
||||
maxThreads="150" minSpareThreads="25"/>
|
||||
|
||||
|
||||
<!-- A "Connector" represents an endpoint by which requests are received
|
||||
and responses are returned. Documentation at :
|
||||
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
|
||||
Java AJP Connector: /docs/config/ajp.html
|
||||
APR (HTTP/AJP) Connector: /docs/apr.html
|
||||
Define a non-SSL HTTP/1.1 Connector on port 8080
|
||||
-->
|
||||
<!--
|
||||
<Connector port="8080" protocol="HTTP/1.1"
|
||||
connectionTimeout="20000"
|
||||
redirectPort="8443" />
|
||||
-->
|
||||
<!-- A "Connector" using the shared thread pool-->
|
||||
<Connector executor="tomcatThreadPool" URIEncoding="UTF-8"
|
||||
port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
|
||||
connectionTimeout="20000" disableUploadTimeout="true"
|
||||
acceptCount="150" enableLookups="false" maxThreads="150"
|
||||
maxHttpHeaderSize="8192" redirectPort="8443" />
|
||||
|
||||
|
||||
<!-- Define a SSL HTTP/1.1 Connector on port 8443
|
||||
This connector uses the JSSE configuration, when using APR, the
|
||||
connector should be using the OpenSSL style configuration
|
||||
described in the APR documentation -->
|
||||
<!--
|
||||
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
|
||||
maxThreads="150" scheme="https" secure="true"
|
||||
clientAuth="false" sslProtocol="TLS"
|
||||
keystoreType="PKCS12"
|
||||
keystoreFile="conf\cloud-localhost.pk12"
|
||||
keystorePass="password"
|
||||
/>
|
||||
-->
|
||||
|
||||
<!-- Define an AJP 1.3 Connector on port 20400 -->
|
||||
<Connector port="20400" protocol="AJP/1.3" redirectPort="8443" />
|
||||
|
||||
|
||||
<!-- An Engine represents the entry point (within Catalina) that processes
|
||||
every request. The Engine implementation for Tomcat stand alone
|
||||
analyzes the HTTP headers included with the request, and passes them
|
||||
on to the appropriate Host (virtual host).
|
||||
Documentation at /docs/config/engine.html -->
|
||||
|
||||
<!-- You should set jvmRoute to support load-balancing via AJP ie :
|
||||
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
|
||||
-->
|
||||
<Engine name="Catalina" defaultHost="localhost">
|
||||
|
||||
<!--For clustering, please take a look at documentation at:
|
||||
/docs/cluster-howto.html (simple how to)
|
||||
/docs/config/cluster.html (reference documentation) -->
|
||||
<!--
|
||||
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
|
||||
-->
|
||||
|
||||
<!-- The request dumper valve dumps useful debugging information about
|
||||
the request and response data received and sent by Tomcat.
|
||||
Documentation at: /docs/config/valve.html -->
|
||||
<!--
|
||||
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
|
||||
-->
|
||||
|
||||
<!-- This Realm uses the UserDatabase configured in the global JNDI
|
||||
resources under the key "UserDatabase". Any edits
|
||||
that are performed against this UserDatabase are immediately
|
||||
available for use by the Realm. -->
|
||||
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
|
||||
resourceName="UserDatabase"/>
|
||||
|
||||
<!-- Define the default virtual host
|
||||
Note: XML Schema validation will not work with Xerces 2.2.
|
||||
-->
|
||||
<Host name="localhost" appBase="webapps"
|
||||
unpackWARs="true" autoDeploy="true"
|
||||
xmlValidation="false" xmlNamespaceAware="false">
|
||||
|
||||
<!-- SingleSignOn valve, share authentication between web applications
|
||||
Documentation at: /docs/config/valve.html -->
|
||||
<!--
|
||||
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
|
||||
-->
|
||||
|
||||
<!-- Access log processes all example.
|
||||
Documentation at: /docs/config/valve.html -->
|
||||
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve" directory="logs"
|
||||
prefix="access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
|
||||
|
||||
</Host>
|
||||
</Engine>
|
||||
</Service>
|
||||
|
||||
|
||||
<Service name="Catalina7080">
|
||||
|
||||
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
|
||||
<Executor name="tomcatThreadPool-internal" namePrefix="catalina-exec-int-"
|
||||
maxThreads="150" minSpareThreads="25"/>
|
||||
|
||||
<Connector executor="tomcatThreadPool-internal" URIEncoding="UTF-8"
|
||||
port="7080" protocol="org.apache.coyote.http11.Http11NioProtocol"
|
||||
connectionTimeout="20000" disableUploadTimeout="true"
|
||||
acceptCount="150" enableLookups="false" maxThreads="150"
|
||||
maxHttpHeaderSize="8192" redirectPort="8443" />
|
||||
|
||||
<!-- Define a SSL HTTP/1.1 Connector on port 8443
|
||||
This connector uses the JSSE configuration, when using APR, the
|
||||
connector should be using the OpenSSL style configuration
|
||||
described in the APR documentation -->
|
||||
<!--
|
||||
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
|
||||
maxThreads="150" scheme="https" secure="true"
|
||||
clientAuth="false" sslProtocol="TLS"
|
||||
keystoreType="PKCS12"
|
||||
keystoreFile="conf\cloud-localhost.pk12"
|
||||
keystorePass="password"
|
||||
/>
|
||||
-->
|
||||
|
||||
<!-- Define an AJP 1.3 Connector on port 20400 -->
|
||||
|
||||
|
||||
<!-- An Engine represents the entry point (within Catalina) that processes
|
||||
every request. The Engine implementation for Tomcat stand alone
|
||||
analyzes the HTTP headers included with the request, and passes them
|
||||
on to the appropriate Host (virtual host).
|
||||
Documentation at /docs/config/engine.html -->
|
||||
|
||||
<Engine name="Catalina7080" defaultHost="localhost">
|
||||
|
||||
<!--For clustering, please take a look at documentation at:
|
||||
/docs/cluster-howto.html (simple how to)
|
||||
/docs/config/cluster.html (reference documentation) -->
|
||||
<!--
|
||||
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
|
||||
-->
|
||||
|
||||
<!-- The request dumper valve dumps useful debugging information about
|
||||
the request and response data received and sent by Tomcat.
|
||||
Documentation at: /docs/config/valve.html -->
|
||||
<!--
|
||||
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
|
||||
-->
|
||||
|
||||
<!-- This Realm uses the UserDatabase configured in the global JNDI
|
||||
resources under the key "UserDatabase". Any edits
|
||||
that are performed against this UserDatabase are immediately
|
||||
available for use by the Realm. -->
|
||||
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
|
||||
resourceName="UserDatabase"/>
|
||||
|
||||
<!-- Define the default virtual host
|
||||
Note: XML Schema validation will not work with Xerces 2.2.
|
||||
-->
|
||||
<Host name="localhost" appBase="webapps7080"
|
||||
unpackWARs="true" autoDeploy="true"
|
||||
xmlValidation="false" xmlNamespaceAware="false">
|
||||
|
||||
<!-- SingleSignOn valve, share authentication between web applications
|
||||
Documentation at: /docs/config/valve.html -->
|
||||
<!--
|
||||
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
|
||||
-->
|
||||
|
||||
<!-- Access log processes all example.
|
||||
Documentation at: /docs/config/valve.html -->
|
||||
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve" directory="logs"
|
||||
prefix="access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
|
||||
|
||||
</Host>
|
||||
</Engine>
|
||||
</Service>
|
||||
|
||||
</Server>
|
||||
|
|
@ -15,7 +15,6 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
/etc/cloudstack/server/*
|
||||
/etc/cloudstack/management/*
|
||||
/etc/init.d/cloudstack-management
|
||||
/etc/security/limits.d/cloudstack-limits.conf
|
||||
|
|
@ -31,4 +30,3 @@
|
|||
/usr/bin/cloud-setup-databases
|
||||
/usr/bin/cloud-migrate-databases
|
||||
/usr/share/cloudstack-management/*
|
||||
/usr/share/tomcat6/lib/*
|
||||
|
|
|
|||
|
|
@ -6,9 +6,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
|
||||
|
|
@ -27,10 +27,7 @@ if [ "$1" = configure ]; then
|
|||
/var/cache/cloudstack/management/work \
|
||||
/var/cache/cloudstack/management/temp \
|
||||
/var/log/cloudstack/management \
|
||||
/etc/cloudstack/management/Catalina \
|
||||
/etc/cloudstack/management/Catalina/localhost \
|
||||
/var/lib/cloudstack/management \
|
||||
/etc/cloudstack/management/Catalina/localhost/client
|
||||
/var/lib/cloudstack/management
|
||||
do
|
||||
chmod 0770 $i
|
||||
chgrp cloud $i
|
||||
|
|
|
|||
|
|
@ -98,14 +98,15 @@ install:
|
|||
chmod 0440 $(DESTDIR)/$(SYSCONFDIR)/sudoers.d/cloudstack
|
||||
|
||||
ln -s tomcat6-nonssl.conf $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/tomcat6.conf
|
||||
mkdir -p $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/Catalina/localhost/client
|
||||
mkdir -p ${DESTDIR}/usr/share/tomcat6/lib
|
||||
ln -s server-nonssl.xml $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/server.xml
|
||||
install -D packaging/debian/init/cloud-management $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-management
|
||||
install -D client/bindir/cloud-update-xenserver-licenses.in $(DESTDIR)/usr/bin/cloud-update-xenserver-licenses
|
||||
ln -s /usr/share/tomcat6/bin $(DESTDIR)/usr/share/$(PACKAGE)-management/bin
|
||||
# Remove configuration in /ur/share/cloudstack-management/webapps/client/WEB-INF
|
||||
# This should all be in /etc/cloudstack/management
|
||||
rm $(DESTDIR)/usr/share/$(PACKAGE)-management/webapps/client/WEB-INF/classes/*.*
|
||||
ln -s ../../..$(SYSCONFDIR)/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/conf
|
||||
ln -s ../../../usr/share/tomcat6/lib $(DESTDIR)/usr/share/$(PACKAGE)-management/lib
|
||||
ln -s ../../java/$(PACKAGE)-server.jar $(DESTDIR)/usr/share/tomcat6/lib/$(PACKAGE)-server.jar
|
||||
ln -s ../../../var/log/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/logs
|
||||
ln -s ../../../var/cache/$(PACKAGE)/management/temp $(DESTDIR)/usr/share/$(PACKAGE)-management/temp
|
||||
ln -s ../../../var/cache/$(PACKAGE)/management/work $(DESTDIR)/usr/share/$(PACKAGE)-management/work
|
||||
|
|
@ -153,10 +154,7 @@ install:
|
|||
binary: install
|
||||
dh_install
|
||||
dh_installchangelogs
|
||||
dh_installdocs LICENSE
|
||||
dh_installdocs DISCLAIMER
|
||||
dh_installdocs NOTICE
|
||||
dh_installdocs INSTALL.md
|
||||
dh_installdocs -A tools/whisker/LICENSE tools/whisker/NOTICE INSTALL.md
|
||||
dh_installman
|
||||
dh_link
|
||||
dh_strip
|
||||
|
|
|
|||
|
|
@ -18,14 +18,13 @@
|
|||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<bookinfo id="book-release-notes-4.0">
|
||||
<title>Version 4.0.0-incubating Release Notes</title>
|
||||
<subtitle>Revised October 17, 2012 19:49 UTC</subtitle>
|
||||
<bookinfo id="book-release-notes-4.1">
|
||||
<title>Version 4.1.0 Release Notes</title>
|
||||
<productname>Apache CloudStack</productname>
|
||||
<productnumber/>
|
||||
<pubsnumber/>
|
||||
<abstract>
|
||||
<para>Release notes for the Apache CloudStack 4.0.0-incubating release.</para>
|
||||
<para>Release notes for the Apache CloudStack 4.1.0 release.</para>
|
||||
</abstract>
|
||||
<corpauthor>
|
||||
<inlinemediaobject>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -2,33 +2,43 @@
|
|||
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
]>
|
||||
<!-- 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.
|
||||
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.
|
||||
-->
|
||||
|
||||
<section>
|
||||
<title>We Need Feedback!</title>
|
||||
<indexterm>
|
||||
<section id="feedback">
|
||||
<title>Submitting Feedback and Getting Help</title>
|
||||
<indexterm>
|
||||
<primary>feedback1</primary>
|
||||
<secondary>contact information for this brand</secondary>
|
||||
<secondary>contact information for this brand</secondary>
|
||||
|
||||
</indexterm>
|
||||
<para>If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a bug: <ulink url="https://issues.apache.org/jira/browse/CLOUDSTACK">https://issues.apache.org/jira/browse/CLOUDSTACK</ulink> against the component <application>Doc</application>.</para>
|
||||
<para>If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a bug: <ulink url="https://issues.apache.org/jira/browse/CLOUDSTACK">https://issues.apache.org/jira/browse/CLOUDSTACK</ulink> against the component <application>Doc</application>.</para>
|
||||
<para>If you have a suggestion for improving the documentation, try to be as specific as possible when describing it. If you have found an error, please include the section number and some of the surrounding text so we can find it easily.</para>
|
||||
<para>Better yet, feel free to submit a patch if you would like to enhance the documentation. Our documentation is, along with the rest of the CloudStack source code, kept in the project's git repository.</para>
|
||||
<para>Better yet, feel free to submit a patch if you would like to enhance the documentation. Our documentation is, along with the rest of the &PRODUCT; source code, kept in the project's git repository.</para>
|
||||
<para>The most efficient way to get help with &PRODUCT; is to ask on the mailing lists.</para>
|
||||
<para>The Apache CloudStack project has mailing lists for users and developers. These are the
|
||||
official channels of communication for the project and are the best way to get answers about
|
||||
using and contributing to CloudStack. It's a good idea to subscribe to the
|
||||
users@cloudstack.apache.org mailing list if you've deployed or are deploying
|
||||
CloudStack into production, and even for test deployments.</para>
|
||||
<para>The CloudStack developer's mailing list (dev@cloudstack.apache.org) is for discussions
|
||||
about CloudStack development, and is the best list for discussing possible bugs in CloudStack.
|
||||
Anyone contributing to CloudStack should be on this mailing list.</para>
|
||||
<para>To posts to the lists, you'll need to be subscribed. See the
|
||||
<ulink url="http://cloudstack.apache.org/mailing-lists.html">CloudStack Web site</ulink>
|
||||
for instructions.</para>
|
||||
</section>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,8 @@ export CLASSPATH="/usr/share/java/commons-daemon.jar:/usr/share/java/jna.jar:$AC
|
|||
start() {
|
||||
echo -n $"Starting $PROGNAME: "
|
||||
if hostname --fqdn >/dev/null 2>&1 ; then
|
||||
$JSVC -cp "$CLASSPATH" -pidfile "$PIDFILE" -errfile SYSLOG $CLASS
|
||||
$JSVC -cp "$CLASSPATH" -pidfile "$PIDFILE" \
|
||||
-errfile $LOGDIR/cloudstack-agent.err -outfile $LOGDIR/cloudstack-agent.out $CLASS
|
||||
RETVAL=$?
|
||||
echo
|
||||
else
|
||||
|
|
|
|||
|
|
@ -153,13 +153,9 @@ Provides: cloud-aws-api
|
|||
%description awsapi
|
||||
Apache Cloudstack AWS API compatibility wrapper
|
||||
|
||||
#%package docs
|
||||
#Summary: Apache CloudStack documentation
|
||||
#%description docs
|
||||
#Apache CloudStack documentations
|
||||
|
||||
%prep
|
||||
echo Doing CloudStack build
|
||||
|
||||
%setup -q -n %{name}-%{_maventag}
|
||||
|
||||
%build
|
||||
|
|
@ -169,10 +165,10 @@ echo VERSION=%{_maventag} >> build/replace.properties
|
|||
echo PACKAGE=%{name} >> build/replace.properties
|
||||
|
||||
if [ "%{_ossnoss}" == "NONOSS" -o "%{_ossnoss}" == "nonoss" ] ; then
|
||||
echo "Packaging nonoss components"
|
||||
echo "Executing mvn packaging for NONOSS ..."
|
||||
mvn -Pawsapi,systemvm -Dnonoss package
|
||||
else
|
||||
echo "Packaging oss components"
|
||||
echo "Executing mvn packaging for OSS ..."
|
||||
mvn -Pawsapi package -Dsystemvm
|
||||
fi
|
||||
|
||||
|
|
@ -248,8 +244,7 @@ mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classe
|
|||
${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina/localhost/client
|
||||
|
||||
install python/bindir/cloud-external-ipallocator.py ${RPM_BUILD_ROOT}%{_bindir}/%{name}-external-ipallocator.py
|
||||
install -D client/target/pythonlibs/jasypt-1.9.0.jar ${RPM_BUILD_ROOT}%{_javadir}/jasypt-1.9.0.jar
|
||||
install -D client/target/pythonlibs/jasypt-1.8.jar ${RPM_BUILD_ROOT}%{_javadir}/jasypt-1.8.jar
|
||||
install -D client/target/pythonlibs/jasypt-1.9.0.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/lib/jasypt-1.9.0.jar
|
||||
|
||||
install -D packaging/centos63/cloud-ipallocator.rc ${RPM_BUILD_ROOT}%{_initrddir}/%{name}-ipallocator
|
||||
install -D packaging/centos63/cloud-management.rc ${RPM_BUILD_ROOT}%{_initrddir}/%{name}-management
|
||||
|
|
@ -313,9 +308,27 @@ rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classe
|
|||
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/NOTICE.txt
|
||||
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/services.xml
|
||||
|
||||
#License files from whisker
|
||||
install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-management-%{version}/NOTICE
|
||||
install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-management-%{version}/LICENSE
|
||||
install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-common-%{version}/NOTICE
|
||||
install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-common-%{version}/LICENSE
|
||||
install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-agent-%{version}/NOTICE
|
||||
install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-agent-%{version}/LICENSE
|
||||
install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-usage-%{version}/NOTICE
|
||||
install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-usage-%{version}/LICENSE
|
||||
install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-awsapi-%{version}/NOTICE
|
||||
install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-awsapi-%{version}/LICENSE
|
||||
install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-cli-%{version}/NOTICE
|
||||
install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-cli-%{version}/LICENSE
|
||||
|
||||
%clean
|
||||
[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
%pre awsapi
|
||||
id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \
|
||||
-r -s /bin/sh -d %{_localstatedir}/cloudstack/management cloud|| true
|
||||
|
||||
%preun management
|
||||
/sbin/service cloudstack-management stop || true
|
||||
if [ "$1" == "0" ] ; then
|
||||
|
|
@ -454,7 +467,6 @@ fi
|
|||
%config(noreplace) %{_sysconfdir}/%{name}/management/catalina.policy
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/management/catalina.properties
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/management/classpath.conf
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/management/db-enc.properties
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/management/server-nonssl.xml
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/management/server-ssl.xml
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/management/tomcat-users.xml
|
||||
|
|
@ -486,13 +498,11 @@ fi
|
|||
%{_datadir}/%{name}-management/setup/db/*.sql
|
||||
%{_datadir}/%{name}-management/setup/*.sh
|
||||
%{_datadir}/%{name}-management/setup/server-setup.xml
|
||||
%{_javadir}/jasypt-1.9.0.jar
|
||||
%{_javadir}/jasypt-1.8.jar
|
||||
%attr(0755,root,root) %{_bindir}/%{name}-external-ipallocator.py
|
||||
%attr(0755,root,root) %{_initrddir}/%{name}-ipallocator
|
||||
%dir %attr(0770,root,root) %{_localstatedir}/log/%{name}/ipallocator
|
||||
%doc LICENSE
|
||||
%doc NOTICE
|
||||
%{_defaultdocdir}/%{name}-management-%{version}/LICENSE
|
||||
%{_defaultdocdir}/%{name}-management-%{version}/NOTICE
|
||||
|
||||
%files agent
|
||||
%attr(0755,root,root) %{_bindir}/%{name}-setup-agent
|
||||
|
|
@ -502,8 +512,8 @@ fi
|
|||
%dir %{_localstatedir}/log/%{name}/agent
|
||||
%attr(0644,root,root) %{_datadir}/%{name}-agent/lib/*.jar
|
||||
%dir %{_datadir}/%{name}-agent/plugins
|
||||
%doc LICENSE
|
||||
%doc NOTICE
|
||||
%{_defaultdocdir}/%{name}-agent-%{version}/LICENSE
|
||||
%{_defaultdocdir}/%{name}-agent-%{version}/NOTICE
|
||||
|
||||
%files common
|
||||
%dir %attr(0755,root,root) %{_libdir}/python2.6/site-packages/cloudutils
|
||||
|
|
@ -514,8 +524,9 @@ fi
|
|||
%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloud_utils.py
|
||||
%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloud_utils.pyc
|
||||
%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudutils/*
|
||||
%doc LICENSE
|
||||
%doc NOTICE
|
||||
%attr(0644, root, root) %{_datadir}/%{name}-common/lib/jasypt-1.9.0.jar
|
||||
%{_defaultdocdir}/%{name}-common-%{version}/LICENSE
|
||||
%{_defaultdocdir}/%{name}-common-%{version}/NOTICE
|
||||
|
||||
%files usage
|
||||
%attr(0755,root,root) %{_sysconfdir}/init.d/%{name}-usage
|
||||
|
|
@ -523,19 +534,15 @@ fi
|
|||
%attr(0644,root,root) %{_datadir}/%{name}-usage/lib/*.jar
|
||||
%dir /var/log/%{name}/usage
|
||||
%dir %{_sysconfdir}/%{name}/usage
|
||||
%doc LICENSE
|
||||
%doc NOTICE
|
||||
%{_defaultdocdir}/%{name}-usage-%{version}/LICENSE
|
||||
%{_defaultdocdir}/%{name}-usage-%{version}/NOTICE
|
||||
|
||||
%files cli
|
||||
%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudapis.py
|
||||
%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudtool/__init__.py
|
||||
%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudtool/utils.py
|
||||
%doc LICENSE
|
||||
%doc NOTICE
|
||||
|
||||
#%files docs
|
||||
#%doc LICENSE
|
||||
#%doc NOTICE
|
||||
%{_defaultdocdir}/%{name}-cli-%{version}/LICENSE
|
||||
%{_defaultdocdir}/%{name}-cli-%{version}/NOTICE
|
||||
|
||||
%files awsapi
|
||||
%defattr(0644,cloud,cloud,0755)
|
||||
|
|
@ -543,8 +550,8 @@ fi
|
|||
%attr(0644,root,root) %{_datadir}/%{name}-bridge/setup/*
|
||||
%attr(0755,root,root) %{_bindir}/cloudstack-aws-api-register
|
||||
%attr(0755,root,root) %{_bindir}/cloudstack-setup-bridge
|
||||
%doc LICENSE
|
||||
%doc NOTICE
|
||||
%{_defaultdocdir}/%{name}-awsapi-%{version}/LICENSE
|
||||
%{_defaultdocdir}/%{name}-awsapi-%{version}/NOTICE
|
||||
|
||||
|
||||
%changelog
|
||||
|
|
|
|||
|
|
@ -20,126 +20,134 @@ function usage() {
|
|||
echo ""
|
||||
echo "usage: ./package.sh [-p|--pack] [-h|--help] [ARGS]"
|
||||
echo ""
|
||||
echo "oss|OSS To package oss components only"
|
||||
echo "nonoss|NONOSS To package non-oss and oss components"
|
||||
echo "The commonly used Arguments are:"
|
||||
echo "oss|OSS To package OSS specific"
|
||||
echo "nonoss|NONOSS To package NONOSS specific"
|
||||
echo ""
|
||||
echo "Examples: ./package.sh -p|--pack oss|OSS"
|
||||
echo " ./package.sh -p|--pack nonoss|NONOSS"
|
||||
echo " ./package.sh (Default OSS)"
|
||||
echo ""
|
||||
exit 1
|
||||
}
|
||||
|
||||
function defaultPackaging() {
|
||||
CWD=`pwd`
|
||||
RPMDIR=$CWD/../../dist/rpmbuild
|
||||
PACK_PROJECT=cloudstack
|
||||
VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep '^[0-9]\.'`
|
||||
CWD=`pwd`
|
||||
RPMDIR=$CWD/../../dist/rpmbuild
|
||||
PACK_PROJECT=cloudstack
|
||||
|
||||
if echo $VERSION | grep SNAPSHOT ; then
|
||||
REALVER=`echo $VERSION | cut -d '-' -f 1`
|
||||
DEFVER="-D_ver $REALVER"
|
||||
DEFPRE="-D_prerelease 1"
|
||||
DEFREL="-D_rel SNAPSHOT"
|
||||
else
|
||||
DEFVER="-D_ver $REALVER"
|
||||
DEFPRE=
|
||||
DEFREL=
|
||||
fi
|
||||
mkdir -p $RPMDIR/SPECS
|
||||
mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
|
||||
VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep '^[0-9]\.'`
|
||||
if echo $VERSION | grep SNAPSHOT ; then
|
||||
REALVER=`echo $VERSION | cut -d '-' -f 1`
|
||||
DEFVER="-D_ver $REALVER"
|
||||
DEFPRE="-D_prerelease 1"
|
||||
DEFREL="-D_rel SNAPSHOT"
|
||||
else
|
||||
DEFVER="-D_ver $REALVER"
|
||||
DEFPRE=
|
||||
DEFREL=
|
||||
fi
|
||||
|
||||
(cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x)
|
||||
(cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION)
|
||||
mkdir -p $RPMDIR/SPECS
|
||||
mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
|
||||
|
||||
cp cloud.spec $RPMDIR/SPECS
|
||||
(cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x )
|
||||
(cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION)
|
||||
|
||||
(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE")
|
||||
cp cloud.spec $RPMDIR/SPECS
|
||||
|
||||
exit
|
||||
(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE")
|
||||
|
||||
exit
|
||||
}
|
||||
|
||||
function packaging() {
|
||||
CWD=`pwd`
|
||||
RPMDIR=$CWD/../../dist/rpmbuild
|
||||
PACK_PROJECT=cloudstack
|
||||
DEFOSSNOSS="-D_ossnoss $packageval"
|
||||
VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep '^[0-9]\.'`
|
||||
|
||||
CWD=`pwd`
|
||||
RPMDIR=$CWD/../../dist/rpmbuild
|
||||
PACK_PROJECT=cloudstack
|
||||
DEFOSSNOSS="-D_ossnoss $packageval"
|
||||
|
||||
if echo $VERSION | grep SNAPSHOT ; then
|
||||
REALVER=`echo $VERSION | cut -d '-' -f 1`
|
||||
DEFVER="-D_ver $REALVER"
|
||||
DEFPRE="-D_prerelease 1"
|
||||
DEFREL="-D_rel SNAPSHOT"
|
||||
else
|
||||
DEFVER="-D_ver $REALVER"
|
||||
DEFPRE=
|
||||
DEFREL=
|
||||
fi
|
||||
|
||||
mkdir -p $RPMDIR/SPECS
|
||||
mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
|
||||
VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep '^[0-9]\.'`
|
||||
if echo $VERSION | grep SNAPSHOT ; then
|
||||
REALVER=`echo $VERSION | cut -d '-' -f 1`
|
||||
DEFVER="-D_ver $REALVER"
|
||||
DEFPRE="-D_prerelease 1"
|
||||
DEFREL="-D_rel SNAPSHOT"
|
||||
else
|
||||
DEFVER="-D_ver $REALVER"
|
||||
DEFPRE=
|
||||
DEFREL=
|
||||
fi
|
||||
|
||||
(cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x )
|
||||
(cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION)
|
||||
mkdir -p $RPMDIR/SPECS
|
||||
mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
|
||||
|
||||
cp cloud.spec $RPMDIR/SPECS
|
||||
|
||||
(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE" "$DEFOSSNOSS")
|
||||
(cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x )
|
||||
(cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION)
|
||||
|
||||
exit
|
||||
cp cloud.spec $RPMDIR/SPECS
|
||||
|
||||
(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE" "$DEFOSSNOSS")
|
||||
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
if [ $# -lt 1 ] ; then
|
||||
defaultPackaging
|
||||
|
||||
defaultPackaging
|
||||
|
||||
elif [ $# -gt 0 ] ; then
|
||||
SHORTOPTS="hp:"
|
||||
LONGOPTS="help,pack:"
|
||||
ARGS=$(getopt -s bash -u -a --options $SHORTOPTS --longoptions $LONGOPTS --name $0 -- "$@" )
|
||||
|
||||
eval set -- "$ARGS"
|
||||
SHORTOPTS="hp:"
|
||||
LONGOPTS="help,pack:"
|
||||
|
||||
ARGS=$(getopt -s bash -u -a --options $SHORTOPTS --longoptions $LONGOPTS --name $0 -- "$@" )
|
||||
eval set -- "$ARGS"
|
||||
|
||||
while [ $# -gt 0 ] ; do
|
||||
case "$1" in
|
||||
-h | --help)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-p | --pack)
|
||||
echo "Doing CloudStack Packaging ....."
|
||||
packageval=$2
|
||||
if [ "$packageval" == "oss" -o "$packageval" == "OSS" ] ; then
|
||||
defaultPackaging
|
||||
elif [ "$packageval" == "nonoss" -o "$packageval" == "NONOSS" ] ; then
|
||||
packaging
|
||||
else
|
||||
echo "Error: Incorrect value provided in package.sh script, Please see help ./package.sh --help|-h for more details."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
-)
|
||||
echo "Unrecognized option..."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
--)
|
||||
echo "Unrecognized option..."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
-*)
|
||||
echo "Unrecognized option..."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
while [ $# -gt 0 ] ; do
|
||||
case "$1" in
|
||||
-h | --help)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
-p | --pack)
|
||||
echo "Packaging Apache CloudStack"
|
||||
packageval=$2
|
||||
if [ "$packageval" == "oss" -o "$packageval" == "OSS" ] ; then
|
||||
defaultPackaging
|
||||
elif [ "$packageval" == "nonoss" -o "$packageval" == "NONOSS" ] ; then
|
||||
packaging
|
||||
else
|
||||
echo "Error: Incorrect usage. See help ./package.sh --help|-h."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
-)
|
||||
echo "Unrecognized option."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
--)
|
||||
echo "Unrecognized option."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
-*)
|
||||
echo "Unrecognized option."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
echo "Incorrect choice. Nothing to do." >&2
|
||||
echo "./package.sh --help for details"
|
||||
echo "Incorrect choice. Nothing to do." >&2
|
||||
echo "Please, execute ./package.sh --help for more help"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class DBDeployer(object):
|
|||
dbDotProperties = {}
|
||||
dbDotPropertiesIndex = 0
|
||||
encryptionKeyFile = '@MSCONF@/key'
|
||||
encryptionJarPath = '@JAVADIR@/jasypt-1.9.0.jar'
|
||||
encryptionJarPath = '@COMMONLIBDIR@/lib/jasypt-1.9.0.jar'
|
||||
success = False
|
||||
magicString = 'This_is_a_magic_string_i_think_no_one_will_duplicate'
|
||||
tmpMysqlFile = os.path.join(os.path.expanduser('~/'), 'cloudstackmysql.tmp.sql')
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class DBDeployer(object):
|
|||
dbDotProperties = {}
|
||||
dbDotPropertiesIndex = 0
|
||||
encryptionKeyFile = '@MSCONF@/key'
|
||||
encryptionJarPath = '@JAVADIR@/cloud-jasypt-1.8.jar:@JAVADIR@/jasypt-1.8.jar:@JAVADIR@/jasypt-1.9.0.jar'
|
||||
encryptionJarPath = '@COMMONLIBDIR@/lib/jasypt-1.9.0.jar'
|
||||
success = False
|
||||
magicString = 'This_is_a_magic_string_i_think_no_one_will_duplicate'
|
||||
|
||||
|
|
|
|||
|
|
@ -263,8 +263,6 @@ CREATE TABLE `cloud`.`region` (
|
|||
|
||||
INSERT INTO `cloud`.`region` values ('1','Local','http://localhost:8080/client/');
|
||||
|
||||
ALTER TABLE `cloud_usage`.`account` ADD COLUMN `region_id` int unsigned NOT NULL DEFAULT '1';
|
||||
|
||||
CREATE TABLE `cloud`.`nicira_nvp_router_map` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
|
||||
`logicalrouter_uuid` varchar(255) NOT NULL UNIQUE COMMENT 'nicira uuid of logical router',
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ try:
|
|||
import shlex
|
||||
import sys
|
||||
import types
|
||||
import copy
|
||||
|
||||
from cachemaker import loadcache, savecache, monkeycache, splitverbsubject
|
||||
from config import __version__, __description__, __projecturl__
|
||||
|
|
@ -162,6 +163,40 @@ class CloudMonkeyShell(cmd.Cmd, object):
|
|||
self.monkeyprint(printer)
|
||||
return PrettyTable(toprow)
|
||||
|
||||
def print_result_json(result, result_filter=None):
|
||||
tfilter = {} # temp var to hold a dict of the filters
|
||||
tresult = copy.deepcopy(result) # dupe the result to filter
|
||||
if result_filter is not None:
|
||||
for res in result_filter:
|
||||
tfilter[res] = 1
|
||||
myresults = {}
|
||||
for okey, oval in result.iteritems():
|
||||
if isinstance(oval, dict):
|
||||
for tkey in x:
|
||||
if tkey not in tfilter:
|
||||
try:
|
||||
del(tresult[okey][x][tkey])
|
||||
except:
|
||||
pass
|
||||
elif isinstance(oval, list):
|
||||
for x in range(len(oval)):
|
||||
if isinstance(oval[x], dict):
|
||||
for tkey in oval[x]:
|
||||
if tkey not in tfilter:
|
||||
try:
|
||||
del(tresult[okey][x][tkey])
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
del(tresult[okey][x])
|
||||
except:
|
||||
pass
|
||||
print json.dumps(tresult,
|
||||
sort_keys=True,
|
||||
indent=2,
|
||||
separators=(',', ': '))
|
||||
|
||||
def print_result_tabular(result, result_filter=None):
|
||||
toprow = None
|
||||
printer = None
|
||||
|
|
@ -183,6 +218,10 @@ class CloudMonkeyShell(cmd.Cmd, object):
|
|||
self.monkeyprint(printer)
|
||||
|
||||
def print_result_as_dict(result, result_filter=None):
|
||||
if self.display == "json":
|
||||
print_result_json(result, result_filter)
|
||||
return
|
||||
|
||||
for key in sorted(result.keys(), key=lambda x:
|
||||
x not in ['id', 'count', 'name'] and x):
|
||||
if not (isinstance(result[key], list) or
|
||||
|
|
@ -194,8 +233,7 @@ class CloudMonkeyShell(cmd.Cmd, object):
|
|||
|
||||
def print_result_as_list(result, result_filter=None):
|
||||
for node in result:
|
||||
# Tabular print if it's a list of dict and tabularize is true
|
||||
if isinstance(node, dict) and self.tabularize == 'true':
|
||||
if isinstance(node, dict) and self.display == 'table':
|
||||
print_result_tabular(result, result_filter)
|
||||
break
|
||||
self.print_result(node)
|
||||
|
|
@ -318,7 +356,8 @@ class CloudMonkeyShell(cmd.Cmd, object):
|
|||
autocompletions = uuids
|
||||
search_string = value
|
||||
|
||||
if self.tabularize == "true" and subject != "":
|
||||
if subject != "" and (self.display == "table" or
|
||||
self.display == "json"):
|
||||
autocompletions.append("filter=")
|
||||
return [s for s in autocompletions if s.startswith(search_string)]
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ config_fields['core']['log_file'] = expanduser(config_dir + '/log')
|
|||
# ui
|
||||
config_fields['ui']['color'] = 'true'
|
||||
config_fields['ui']['prompt'] = '> '
|
||||
config_fields['ui']['tabularize'] = 'false'
|
||||
config_fields['ui']['display'] = 'default'
|
||||
|
||||
# server
|
||||
config_fields['server']['host'] = 'localhost'
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ try:
|
|||
import types
|
||||
import urllib
|
||||
import urllib2
|
||||
from urllib2 import urlopen, HTTPError, URLError
|
||||
|
||||
except ImportError, e:
|
||||
print "Import error in %s : %s" % (__name__, e)
|
||||
|
|
@ -77,19 +78,21 @@ def make_request(command, args, logger, host, port,
|
|||
logger_debug(logger, "Request sent: %s" % request_url)
|
||||
connection = urllib2.urlopen(request_url)
|
||||
response = connection.read()
|
||||
except Exception, e:
|
||||
error = str(e)
|
||||
except HTTPError, e:
|
||||
error = "%s: %s" % (e.msg, e.info().getheader('X-Description'))
|
||||
except URLError, e:
|
||||
error = e.reason
|
||||
|
||||
logger_debug(logger, "Response received: %s" % response)
|
||||
if error is not None:
|
||||
logger_debug(logger, error)
|
||||
logger_debug(logger, "Error: %s" % (error))
|
||||
return response, error
|
||||
|
||||
return response, error
|
||||
|
||||
|
||||
def monkeyrequest(command, args, isasync, asyncblock, logger, host, port,
|
||||
apikey, secretkey, timeout, protocol, path):
|
||||
|
||||
response = None
|
||||
error = None
|
||||
logger_debug(logger, "======== START Request ========")
|
||||
|
|
@ -106,7 +109,8 @@ def monkeyrequest(command, args, isasync, asyncblock, logger, host, port,
|
|||
response = json.loads(str(response))
|
||||
except ValueError, e:
|
||||
error = "Error processing json response, %s" % e
|
||||
logger_debug(logger, "Error processing json", e)
|
||||
logger_debug(logger, "Error processing json: %s" % e)
|
||||
|
||||
return response
|
||||
|
||||
response = process_json(response)
|
||||
|
|
@ -125,29 +129,62 @@ def monkeyrequest(command, args, isasync, asyncblock, logger, host, port,
|
|||
progress = 1
|
||||
while timeout > 0:
|
||||
print '\r' + '.' * progress,
|
||||
time.sleep(pollperiod)
|
||||
timeout = timeout - pollperiod
|
||||
sys.stdout.flush()
|
||||
progress += 1
|
||||
timeout = timeout - pollperiod
|
||||
logger_debug(logger, "Job %s to timeout in %ds" % (jobid, timeout))
|
||||
sys.stdout.flush()
|
||||
response, error = monkeyrequest(command, request, isasync,
|
||||
asyncblock, logger,
|
||||
host, port, apikey, secretkey,
|
||||
timeout, protocol, path)
|
||||
response = process_json(response)
|
||||
if re.match("queryAsyncJobResult", command):
|
||||
time.sleep(pollperiod)
|
||||
else:
|
||||
response, error = monkeyrequest(command, request, isasync,
|
||||
asyncblock, logger,
|
||||
host, port, apikey, secretkey,
|
||||
timeout, protocol, path)
|
||||
|
||||
responsekeys = filter(lambda x: 'response' in x, response.keys())
|
||||
|
||||
if len(responsekeys) < 1:
|
||||
time.sleep(pollperiod)
|
||||
continue
|
||||
|
||||
result = response[responsekeys[0]]
|
||||
jobstatus = result['jobstatus']
|
||||
if jobstatus == 2:
|
||||
jobresultcode = result['jobresultcode']
|
||||
try:
|
||||
jobresult = result["jobresult"]
|
||||
logger_debug(logger, "jobresult %s" % (jobresult))
|
||||
sys.stdout.flush()
|
||||
return response, None
|
||||
except KeyError:
|
||||
logger_debug(logger, "No jobresult yet %s" % (result))
|
||||
sys.stdout.flush()
|
||||
|
||||
if jobresultcode != 0:
|
||||
error = "Error: resultcode %d for jobid %s" % (jobresultcode,
|
||||
jobid)
|
||||
logger_debug(logger, "%s" % (error))
|
||||
return response, error
|
||||
else:
|
||||
# if we get a valid respons resultcode give back results
|
||||
response, error = monkeyrequest(command, request, isasync,
|
||||
asyncblock, logger,
|
||||
host, port, apikey, secretkey,
|
||||
timeout, protocol, path)
|
||||
logger_debug(logger, "Ok: %s" % (jobid))
|
||||
return response, error
|
||||
|
||||
if jobstatus == 2:
|
||||
error = "\rAsync job %s failed\nError %s, %s" % (jobid,
|
||||
jobresult["errorcode"], jobresult["errortext"])
|
||||
return response, error
|
||||
elif jobstatus == 1:
|
||||
print '\r',
|
||||
return response, error
|
||||
else:
|
||||
logger_debug(logger, "We should not arrive here!")
|
||||
sys.stdout.flush()
|
||||
|
||||
error = "Error: Async query timeout occurred for jobid %s" % jobid
|
||||
|
||||
return response, error
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
# 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.
|
||||
|
||||
import Options, Utils
|
||||
import os
|
||||
|
||||
def detect(conf):
|
||||
conf.check_message_1('Detecting JAVADIR')
|
||||
javadir = getattr(Options.options, 'JAVADIR', '')
|
||||
if javadir:
|
||||
conf.env.JAVADIR = javadir
|
||||
conf.check_message_2("%s (forced through --javadir)"%conf.env.JAVADIR,"GREEN")
|
||||
else:
|
||||
conf.env.JAVADIR = os.path.join(conf.env.DATADIR,'java')
|
||||
conf.check_message_2("%s (using default ${DATADIR}/java directory)"%conf.env.JAVADIR,"GREEN")
|
||||
|
||||
def set_options(opt):
|
||||
inst_dir = opt.get_option_group('--datadir') # get the group that contains bindir
|
||||
if not inst_dir: raise Utils.WafError, "DATADIR not set. Did you load the gnu_dirs tool options with opt.tool_options('gnu_dirs') before running opt.tool_options('javadir')?"
|
||||
inst_dir.add_option('--javadir', # add javadir to the group that contains bindir
|
||||
help = 'Java class and jar files [Default: ${DATADIR}/java]',
|
||||
default = '',
|
||||
dest = 'JAVADIR')
|
||||
|
|
@ -1,84 +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.
|
||||
import Utils
|
||||
from TaskGen import feature, before
|
||||
from Configure import ConfigurationError
|
||||
import Task
|
||||
import os
|
||||
|
||||
# fixme: this seems to hang waf with 100% CPU
|
||||
|
||||
def detect(conf):
|
||||
conf.find_program("mkisofs",var='MKISOFS')
|
||||
if not conf.env.MKISOFS: conf.find_program("genisoimage",mandatory=True,var='MKISOFS')
|
||||
|
||||
def iso_up(task):
|
||||
tgt = task.outputs[0].bldpath(task.env)
|
||||
if os.path.exists(tgt): os.unlink(tgt)
|
||||
inps = []
|
||||
for inp in task.inputs:
|
||||
if inp.id&3==Node.BUILD:
|
||||
src = inp.bldpath(task.env)
|
||||
srcname = src
|
||||
srcname = sep.join(srcname.split(sep)[1:]) # chop off default/
|
||||
else:
|
||||
src = inp.srcpath(task.env)
|
||||
srcname = src
|
||||
srcname = sep.join(srcname.split(sep)[1:]) # chop off ../
|
||||
if task.generator.rename: srcname = task.generator.rename(srcname)
|
||||
inps.append(srcname+'='+src)
|
||||
ret = Utils.exec_command(
|
||||
[
|
||||
task.generator.env.MKISOFS,
|
||||
"-quiet",
|
||||
"-r",
|
||||
"-graft-points",
|
||||
"-o",tgt,
|
||||
] + inps, shell=False)
|
||||
if ret != 0: return ret
|
||||
|
||||
def apply_iso(self):
|
||||
Utils.def_attrs(self,fun=iso_up)
|
||||
self.default_install_path=0
|
||||
lst=self.to_list(self.source)
|
||||
self.meths.remove('apply_core')
|
||||
self.dict=getattr(self,'dict',{})
|
||||
out = self.path.find_or_declare(self.target)
|
||||
ins = []
|
||||
for x in Utils.to_list(self.source):
|
||||
node = self.path.find_resource(x)
|
||||
if not node:raise Utils.WafError('cannot find input file %s for processing'%x)
|
||||
ins.append(node)
|
||||
if self.dict and not self.env['DICT_HASH']:
|
||||
self.env=self.env.copy()
|
||||
keys=list(self.dict.keys())
|
||||
keys.sort()
|
||||
lst=[self.dict[x]for x in keys]
|
||||
self.env['DICT_HASH']=str(Utils.h_list(lst))
|
||||
tsk=self.create_task('iso',ins,out)
|
||||
tsk.fun=self.fun
|
||||
tsk.dict=self.dict
|
||||
tsk.dep_vars=['DICT_HASH']
|
||||
tsk.install_path=self.install_path
|
||||
tsk.chmod=self.chmod
|
||||
if not tsk.env:
|
||||
tsk.debug()
|
||||
raise Utils.WafError('task without an environment')
|
||||
|
||||
Task.task_type_from_func('iso',func=iso_up)
|
||||
feature('iso')(apply_iso)
|
||||
before('apply_core')(apply_iso)
|
||||
|
|
@ -1,79 +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.
|
||||
import Utils
|
||||
import Options
|
||||
import tarfile
|
||||
from TaskGen import feature, before
|
||||
import Task
|
||||
import os, sys
|
||||
|
||||
# construct a tar file containing them
|
||||
# for as long as the build node appears later than the source node (this is an implementation detail of waf we are relying on)
|
||||
def tar_up(task):
|
||||
tgt = task.outputs[0].bldpath(task.env)
|
||||
if os.path.exists(tgt): os.unlink(tgt)
|
||||
if tgt.lower().endswith(".bz2"): z = tarfile.open(tgt,"w:bz2")
|
||||
elif tgt.lower().endswith(".gz"): z = tarfile.open(tgt,"w:gz")
|
||||
elif tgt.lower().endswith(".tgz"): z = tarfile.open(tgt,"w:gz")
|
||||
else: z = tarfile.open(tgt,"w")
|
||||
fileset = {}
|
||||
for inp in task.inputs:
|
||||
src = inp.srcpath(task.env)
|
||||
if src.startswith(".."):
|
||||
srcname = Utils.relpath(src,os.path.join("..",".")) # file in source dir
|
||||
else:
|
||||
srcname = Utils.relpath(src,os.path.join(task.env.variant(),".")) # file in artifacts dir
|
||||
srcname = srcname.split(os.path.sep,len(task.generator.root.split(os.path.sep)))[-1]
|
||||
if task.generator.rename: srcname = task.generator.rename(srcname)
|
||||
fileset[srcname] = src
|
||||
for srcname,src in fileset.items():
|
||||
ti = tarfile.TarInfo(srcname)
|
||||
ti.mode = 0755
|
||||
ti.size = os.path.getsize(src)
|
||||
openmode = 'r'
|
||||
if Options.platform == 'win32': openmode = openmode + 'b'
|
||||
f = file(src,openmode)
|
||||
z.addfile(ti,fileobj=f)
|
||||
f.close()
|
||||
z.close()
|
||||
if task.chmod: os.chmod(tgt,task.chmod)
|
||||
return 0
|
||||
|
||||
def apply_tar(self):
|
||||
Utils.def_attrs(self,fun=tar_up)
|
||||
self.default_install_path=0
|
||||
lst=self.to_list(self.source)
|
||||
self.meths.remove('apply_core')
|
||||
self.dict=getattr(self,'dict',{})
|
||||
out = self.path.find_or_declare(self.target)
|
||||
ins = []
|
||||
for x in Utils.to_list(self.source):
|
||||
node = self.path.find_resource(x)
|
||||
if not node:raise Utils.WafError('cannot find input file %s for processing'%x)
|
||||
ins.append(node)
|
||||
tsk=self.create_task('tar',ins,out)
|
||||
tsk.fun=self.fun
|
||||
tsk.dict=self.dict
|
||||
tsk.install_path=self.install_path
|
||||
tsk.chmod=self.chmod
|
||||
if not tsk.env:
|
||||
tsk.debug()
|
||||
raise Utils.WafError('task without an environment')
|
||||
|
||||
Task.task_type_from_func('tar',func=tar_up)
|
||||
feature('tar')(apply_tar)
|
||||
before('apply_core')(apply_tar)
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
# 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.
|
||||
|
||||
import Options, Utils
|
||||
import os
|
||||
|
||||
def detect(conf):
|
||||
if not conf.env.DATADIR:
|
||||
conf.fatal("DATADIR not found in the environment. Did you run conf.check_tool('gnu_dirs') before running check_tool('tomcat')?")
|
||||
conf.check_message_1('Detecting Tomcat')
|
||||
conf.env.TOMCATHOME = ''
|
||||
tomcathome = getattr(Options.options, 'TOMCATHOME', '')
|
||||
if tomcathome:
|
||||
conf.env.TOMCATHOME = tomcathome
|
||||
method = "forced through --with-tomcat"
|
||||
else:
|
||||
if "TOMCAT_HOME" in conf.environ and conf.environ['TOMCAT_HOME'].strip():
|
||||
conf.env.TOMCATHOME = conf.environ["TOMCAT_HOME"]
|
||||
method = 'got through environment variable %TOMCAT_HOME%'
|
||||
elif "CATALINA_HOME" in conf.environ and conf.environ['CATALINA_HOME'].strip():
|
||||
conf.env.TOMCATHOME = conf.environ['CATALINA_HOME']
|
||||
method = 'got through environment variable %CATALINA_HOME%'
|
||||
elif os.path.isdir(os.path.join(conf.env.DATADIR,"tomcat6")):
|
||||
conf.env.TOMCATHOME = os.path.join(conf.env.DATADIR,"tomcat6")
|
||||
method = 'detected existence of Tomcat directory under $DATADIR'
|
||||
elif os.path.isdir("/usr/share/tomcat6"):
|
||||
conf.env.TOMCATHOME = "/usr/share/tomcat6"
|
||||
method = 'detected existence of standard Linux system directory'
|
||||
if not conf.env.TOMCATHOME:
|
||||
conf.fatal("Could not detect Tomcat")
|
||||
elif not os.path.isdir(conf.env.TOMCATHOME):
|
||||
conf.fatal("Tomcat cannot be found at %s"%conf.env.TOMCATHOME)
|
||||
else:
|
||||
conf.check_message_2("%s (%s)"%(conf.env.TOMCATHOME,method),"GREEN")
|
||||
|
||||
def set_options(opt):
|
||||
inst_dir = opt.get_option_group('--datadir') # get the group that contains bindir
|
||||
if not inst_dir: raise Utils.WafError, "DATADIR not set. Did you load the gnu_dirs tool options with opt.tool_options('gnu_dirs') before running opt.tool_options('tomcat')?"
|
||||
inst_dir.add_option('--with-tomcat', # add javadir to the group that contains bindir
|
||||
help = 'Path to installed Tomcat 6 environment [Default: ${DATADIR}/tomcat6 (unless %%CATALINA_HOME%% is set)]',
|
||||
default = '',
|
||||
dest = 'TOMCATHOME')
|
||||
|
|
@ -1,140 +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.
|
||||
import Utils, Build
|
||||
from TaskGen import feature, before
|
||||
from Configure import ConfigurationError
|
||||
import Options
|
||||
import Task
|
||||
import os
|
||||
|
||||
def detect(conf):
|
||||
if Options.platform == 'win32': raise Utils.WafError('the usermgmt tool only works on Linux')
|
||||
if Options.platform == 'darwin': raise Utils.WafError('the usermgmt tool only works on Linux')
|
||||
path_list = ["/usr/local/sbin","/usr/sbin","/sbin"] + os.environ.get('PATH','').split(os.pathsep)
|
||||
conf.find_program("useradd",var='USERADD',mandatory=True,path_list=path_list)
|
||||
conf.find_program("userdel",var='USERDEL',mandatory=True,path_list=path_list)
|
||||
|
||||
def set_options(opt):
|
||||
if Options.platform == 'win32': raise Utils.WafError('the usermgmt tool only works on Linux')
|
||||
if Options.platform == 'darwin': raise Utils.WafError('the usermgmt tool only works on Linux')
|
||||
og = opt.get_option_group('--force')
|
||||
og.add_option('--nochown',
|
||||
action = 'store_true',
|
||||
help = 'do not create or remove user accounts or change file ownership on installed files',
|
||||
default = False,
|
||||
dest = 'NOUSERMGMT')
|
||||
|
||||
def _subst_add_destdir(x,bld):
|
||||
a = "${DESTDIR}" + x
|
||||
a = a.replace("${DESTDIR}",Options.options.destdir)
|
||||
a = Utils.subst_vars(a,bld.env)
|
||||
if a.startswith("//"): a = a[1:]
|
||||
return a
|
||||
Build.BuildContext.subst_add_destdir = staticmethod(_subst_add_destdir)
|
||||
|
||||
def _setownership(ctx,path,owner,group,mode=None):
|
||||
if Options.platform == 'win32': return
|
||||
if Options.platform == 'darwin': return
|
||||
if not hasattr(os,"getuid"): return
|
||||
if os.getuid() != 0: return
|
||||
if Options.options.NOUSERMGMT: return
|
||||
|
||||
import pwd
|
||||
import grp
|
||||
import stat
|
||||
from os import chown as _chown, chmod as _chmod
|
||||
|
||||
def f(bld,path,owner,group,mode):
|
||||
|
||||
try: uid = pwd.getpwnam(owner).pw_uid
|
||||
except KeyError,e:
|
||||
raise Utils.WafError("Before using setownership() you have to create the user with bld.createuser(username...)")
|
||||
try: gid = grp.getgrnam(group).gr_gid
|
||||
except KeyError,e:
|
||||
raise Utils.WafError("Before using setownership() you have to create the user with bld.createuser(username...)")
|
||||
|
||||
path = bld.subst_add_destdir(path,bld)
|
||||
current_uid,current_gid = os.stat(path).st_uid,os.stat(path).st_gid
|
||||
if current_uid != uid:
|
||||
Utils.pprint("GREEN","* setting owner of %s to UID %s"%(path,uid))
|
||||
_chown(path,uid,current_gid)
|
||||
current_uid = uid
|
||||
if current_gid != gid:
|
||||
Utils.pprint("GREEN","* setting group of %s to GID %s"%(path,gid))
|
||||
_chown(path,current_uid,gid)
|
||||
current_gid = gid
|
||||
if mode is not None:
|
||||
current_mode = stat.S_IMODE(os.stat(path).st_mode)
|
||||
if current_mode != mode:
|
||||
Utils.pprint("GREEN","* adjusting permissions on %s to mode %o"%(path,mode))
|
||||
_chmod(path,mode)
|
||||
current_mode = mode
|
||||
|
||||
if ctx.is_install > 0:
|
||||
ctx.add_post_fun(lambda ctx: f(ctx,path,owner,group,mode))
|
||||
Build.BuildContext.setownership = _setownership
|
||||
|
||||
def _createuser(ctx,user,homedir,shell):
|
||||
if Options.platform == 'win32': return
|
||||
if Options.platform == 'darwin': return
|
||||
if not hasattr(os,"getuid"): return
|
||||
if os.getuid() != 0: return
|
||||
if Options.options.NOUSERMGMT: return
|
||||
|
||||
def f(ctx,user,homedir,shell):
|
||||
import pwd
|
||||
try:
|
||||
pwd.getpwnam(user).pw_uid
|
||||
user_exists = True
|
||||
except KeyError,e:
|
||||
user_exists = False
|
||||
if user_exists: return
|
||||
|
||||
Utils.pprint("GREEN","* creating user %s"%user)
|
||||
cmd = [
|
||||
ctx.env.USERADD,
|
||||
'-M',
|
||||
'-r',
|
||||
'-s',shell,
|
||||
'-d',homedir,
|
||||
user,
|
||||
]
|
||||
ret = Utils.exec_command(cmd)
|
||||
if ret: raise Utils.WafError("Failed to run command %s"%cmd)
|
||||
|
||||
def g(ctx,user,homedir,shell):
|
||||
import pwd
|
||||
try:
|
||||
pwd.getpwnam(user).pw_uid
|
||||
user_exists = True
|
||||
except KeyError,e:
|
||||
user_exists = False
|
||||
if not user_exists: return
|
||||
|
||||
Utils.pprint("GREEN","* removing user %s"%user)
|
||||
cmd = [
|
||||
ctx.env.USERDEL,
|
||||
user,
|
||||
]
|
||||
ret = Utils.exec_command(cmd)
|
||||
if ret: raise Utils.WafError("Failed to run command %s"%cmd)
|
||||
|
||||
if ctx.is_install > 0:
|
||||
ctx.add_pre_fun(lambda ctx: f(ctx,user,homedir,shell))
|
||||
elif ctx.is_install < 0:
|
||||
ctx.add_pre_fun(lambda ctx: g(ctx,user,homedir,shell))
|
||||
Build.BuildContext.createuser = _createuser
|
||||
|
|
@ -180,70 +180,6 @@ Copyright (c) 2013 The Apache Software Foundation
|
|||
|
||||
|
||||
This distribution contains third party resources.
|
||||
Within the . directory
|
||||
licensed under the BSD (3-clause) http://www.opensource.org/licenses/BSD-3-Clause (as follows)
|
||||
|
||||
Copyright (c) 2005-2010 Thomas Nagy
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from Thomas Nagy http://code.google.com/p/waf/
|
||||
waf
|
||||
|
||||
Within the awsapi directory
|
||||
licensed under the BSD (3-clause) http://www.opensource.org/licenses/BSD-3-Clause (as follows)
|
||||
|
||||
Copyright (c) 2005-2010 Thomas Nagy
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from Thomas Nagy http://code.google.com/p/waf/
|
||||
waf
|
||||
|
||||
Within the console-proxy/js directory
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
|
|
|
|||
|
|
@ -2275,10 +2275,6 @@ Innovation Centre, 2006 (http://www.it-innovation.soton.ac.uk).
|
|||
id='apache.org.2'
|
||||
name='The Apache Software Foundation'
|
||||
url='http://www.apache.org/'/>
|
||||
<organisation
|
||||
id='person:Thomas.Nagy'
|
||||
name='Thomas Nagy'
|
||||
url='http://code.google.com/p/waf/'/>
|
||||
<organisation
|
||||
id='person:Clinton.Begin'
|
||||
name='Clinton Begin'
|
||||
|
|
@ -2456,16 +2452,6 @@ This product includes software developed at
|
|||
The Apache Software Foundation (http://www.apache.org/).
|
||||
</primary-notice>
|
||||
<primary-organisation id='apache.org'/>
|
||||
<within dir='.'>
|
||||
<with-license id='BSD3ClauseGeneric'>
|
||||
<copyright-notice>
|
||||
Copyright (c) 2005-2010 Thomas Nagy
|
||||
</copyright-notice>
|
||||
<by-organisation id="person:Thomas.Nagy">
|
||||
<resource name="waf"/>
|
||||
</by-organisation>
|
||||
</with-license>
|
||||
</within>
|
||||
<within dir='patches/systemvm/debian/config/etc/apache2'>
|
||||
<with-license id='ApacheLicenseVersion2'>
|
||||
<copyright-notice>
|
||||
|
|
@ -2646,16 +2632,6 @@ Copyright (c) 2012 John Resig, Jörn Zaefferer
|
|||
</by-organisation>
|
||||
</with-license>
|
||||
</within>
|
||||
<within dir='awsapi'>
|
||||
<with-license id='BSD3ClauseGeneric'>
|
||||
<copyright-notice>
|
||||
Copyright (c) 2005-2010 Thomas Nagy
|
||||
</copyright-notice>
|
||||
<by-organisation id="person:Thomas.Nagy">
|
||||
<resource name="waf"/>
|
||||
</by-organisation>
|
||||
</with-license>
|
||||
</within>
|
||||
<within dir='utils/src/com/cloud/utils/db'>
|
||||
<with-license id='ApacheLicenseVersion2'>
|
||||
<copyright-notice>
|
||||
|
|
|
|||
|
|
@ -2271,10 +2271,6 @@ Innovation Centre, 2006 (http://www.it-innovation.soton.ac.uk).
|
|||
id='apache.org.2'
|
||||
name='The Apache Software Foundation'
|
||||
url='http://www.apache.org/'/>
|
||||
<organisation
|
||||
id='person:Thomas.Nagy'
|
||||
name='Thomas Nagy'
|
||||
url='http://code.google.com/p/waf/'/>
|
||||
<organisation
|
||||
id='person:Clinton.Begin'
|
||||
name='Clinton Begin'
|
||||
|
|
@ -2440,16 +2436,6 @@ This product includes software developed at
|
|||
The Apache Software Foundation (http://www.apache.org/).
|
||||
</primary-notice>
|
||||
<primary-organisation id='apache.org'/>
|
||||
<within dir='.'>
|
||||
<with-license id='BSD3ClauseGeneric'>
|
||||
<copyright-notice>
|
||||
Copyright (c) 2005-2010 Thomas Nagy
|
||||
</copyright-notice>
|
||||
<by-organisation id="person:Thomas.Nagy">
|
||||
<resource name="waf"/>
|
||||
</by-organisation>
|
||||
</with-license>
|
||||
</within>
|
||||
<within dir='patches/systemvm/debian/config/etc/apache2'>
|
||||
<with-license id='ApacheLicenseVersion2'>
|
||||
<copyright-notice>
|
||||
|
|
@ -2630,16 +2616,6 @@ Copyright (c) 2012 John Resig, Jörn Zaefferer
|
|||
</by-organisation>
|
||||
</with-license>
|
||||
</within>
|
||||
<within dir='awsapi'>
|
||||
<with-license id='BSD3ClauseGeneric'>
|
||||
<copyright-notice>
|
||||
Copyright (c) 2005-2010 Thomas Nagy
|
||||
</copyright-notice>
|
||||
<by-organisation id="person:Thomas.Nagy">
|
||||
<resource name="waf"/>
|
||||
</by-organisation>
|
||||
</with-license>
|
||||
</within>
|
||||
<within dir='utils/src/com/cloud/utils/db'>
|
||||
<with-license id='ApacheLicenseVersion2'>
|
||||
<copyright-notice>
|
||||
|
|
|
|||
|
|
@ -11796,7 +11796,8 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
|
|||
background-position: -168px -31px;
|
||||
}
|
||||
|
||||
.reset .icon {
|
||||
.reset .icon ,
|
||||
.scaleUp .icon{
|
||||
background-position: -168px -31px;
|
||||
}
|
||||
|
||||
|
|
@ -11805,7 +11806,8 @@ div.ui-dialog div.autoscaler div.field-group div.form-container form div.form-it
|
|||
background-position: -168px -613px;
|
||||
}
|
||||
|
||||
.reset:hover .icon {
|
||||
.reset:hover .icon,
|
||||
.scaleUp:hover .icon {
|
||||
background-position: -168px -613px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1080,6 +1080,44 @@
|
|||
}
|
||||
},
|
||||
|
||||
scaleUp:{
|
||||
label:'scaleUp VM',
|
||||
action: function(args) {
|
||||
$.ajax({
|
||||
url: createURL("scaleVirtualMachine&id=" + args.context.instances[0].id),
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function(json) {
|
||||
var jid = json.scaleupvirtualmachineresponse.jobid;
|
||||
args.response.success(
|
||||
{_custom:
|
||||
{jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
return json.queryasyncjobresultresponse.jobresult.virtualmachine;
|
||||
},
|
||||
getActionFilter: function() {
|
||||
return vmActionfilter;
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
messages: {
|
||||
confirm: function(args) {
|
||||
return 'Do you really want to scale Up your instance ?';
|
||||
},
|
||||
notification: function(args) {
|
||||
return 'Instance Scaled Up';
|
||||
}
|
||||
},
|
||||
notification: {
|
||||
poll: pollAsyncJobResult
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
viewConsole: {
|
||||
label: 'label.view.console',
|
||||
action: {
|
||||
|
|
@ -1337,6 +1375,7 @@
|
|||
allowedActions.push("destroy");
|
||||
allowedActions.push("changeService");
|
||||
allowedActions.push("reset");
|
||||
allowedActions.push("scaleUp");
|
||||
|
||||
if (isAdmin())
|
||||
allowedActions.push("migrate");
|
||||
|
|
@ -1360,6 +1399,8 @@
|
|||
allowedActions.push("destroy");
|
||||
allowedActions.push("reset");
|
||||
allowedActions.push("snapshot");
|
||||
allowedActions.push("scaleUp");
|
||||
|
||||
if(isAdmin())
|
||||
allowedActions.push("migrateToAnotherStorage");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue