Skip to content

Commit 49cdc23

Browse files
author
prachi
committed
merge awsapi build script changes to master
1 parent 3fd17ae commit 49cdc23

19 files changed

+726
-9
lines changed

build.xml

+1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@
2727
<import file="${base.dir}/build/package.xml" optional="true"/>
2828
<import file="${base.dir}/build/developer.xml" optional="true"/>
2929
<import file="${base.dir}/build/build-usage.xml" optional="false"/>
30+
<import file="${base.dir}/build/build-aws-api.xml" optional="false"/>
3031
</project>

build/build-aws-api.properties

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
company.major.version=1
2+
company.minor.version=0
3+
company.patch.version=8
4+
5+
target.compat.version=1.6
6+
source.compat.version=1.6
7+
8+
debug=true
9+
build.type=developer
10+
debuglevel=lines,source,vars
11+
deprecation=off
12+

build/build-aws-api.xml

+440
Large diffs are not rendered by default.

build/build-cloud.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@
493493

494494
<target name="compile-all" description="Compile all of the jars" depends="compile-utils, compile-api, compile-core, compile-server, compile-ovm"/>
495495

496-
<target name="clean-all" depends="clean" description="Clean all of the generated files, including dependency cache and javadoc">
496+
<target name="clean-all" depends="clean, clean-awsapi" description="Clean all of the generated files, including dependency cache and javadoc">
497497
<delete dir="${target.dir}" />
498498
</target>
499499
</project>

build/build-common.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<depend srcdir="@{top.dir}/src" destdir="${classes.dir}/@{jar.name}" cache="${dep.cache.dir}" />
4747

4848
<echo message="Compiling @{top.dir}/src"/>
49-
<javac srcdir="@{top.dir}/src" debug="${debug}" debuglevel="${debuglevel}" deprecation="${deprecation}" destdir="${classes.dir}/@{jar.name}" source="${source.compat.version}" target="${target.compat.version}" includeantruntime="false" compiler="javac1.6">
49+
<javac srcdir="@{top.dir}/src" debug="${debug}" debuglevel="${debuglevel}" deprecation="${deprecation}" destdir="${classes.dir}/@{jar.name}" source="${source.compat.version}" target="${target.compat.version}" includeantruntime="false" compiler="javac1.6" memoryinitialsize="512m" memorymaximumsize="1024m" fork="true">
5050
<!-- compilerarg line="-processor com.cloud.annotation.LocalProcessor -processorpath ${base.dir}/tools/src -Xlint:all"/ -->
5151
<!-- compilerarg line="-processor com.cloud.utils.LocalProcessor -processorpath ${base.dir}/utils/src -Xlint:all"/ -->
5252
<compilerarg line="-Xlint:-path"/>

build/developer.xml

+6-3
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
</java>
126126
</target>
127127

128-
<target name="clean-tomcat" depends="stop-tomcat">
128+
<target name="clean-tomcat" depends="stop-tomcat,clean-awsapi-tomcat">
129129
<delete dir="${tomcat.home}/webapps/client"/>
130130
<delete dir="${tomcat.home}/webapps/awsapi" />
131131
<delete dir="${tomcat.home}/work/Catalina"/>
@@ -154,7 +154,7 @@
154154
</copy>
155155
</target>
156156

157-
<target name="deploy-server" depends="deploy-common, deploy-ovm" >
157+
<target name="deploy-server" depends="deploy-common, deploy-ovm, deploy-awsapi" >
158158
<copy todir="${server.deploy.to.dir}/webapps/client/WEB-INF/lib/vms" file="${dist.dir}/systemvm.iso" />
159159
</target>
160160

@@ -216,7 +216,7 @@
216216
</copy>
217217
</target>
218218

219-
<target name="deploydb">
219+
<target name="deploy-cloudstack-db">
220220
<condition property="server-setup.file" value="override/server-setup.xml" else="server-setup.xml">
221221
<available file="${setup.db.dir}/override/server-setup.xml" />
222222
</condition>
@@ -241,6 +241,9 @@
241241
</chmod>
242242
</target>
243243

