Updated Branches: refs/heads/master 97d2e3fe7 -> cd65d26a9
debian: Further improve the usage server package We no longer symlink db.properties to the management server, but we create a own db.properties for the usage server. During a upgrade we copy the file to make the upgrade easier. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/cd65d26a Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/cd65d26a Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/cd65d26a Branch: refs/heads/master Commit: cd65d26a931fb4599cc9831a33a52cd5a2759a42 Parents: 97d2e3f Author: Wido den Hollander <[email protected]> Authored: Wed Mar 13 20:25:49 2013 +0100 Committer: Wido den Hollander <[email protected]> Committed: Wed Mar 13 21:25:18 2013 +0100 ---------------------------------------------------------------------- debian/cloudstack-usage.postinst | 37 +++++++++++++++++++++++++++++++++ debian/rules | 1 - usage/conf/db.properties.in | 12 ++++++++++ 3 files changed, 49 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cd65d26a/debian/cloudstack-usage.postinst ---------------------------------------------------------------------- diff --git a/debian/cloudstack-usage.postinst b/debian/cloudstack-usage.postinst new file mode 100644 index 0000000..2e15d5d --- /dev/null +++ b/debian/cloudstack-usage.postinst @@ -0,0 +1,37 @@ +#!/bin/bash + +# 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. + +set -e + +case "$1" in + configure) + # We copy the db.properties file from the management server to the usage server + # This used to be a symlink, but we don't do that anymore + if [ -f "/etc/cloud/management/db.properties" ]; then + cp -a /etc/cloud/management/db.properties /etc/cloudstack/usage/db.properties + fi + + # We also retain the log4j configuration + if [ -f "/etc/cloud/usage/log4j-cloud_usage.xml" ]; then + cp -a /etc/cloud/usage/log4j-cloud_usage.xml /etc/cloudstack/usage/log4j-cloud_usage.xml + fi + ;; +esac + +exit 0 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cd65d26a/debian/rules ---------------------------------------------------------------------- diff --git a/debian/rules b/debian/rules index 7fc6425..a135601 100755 --- a/debian/rules +++ b/debian/rules @@ -129,7 +129,6 @@ install: install -D usage/target/cloud-usage-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/$(PACKAGE)-usage/lib/$(PACKAGE)-usage.jar install -D usage/target/dependencies/* $(DESTDIR)/usr/share/$(PACKAGE)-usage/lib/ cp usage/target/transformed/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/usage/ - ln -s ../management/db.properties $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/usage/db.properties install -D packaging/debian/init/cloud-usage $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-usage # cloudstack-awsapi http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cd65d26a/usage/conf/db.properties.in ---------------------------------------------------------------------- diff --git a/usage/conf/db.properties.in b/usage/conf/db.properties.in new file mode 100644 index 0000000..21e67c6 --- /dev/null +++ b/usage/conf/db.properties.in @@ -0,0 +1,12 @@ +# usage database settings +db.usage.username=@DBUSER@ +db.usage.password=@DBPW@ +db.usage.host=@DBHOST@ +db.usage.port=3306 +db.usage.name=cloud_usage + +# usage database tuning parameters +db.usage.maxActive=100 +db.usage.maxIdle=30 +db.usage.maxWait=10000 +db.usage.autoReconnect=true
