Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 13993200C1E for ; Fri, 3 Feb 2017 01:21:22 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 12287160B61; Fri, 3 Feb 2017 00:21:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 37ABC160B57 for ; Fri, 3 Feb 2017 01:21:21 +0100 (CET) Received: (qmail 32395 invoked by uid 500); 3 Feb 2017 00:21:20 -0000 Mailing-List: contact dev-help@openwhisk.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwhisk.apache.org Delivered-To: mailing list dev@openwhisk.apache.org Received: (qmail 32383 invoked by uid 99); 3 Feb 2017 00:21:20 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2017 00:21:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id B70371A03B7 for ; Fri, 3 Feb 2017 00:21:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.897 X-Spam-Level: * X-Spam-Status: No, score=1.897 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=adobe.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id B1fOtHva80tB for ; Fri, 3 Feb 2017 00:21:17 +0000 (UTC) Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0051.outbound.protection.outlook.com [104.47.33.51]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id B08F75F3A1 for ; Fri, 3 Feb 2017 00:21:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adobe.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=bWwia/cAV90/Mj3hHuDpwOaabCbo4XV18Wrw/ikfAEo=; b=iwC1tmJKe9bZuezZqyAjmQ8uQUR0hHAGQ4iCwbpSmektaRHczv63jeDyeNN1FLUd4+UL7A3oS62+u1VZ7v5GQf1++Ds/NcXyHpvWlH1TdC7fOcdaWf5Gw+qlh8adkwqcmlhf2FLh+H1nqJeGufVA4Htii5GoPWjsXKIDB8f9Ye4= Received: from CY1PR0201MB1785.namprd02.prod.outlook.com (10.163.55.18) by CY1PR0201MB1785.namprd02.prod.outlook.com (10.163.55.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Fri, 3 Feb 2017 00:20:49 +0000 Received: from CY1PR0201MB1785.namprd02.prod.outlook.com ([10.163.55.18]) by CY1PR0201MB1785.namprd02.prod.outlook.com ([10.163.55.18]) with mapi id 15.01.0888.018; Fri, 3 Feb 2017 00:20:49 +0000 From: Dragos Dascalita Haut To: "dev@openwhisk.apache.org" Subject: Re: Configuration through environment vs. Consul KV Thread-Topic: Configuration through environment vs. Consul KV Thread-Index: AQHSdYhoM+naXVs3bUKOTkdPxjO+haFRA3CAgAVuMW0= Date: Fri, 3 Feb 2017 00:20:49 +0000 Message-ID: References: ,<4DE0E39F-FC55-4AEA-85BA-0F4C57BF8E6A@adobe.com> In-Reply-To: <4DE0E39F-FC55-4AEA-85BA-0F4C57BF8E6A@adobe.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=ddascal@adobe.com; x-originating-ip: [192.150.10.208] x-ms-office365-filtering-correlation-id: fb70e1fa-b3ce-4864-e859-08d44bca8180 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:CY1PR0201MB1785; x-microsoft-exchange-diagnostics: 1;CY1PR0201MB1785;7:t3Gv+Ds3DGN9Ib2VCmYylcxQ75NGA7ONfl9usXxA/TNDKHsFL5iO4QX6VO0KwA1KudcKqbYpFOvc9pnKZx56YFwfa46gmVCVlUbTK1QAzwTdWEIl+Wyd7iB5dWIOEppQ12e0XO/lQ+gc1kHMt4p4TintXfV74IZGKvJdbLqp6GFUogjOT3Opfq7wxHuTtXql7laUP3lbx3Qi3FLvORpjmXbwzUZ/7QthIulv8myqRwKvverNpXXawe3+y7nFfzytq9TJPqSizpTAd4KtG8v4+lDMOdQmF3Mv9Xl+qzm6JCsEv/aQExbz3HjJoht2ZEoKzVvh1uB5om4iis0jtcotBYfjX95cPhbzLyku1NuhiLjlFpJ9Z4KC2lvKb4QQWOLndQZdG7Qa1WYEQV7aBOTJS53BT+RTt29ZQj4ZsUTCIW6Jw6b4Nj56KpzyIi3P0PWdShY9BJmjQw+37pj1scychiLFlwrPdC3Gq4mNzpGmIH4Au+PsHErZqCr4URLtOT43s2f9pnH5PgswoBzYWlyVew==;20:gqykj9eTT2EKSlY/ZpI5ZHF6hr09Z212FXUTF+axwtX1XPSICU/piOBOxY+xCciwMctaTH3tUGd6L4zr63VyXsNSI2Md9ppyTjUzCvy6oPHOilQt99xBSaOdBcr820Ogs7u9RCYnqxYyUQi6WdX+K3d42YgeeJgvesuAQSeAiyI= x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(158342451672863)(188474585043545)(166708455590820); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040375)(601004)(2401047)(8121501046)(5005006)(7006105)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041248)(20161123562025)(20161123564025)(20161123558025)(20161123555025)(20161123560025)(6042181)(6072148);SRVR:CY1PR0201MB1785;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0201MB1785; x-forefront-prvs: 02070414A1 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(7916002)(53754006)(189002)(377454003)(199003)(189998001)(6506006)(229853002)(110136003)(81156014)(1730700003)(92566002)(77096006)(76176999)(8990500004)(5640700003)(606005)(6436002)(25786008)(8676002)(81166006)(38730400001)(8936002)(54356999)(5660300001)(3280700002)(107886002)(50986999)(53936002)(2501003)(97736004)(101416001)(7736002)(33656002)(86362001)(7696004)(236005)(74316002)(9686003)(122556002)(7906003)(55016002)(53546003)(68736007)(2351001)(450100001)(10090500001)(2906002)(3846002)(2900100001)(3660700001)(6116002)(6916009)(106116001)(102836003)(106356001)(66066001)(2950100002)(54896002)(99286003)(6306002)(31430400001)(105586002)(6246003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0201MB1785;H:CY1PR0201MB1785.namprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: adobe.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_CY1PR0201MB17855DCB3A74A408C07CA1CCA44C0CY1PR0201MB1785_" MIME-Version: 1.0 X-OriginatorOrg: adobe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2017 00:20:49.1315 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fa7b1b5a-7b34-4387-94ae-d2c178decee1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0201MB1785 archived-at: Fri, 03 Feb 2017 00:21:22 -0000 --_000_CY1PR0201MB17855DCB3A74A408C07CA1CCA44C0CY1PR0201MB1785_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable This thread about simplifying the configuration got me thinking if we can d= o something about the configuration of the CouchDB as well. IIUC before starting OW the CouchDB needs to be setup with: 1. A table for "subjects" with a minimum of 2 subjects : whisk.guest and wh= isk.system 2. A table for "actions" [1] 3. A table for "api gateway configuration" [1] 4. Create table views [2] I'm wondering if it would be easier to create a new docker container, exten= ding the CouchDB one, and when it starts initially it checks for the DB, th= e tables, and if they're missing it configures them, or if table views need= to be updated it updates them. Or is there an easier way ? WDYT ? Thanks, dragos [1] - https://github.com/openwhisk/openwhisk/blob/master/tools/db/wipeTrans= ientDBs.sh [2] - https://github.com/openwhisk/openwhisk/blob/master/tools/db/loadTrans= ientDBViews.sh ________________________________ From: Felix Meschberger Sent: Monday, January 30, 2017 4:49:11 AM To: dev@openwhisk.apache.org Subject: Re: Configuration through environment vs. Consul KV Hi Markus I like this as in my understanding this also aligns with the current thinki= ngs around =B5service deployments. Plus: We support the =84no surprises=93 approach Regards Felix Am 23.01.2017 um 15:52 schrieb Markus Th=F6mmes >: Hi all, I've got a cleanup idea in my mind, which I'd like to pass by you all to ga= ther different opinions and experiences. Ansible configuration files (hosts and group_vars basically) are considered= our truth. To configure our components we have a mixture of ways to pass t= hose values to them, though. The most common way is: 1. Write the values into whisk.properties (arbitrary step, which is not = necessary for the rest) 2. Push the values into Consul's KV store 3. Component comes up, gets only Consul parameters via its environment a= nd reads all the values it needs from Consul Some of our values are already passed by Environment vs. Consul though, for= no apparent reason like WHISK_VERSION_NAME in the Controller. In my opinion, our configuration handling is a bit out of hand at this poin= t and I haven't found a reason why we're using Consul for configuration sto= rage at all. It also defeats ansible's purpose of keeping track of configur= ation changes. An example: Say I want to change the database of a running OpenWhisk deploy= ment because the main one crashed. How do I do this today: 1. Change the values in Consul - easy, but not in line with our single-p= oint-of-truth anymore. 2. Know each component that relies on those values - hidden knowledge. 3. Restart those components to make sure they reload the configuration. What I propose is: Configuration through Environment solely. The example wo= uld then be: 1. Change the values in the Ansible configuration. 2. Redeploy through the usual commands - Ansible only updates/restarts t= he components with changed configuration automatically (might need some ext= ra tweaking as I think our scripts currently force a restart every time and= on every component, but you get the idea) I believe that's much simpler to handle, more in line with how Ansible etc.= are designed to work and it streamlines configuration management even more= . As a bonus, we lose the deploy time dependency on Consul, making the depl= oyment simpler in general. Ideas/Thoughts/Objections/Tomatoes? Cheers Markus --_000_CY1PR0201MB17855DCB3A74A408C07CA1CCA44C0CY1PR0201MB1785_--