244+
<target name="deploydb" depends="deploy-cloudstack-db, deploy-awsapi-db">
245+
</target>
246+
244247
<target name="deploydb-simulator">
245248
<condition property="server-setup.file" value="${setup.db.dir}/override/server-setup.xml" else="server-setup.xml">
246249
<available file="${setup.db.dir}/override/server-setup.xml" />

build/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
</zip>
140140
</target>
141141

142-
<target name="build-all" depends="build-opensource, build-ui, build-war-oss, compile-testclient, compile-usage">
142+
<target name="build-all" depends="build-opensource, build-ui, build-war-oss, compile-testclient, compile-usage, build-awsapi">
143143
</target>
144144

145145
<target name="build-all-with-simulator" depends="build-all, compile-agent-simulator">

build/replace.properties

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ AGENTLOGDIR=logs
77
AGENTLOG=logs/agent.log
88
MSMNTDIR=/mnt
99
COMPONENTS-SPEC=components-premium.xml
10+
AWSAPILOG=awsapi.log

client/tomcatconf/commands.properties.in

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ disableAccount=com.cloud.api.commands.DisableAccountCmd;7
99
enableAccount=com.cloud.api.commands.EnableAccountCmd;7
1010
###lockAccount=com.cloud.api.commands.LockAccountCmd;7
1111
listAccounts=com.cloud.api.commands.ListAccountsCmd;15
12+
markDefaultZoneForAccount=com.cloud.api.commands.MarkDefaultZoneForAccountCmd;1
1213

1314
#### User commands
1415
createUser=com.cloud.api.commands.CreateUserCmd;3

client/tomcatconf/db.properties.in

+3
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@ db.usage.maxActive=100
4949
db.usage.maxIdle=30
5050
db.usage.maxWait=10000
5151
db.usage.autoReconnect=true
52+
53+
# awsapi database settings
54+
db.awsapi.name=cloudbridge

client/tomcatconf/log4j-cloud.xml.in

+29
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@
3333
</layout>
3434
</appender>
3535

36+
<appender name="AWSAPI" class="org.apache.log4j.rolling.RollingFileAppender">
37+
<param name="Append" value="true"/>
38+
<param name="Threshold" value="DEBUG"/>
39+
<rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
40+
<param name="FileNamePattern" value="@AWSAPILOG@.%d{yyyy-MM-dd}.gz"/>
41+
<param name="ActiveFileName" value="@AWSAPILOG@"/>
42+
</rollingPolicy>
43+
<layout class="org.apache.log4j.EnhancedPatternLayout">
44+
<param name="ConversionPattern" value="%d{ISO8601} %-5p [%c{3}] (%t:%x) %m%n"/>
45+
</layout>
46+
</appender>
3647
<!-- ============================== -->
3748
<!-- Append warnings+ to the syslog if it is listening on UDP port FIXME make sysloghost configurable! -->
3849
<!-- ============================== -->
@@ -92,6 +103,24 @@
92103
<appender-ref ref="APISERVER"/>
93104
</logger>
94105

106+
107+
<logger name="com.cloud.bridge" additivity="false">
108+
<level value="DEBUG"/>
109+
<appender-ref ref="AWSAPI"/>
110+
</logger>
111+
112+
<logger name="com.cloud.stack" additivity="false">
113+
<level value="DEBUG"/>
114+
<appender-ref ref="AWSAPI"/>
115+
</logger>
116+
117+
118+
<logger name="org.apache.axis2" additivity="false">
119+
<level value="INFO"/>
120+
<appender-ref ref="AWSAPI"/>
121+
</logger>
122+
123+
95124
<!-- ======================= -->
96125
<!-- Setup the Root category -->
97126
<!-- ======================= -->

client/tomcatconf/server-nonssl.xml

+9
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
5555
maxThreads="150" minSpareThreads="25"/>
5656

