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 C79C0200CEE for ; Tue, 8 Aug 2017 01:42:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C60D8165B7C; Mon, 7 Aug 2017 23:42:25 +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 E44F51659F8 for ; Tue, 8 Aug 2017 01:42:24 +0200 (CEST) Received: (qmail 10125 invoked by uid 500); 7 Aug 2017 23:42:24 -0000 Mailing-List: contact dev-help@ariatosca.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ariatosca.incubator.apache.org Delivered-To: mailing list dev@ariatosca.incubator.apache.org Received: (qmail 10113 invoked by uid 99); 7 Aug 2017 23:42:23 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Aug 2017 23:42:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 68A48C5C17 for ; Mon, 7 Aug 2017 23:42:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.48 X-Spam-Level: ** X-Spam-Status: No, score=2.48 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudify-co.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 6yyLr383YWJ5 for ; Mon, 7 Aug 2017 23:42:17 +0000 (UTC) Received: from mail-qt0-f175.google.com (mail-qt0-f175.google.com [209.85.216.175]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id C00915FDAB for ; Mon, 7 Aug 2017 23:42:16 +0000 (UTC) Received: by mail-qt0-f175.google.com with SMTP id v29so11479440qtv.3 for ; Mon, 07 Aug 2017 16:42:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudify-co.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=aF29ZczGH/grrsuDouLHw6/4RHmmFf78YHTuacrq0OQ=; b=AdZpK/QBkIrg0o8KFov4fHZTgQ5aapGzfu+UL7XV6lL+XSai7el0UYlJRF7AlT95NM 1A7f/zTmtyWgJHZ5IsnxqWjGWMoTeWl+bakLEVx1+7y2yDlPGi6n7SYqFmFHyuhD5mDT x1eBXGyMWOgsGbTlLKZSq73N0L3J/Iqf3ngdATbW+/WQyahAeJTfs9Sj/rBE72n3LX53 jHxsuYUjPYLsjow+nC4rl/gLKCFjp4u9e4RGCLN6oN5sKe8nZ0+Q/5He5D1cHyA8JNic XMxUlOnlnRy7vGuZIt4FKbTw9TsE2BssXQSMZRUZrpA0s5xhdpxSJ6+oqL6sInl+/hd6 k9+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=aF29ZczGH/grrsuDouLHw6/4RHmmFf78YHTuacrq0OQ=; b=aczXKJNFsn+iWpRMHpEQhyFSJMo3TmI28ANvqq7K2pPipsIW7cvW1lqgfbx6svLMgk 9mgg4zlyhc5jantfJAwNq3JBiDKsKjJdSTPbVFOhztCI+W7phGGz6C6rbk6kZbLHwrpj f9x63z1hXiTSJVM4/5Eq5PJt/kGy97qb8RXOhhkqKFhHmR+KGCJ/wV3OwyqwOUrcIUU9 9oIZfi7DAe9qTKZ0AGT88yh0JiQ151JKTnFcTcvOXyPlmfU6Xinjj1GoG5CTxwTlq6hI dATn/9FXU3hEV2NeORy2yy/feUu1FqHbVBA97lZka2qp+qlmRg/+ER0Tfjjz6XHdqMoP zQAw== X-Gm-Message-State: AHYfb5irWWbFwhqF/B3PCXT247d2YKTHqR8qC8OkqaP+LIey8mzrotqT vdJTwq+fG8ghAy3yFv0NkFRFICyjGUo8 X-Received: by 10.200.58.65 with SMTP id w59mr3040878qte.265.1502149329105; Mon, 07 Aug 2017 16:42:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.9.102 with HTTP; Mon, 7 Aug 2017 16:42:08 -0700 (PDT) In-Reply-To: References: From: Ran Ziv Date: Tue, 8 Aug 2017 02:42:08 +0300 Message-ID: Subject: Re: Service Composition / Substitution Mapping To: dev@ariatosca.incubator.apache.org Content-Type: multipart/alternative; boundary="001a114db990294cac055632659c" archived-at: Mon, 07 Aug 2017 23:42:26 -0000 --001a114db990294cac055632659c Content-Type: text/plain; charset="UTF-8" The sensible defaults Tal's mentioned sound indeed sensible to me. I'd also like users to have control over this, though I'm a bit worried about us getting too carried away with how arbitrarily we use policies for configuring, well, pretty much anything. It might not be a problem right now but I'm not certain that will remain the case in the future when the number of them grows.. On Wed, Aug 2, 2017 at 7:14 PM, Tal Liron wrote: > Our goal with adding new "conventions" to ARIA, such as policies, is to > always make them optional. The idea is that a plain-vanilla TOSCA template > would "just work" in ARIA via sensible defaults. The extra stuff is there > if you know you are using ARIA and you want to make use of its features. > (The opposite is true, too: we make sure that any additions are still pure > TOSCA and would be parsed validly by other TOSCA parsers.) > > On Wed, Aug 2, 2017 at 9:08 AM, DeWayne Filppi > wrote: > > > Cool. Missed that. That leaves things almost completely wide open from > > the orchestrator side, IOW few predefined keys. Too few IMHO, but if > > everyone uses ARIA conventions it could work. > > > > On Tue, Aug 1, 2017 at 11:49 PM, Tal Liron wrote: > > > > > I agree! Luckily metadata exists in the 1.0 spec. :) > > > > > > http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile- > > > YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#_ > Toc379455044 > > > > > > On Tue, Aug 1, 2017 at 7:16 PM, DeWayne Filppi > > > wrote: > > > > > > > It occurs that it might be useful to be able to tag service templates > > > with > > > > arbitrary meta-data. Perhaps at one level carried forward from a > CSAR > > > > manifest, but also user definable. This would allow inter-service > > > > references to be definitive, if desired. This could be implicitly > > > defined > > > > as a capability by the orchestrator, but some kind of special > > requirement > > > > type(s) would be needed to utilize it. This way, external repos > could > > be > > > > used safely and directly without the separate load step. > > > > > > > > On Tue, Aug 1, 2017 at 12:43 PM, Tal Liron wrote: > > > > > > > > > Thanks for the kudos. :) > > > > > > > > > > This topic was discussed on this list a while ago. It's indeed > tricky > > > to > > > > > get right, because TOSCA leaves a lot of room for the orchestrator > to > > > > > implement. > > > > > > > > > > I'm thinking of it working something like this: > > > > > > > > > > 1. The reqs-and-caps engine by default will always look for > > satisfiable > > > > > capabilities within the currently instantiated service. HOWEVER, if > > > such > > > > a > > > > > capability is not present, the option is there to look for another > > > > > instantiated service that exposes the capabilities in substitution > > > > > mappings. > > > > > > > > > > 2. If we DON'T have another instantiated service, but DO have a > > service > > > > > template that could fit the bill, perhaps we need to instantiate > that > > > > other > > > > > service first. One obvious option is to do this automatically. But > I > > > feel > > > > > like this can create unforeseen consequences -- for example, some > > dummy > > > > > test template that someone happened to have in the database might > get > > > > > instantiated by mistake. Also, it might need to trigger multiple > > > install > > > > > workflows at once... a big mess. So I suggest that instead we > > provide a > > > > > very detailed validation error here saying that the requirement > > cannot > > > be > > > > > satisfied, HOWEVER there exist service templates A, B, and C that > can > > > > > substitute for us, so maybe the nice user would like to instantiate > > > them > > > > > first? This seems very reasonable to me. > > > > > > > > > > 3. If indeed another service satisfies this, a special node is > added > > to > > > > the > > > > > current service (with the correct type -- but without a service > > > template > > > > > foreign key), which serves as a proxy of the other service > template. > > > I'm > > > > > not sure how we would mark this exactly. We can't use the > service_fk > > > > field, > > > > > because it's still in our current service. So perhaps there's need > > of a > > > > new > > > > > fk field, maybe substituted_service_fk? > > > > > > > > > > The above might be "sensible defaults," but it seems to me that > users > > > > > really need control over this. So I propose to add a new > > > aria.Composition > > > > > policy that would let you provide hints for this mechanism. For > > > example, > > > > > you might want to "filter" the target service by service template > > name > > > > and > > > > > even by metadata in the service template. For example, you might > want > > > to > > > > > require version 1.2.2 of a specific service, no less. > > > > > > > > > > Those are some quick thoughts. Exactly how such a policy would look > > > with > > > > > require more thought... > > > > > > > > > > > > > > > On Tue, Aug 1, 2017 at 2:20 PM, Avia Efrat > wrote: > > > > > > > > > > > Hello all, > > > > > > > > > > > > I'm starting to work on a full implementation of > > > substitution_mapping, > > > > > > which will lead to the ability of service composition. > > > > > > > > > > > > For those unacquainted with substitution mapping, here are some > > quick > > > > > > resources: > > > > > > *From the spec > > > > > > > > > > > YAML/v1.0/TOSCA-Simple-Profile-YAML-v1.0.html>, > > > > > > sections:* > > > > > > 2.10 > > > > > > > > > > > YAML/v1.0/os/TOSCA-Simple-Profile-YAML-v1.0-os.html#_ > > Toc471725208>, > > > > > > 2.11 > > > > > > > > > > > YAML/v1.0/os/TOSCA-Simple-Profile-YAML-v1.0-os.html#_ > Toc471725209> > > > > > > (theory and examples) > > > > > > 3.8.1, 3.8.2 (grammar) > > > > > > *From Tal's amazing lecture on TOSCA > > > > > > :* > > > > > > 00:00 until 12:30. > > > > > > > > > > > > If anyone wishes to: > > > > > > * ask questions regarding this feature > > > > > > * suggest real-life use cases > > > > > > * offer their insight about vague parts of the spec > > > > > > * anything else about substitution mapping and service > composition > > > > > > Then please, feel encouraged to leave your feedback! > > > > > > > > > > > > > > > > > > > > > --001a114db990294cac055632659c--