Return-Path: X-Original-To: apmail-airavata-dev-archive@www.apache.org Delivered-To: apmail-airavata-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 04824100AC for ; Thu, 6 Mar 2014 18:55:46 +0000 (UTC) Received: (qmail 77498 invoked by uid 500); 6 Mar 2014 18:55:45 -0000 Delivered-To: apmail-airavata-dev-archive@airavata.apache.org Received: (qmail 77371 invoked by uid 500); 6 Mar 2014 18:55:43 -0000 Mailing-List: contact dev-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list dev@airavata.apache.org Received: (qmail 77353 invoked by uid 99); 6 Mar 2014 18:55:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Mar 2014 18:55:42 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of thejaka.amila@gmail.com designates 209.85.214.172 as permitted sender) Received: from [209.85.214.172] (HELO mail-ob0-f172.google.com) (209.85.214.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Mar 2014 18:55:35 +0000 Received: by mail-ob0-f172.google.com with SMTP id wm4so3012539obc.31 for ; Thu, 06 Mar 2014 10:55:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=q2aNVfwKxE9pFFx8J7149wGg6n+D9chJRtog+KMv2+c=; b=mxcHyHpJrllFFyy3vSrQwGc0X23iImnlQz35dsXY0IMmbr8JXehfLWOA0n0E2duFfI SRmlX6nvlF+AME4lCpztOhz218pJBU+7v1McJ+AkDKIXvH9xgOgjh5tJRGjxJiAjce5I blZYYjZtBzyN83WqdR87HogHiz9kpm7iHw9VQC9A4otYXFzMqlsgYNtBBaPphc4Qs/k1 qcQJ3ODSVe3kc3aa+I917VPrP8X996yQ41c3fLJVDnEIGA8ODHoP/fw9UTbg09p3RpLt Vx5Lkcv17Eyu6m+xxzDnaTZ+AYYlEozNkfhcgK9XicKKAzM+y82kOiI60LGGhVFs+pDp sASA== MIME-Version: 1.0 X-Received: by 10.182.158.40 with SMTP id wr8mr1341673obb.86.1394132114517; Thu, 06 Mar 2014 10:55:14 -0800 (PST) Received: by 10.76.82.71 with HTTP; Thu, 6 Mar 2014 10:55:14 -0800 (PST) In-Reply-To: References: Date: Thu, 6 Mar 2014 13:55:14 -0500 Message-ID: Subject: Re: Suggestions on maintaining the server/client configuration files? From: Amila Jayasekara To: dev Content-Type: multipart/alternative; boundary=089e013d0d6c74b3e404f3f4ad33 X-Virus-Checked: Checked by ClamAV on apache.org --089e013d0d6c74b3e404f3f4ad33 Content-Type: text/plain; charset=ISO-8859-1 Hi Saminda, I guess the best thing is to create template configuration files in a central location and replace needed variables within the test initialization and place generated config files within the target directory of the test case. E.g :- registry.url = ${registry.url} ${registry.url} is replaced within the test case with appropriate value. Then we dont need to duplicate configuration files in everywhere. Also when a configuration is updated we only need to change in a single place. You may encapsulate template parameter replacing logic into a common util class so that each test case can just invoke the logic. Further we should have a single place to read all configurations and all subcomponents must go through this configuration component to get config values. Otherwise it will be hard to maintain the configuration reading code. Thanks Amila On Thu, Mar 6, 2014 at 1:38 PM, Saminda Wijeratne wrote: > There are several places which we need the airavata-server.properties and > airavata-client.properties files to be present in order to run tests and > standalone servers resulting in replication. Any idea how we should handle > this? > --089e013d0d6c74b3e404f3f4ad33 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Saminda,

I guess the best thing is t= o create template configuration files in a central location and replace nee= ded variables within the test initialization and place generated config fil= es within the target directory of the test case.=A0

E.g :- registry.url =3D ${registry.url}

<= /div>
${registry.url} is replaced within the test case with appropriate= value. Then we dont need to duplicate configuration files in everywhere. A= lso when a configuration is updated we only need to change in a single plac= e.=A0
You may encapsulate template parameter replacing logic into a common u= til class so that each test case can just invoke the logic.

<= /div>
Further we should have a single place to read all configurations = and all subcomponents must go through this configuration component to get c= onfig values. Otherwise it will be hard to maintain the configuration readi= ng code.

Thanks
Amila


On Thu, Mar 6, 2014 at 1:38 PM, Sa= minda Wijeratne <samindaw@gmail.com> wrote:
There are several places wh= ich we need the airavata-server.properties and airavata-client.properties f= iles to be present in order to run tests and standalone servers resulting i= n replication. Any idea how we should handle this?

--089e013d0d6c74b3e404f3f4ad33--