57+
<Executor name="tomcatThreadPool-internal" namePrefix="catalina-exec-int-"
58+
maxThreads="150" minSpareThreads="25"/>
5759

5860
<!-- A "Connector" represents an endpoint by which requests are received
5961
and responses are returned. Documentation at :
@@ -73,6 +75,13 @@
7375
connectionTimeout="20000" disableUploadTimeout="true"
7476
acceptCount="150" enableLookups="false" maxThreads="150"
7577
maxHttpHeaderSize="8192" redirectPort="8443" />
78+
79+
<Connector executor="tomcatThreadPool-internal" address="127.0.0.1"
80+
port="7080" protocol="org.apache.coyote.http11.Http11NioProtocol"
81+
connectionTimeout="20000" disableUploadTimeout="true"
82+
acceptCount="150" enableLookups="false" maxThreads="150"
83+
maxHttpHeaderSize="8192" redirectPort="8443" />
84+
7685
<!-- Define a SSL HTTP/1.1 Connector on port 8443
7786
This connector uses the JSSE configuration, when using APR, the
7887
connector should be using the OpenSSL style configuration

client/tomcatconf/server-ssl.xml.in

+9
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
5555
maxThreads="150" minSpareThreads="25"/>
5656

57+
<Executor name="tomcatThreadPool-internal" namePrefix="catalina-exec-int-"
58+
maxThreads="150" minSpareThreads="25"/>
5759

5860
<!-- A "Connector" represents an endpoint by which requests are received
5961
and responses are returned. Documentation at :
@@ -97,6 +99,13 @@
9799
keystoreFile="/etc/cloud/management/cloudmanagementserver.keystore"
98100
keystorePass="vmops.com"/>
99101

102+
<Connector executor="tomcatThreadPool-internal" address="127.0.0.1" port="5443" protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true"
103+
maxThreads="150" scheme="https" secure="true"
104+
clientAuth="false" sslProtocol="TLS"
105+
keystoreType="JKS"
106+
keystoreFile="/etc/cloud/management/cloudmanagementserver.keystore"
107+
keystorePass="vmops.com"/>
108+
100109
<!-- Define an AJP 1.3 Connector on port 20400 -->
101110
<Connector port="20400" protocol="AJP/1.3" redirectPort="6443" />
102111

client/tomcatconf/server.xml.in

+156
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
<?xml version='1.0' encoding='utf-8'?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one or more
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to You under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
<!-- Note: A "Server" is not itself a "Container", so you may not
19+
define subcomponents such as "Valves" at this level.
20+
Documentation at /docs/config/server.html
21+
-->
22+
<Server port="8005" shutdown="SHUTDOWN">
23+
24+
<!--APR library loader. Documentation at /docs/apr.html -->
25+
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
26+
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
27+
<Listener className="org.apache.catalina.core.JasperListener" />
28+
<!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
29+
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
30+
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
31+
32+
<!-- Global JNDI resources
33+
Documentation at /docs/jndi-resources-howto.html
34+
-->
35+
<GlobalNamingResources>
36+
<!-- Editable user database that can also be used by
37+
UserDatabaseRealm to authenticate users
38+
-->
39+
<Resource name="UserDatabase" auth="Container"
40+
type="org.apache.catalina.UserDatabase"
41+
description="User database that can be updated and saved"
42+
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
43+
pathname="conf/tomcat-users.xml" />
44+
</GlobalNamingResources>
45+
46+
<!-- A "Service" is a collection of one or more "Connectors" that share
47+
a single "Container" Note: A "Service" is not itself a "Container",
48+
so you may not define subcomponents such as "Valves" at this level.
49+
Documentation at /docs/config/service.html
50+
-->
51+
<Service name="Catalina">
52+
53+
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
54+
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
55+
maxThreads="150" minSpareThreads="25"/>
56+
57+
<Executor name="tomcatThreadPool-internal" namePrefix="catalina-exec-int-"
58+
maxThreads="150" minSpareThreads="25"/>
59+
60+
<!-- A "Connector" represents an endpoint by which requests are received
61+
and responses are returned. Documentation at :
62+
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
63+
Java AJP Connector: /docs/config/ajp.html
64+
APR (HTTP/AJP) Connector: /docs/apr.html
65+
Define a non-SSL HTTP/1.1 Connector on port 8080
66+
-->
67+
<!--
68+
<Connector port="8080" protocol="HTTP/1.1"
69+
connectionTimeout="20000"
70+
redirectPort="8443" />
71+
-->
72+
<!-- A "Connector" using the shared thread pool-->
73+
<Connector executor="tomcatThreadPool"
74+
port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
75+
connectionTimeout="20000" disableUploadTimeout="true"
76+
acceptCount="150" enableLookups="false" maxThreads="150"
77+
maxHttpHeaderSize="8192" redirectPort="8443" />
78+
79+
<Connector executor="tomcatThreadPool-internal" address="127.0.0.1"
80+
port="7080" protocol="org.apache.coyote.http11.Http11NioProtocol"
81+
connectionTimeout="20000" disableUploadTimeout="true"
82+
acceptCount="150" enableLookups="false" maxThreads="150"
83+
maxHttpHeaderSize="8192" redirectPort="8443" />
84+
85+
<!-- Define a SSL HTTP/1.1 Connector on port 8443
86+
This connector uses the JSSE configuration, when using APR, the
87+
connector should be using the OpenSSL style configuration
88+
described in the APR documentation -->
89+
<!--
90+
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
91+
maxThreads="150" scheme="https" secure="true"
92+
clientAuth="false" sslProtocol="TLS"
93+
keystoreType="PKCS12"
94+
keystoreFile="conf\cloud-localhost.pk12"
95+
keystorePass="password"
96+
/>
97+
-->
98+
99+
<!-- Define an AJP 1.3 Connector on port 20400 -->
100+
<Connector port="20400" protocol="AJP/1.3" redirectPort="8443" />
101+
102+
103+
<!-- An Engine represents the entry point (within Catalina) that processes
104+
every request. The Engine implementation for Tomcat stand alone
105+
analyzes the HTTP headers included with the request, and passes them
106+
on to the appropriate Host (virtual host).
107+
Documentation at /docs/config/engine.html -->
108+
109+
<!-- You should set jvmRoute to support load-balancing via AJP ie :
110+
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
111+
-->
112+
<Engine name="Catalina" defaultHost="localhost">
113+
114+
<!--For clustering, please take a look at documentation at:
115+
/docs/cluster-howto.html (simple how to)
116+
/docs/config/cluster.html (reference documentation) -->
117+
<!--
118+
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
119+
-->
120+
121+
<!-- The request dumper valve dumps useful debugging information about
122+
the request and response data received and sent by Tomcat.
123+
Documentation at: /docs/config/valve.html -->
124+
<!--
125+
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
126+
-->
127+
128+
<!-- This Realm uses the UserDatabase configured in the global JNDI
129+
resources under the key "UserDatabase". Any edits
130+
that are performed against this UserDatabase are immediately
131+
available for use by the Realm. -->
132+
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
133+
resourceName="UserDatabase"/>
134+
135+
<!-- Define the default virtual host
136+
Note: XML Schema validation will not work with Xerces 2.2.
137+
-->
138+
<Host name="localhost" appBase="webapps"
139+
unpackWARs="true" autoDeploy="true"
140+
xmlValidation="false" xmlNamespaceAware="false">
141+
142+
<!-- SingleSignOn valve, share authentication between web applications
143+
Documentation at: /docs/config/valve.html -->
144+
<!--
145+
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
146+
-->
147+
148+
<!-- Access log processes all example.
149+
Documentation at: /docs/config/valve.html -->
150+
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve" directory="logs"
151+
prefix="access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
152+
153+
</Host>
154+
</Engine>
155+
</Service>
156+
</Server>

0 commit comments

Comments
 (0)