From dev-return-1784-archive-asf-public=cust-asf.ponee.io@mxnet.incubator.apache.org Sat Jan 6 15:30:14 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 235A318062C for ; Sat, 6 Jan 2018 15:30:14 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 1351C160C3B; Sat, 6 Jan 2018 14:30:14 +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 D8609160C2A for ; Sat, 6 Jan 2018 15:30:12 +0100 (CET) Received: (qmail 8068 invoked by uid 500); 6 Jan 2018 14:30:12 -0000 Mailing-List: contact dev-help@mxnet.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mxnet.incubator.apache.org Delivered-To: mailing list dev@mxnet.incubator.apache.org Received: (qmail 8056 invoked by uid 99); 6 Jan 2018 14:30:11 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 Jan 2018 14:30:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id D843018099D for ; Sat, 6 Jan 2018 14:30:10 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.879 X-Spam-Level: ** X-Spam-Status: No, score=2.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=googlemail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id RboaLAPMCcZT for ; Sat, 6 Jan 2018 14:30:04 +0000 (UTC) Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 095035F24A for ; Sat, 6 Jan 2018 14:30:04 +0000 (UTC) Received: by mail-lf0-f49.google.com with SMTP id w196so7892529lff.5 for ; Sat, 06 Jan 2018 06:30:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=AiV/I8Yxwrnz4goRFdeKt4eZKMRhj/OCg/1Nan33Qgk=; b=NJU7F9g8/xR4O418Qth1+VCTDWkbJFqayW25afdGfO+WZ0n3fwU3rqqRRGLzG/0/T3 LjgaW3XzDNwbypGhjP9wfAA6x+gWuryIYNSIWOA8IHYXNOH51Ixh5BbgwNpcN7/QSmP5 TcAQ3qoyLm8dQPLYop4W4shDnwTWbWkdjx+g1iFG8vzREz6dPaDpU69s67AkUoCSHSjw DRUZje7ClLLGiVQ5fdiLHELG42B6wfppjwPItiImTutRYKL/4FSoLZ3aitvpg0a1Gh7l oaau4Xx00KtLlgn2rSKnnNPZexIlbTDcgK0xypDzp0bo9a3jaqn9Fgwf3tg0Co4lq05X Tigw== 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=AiV/I8Yxwrnz4goRFdeKt4eZKMRhj/OCg/1Nan33Qgk=; b=Fqij7a0LbL5Q81yGrPiwdkSsf7TDbf5QD1L+rXLLufh9kmdS1uoInryMqwTWVxuYA0 4Lw3h56pQEgd9tgPAax0r/+ak+IBIH1bUWPq2T3uXKeFYQhGuSwBpz2JWx44/4t3P+5J ixSCypqa40hGz0HklHlUWV1zOy6bzDdeDJJa1lwIO3O+yaTVN5nkW4iqqEW82P5KYObL nDhpCjpOhgWyHMlRDokuTCcbGmhgqV/3cpQOgZIpvc3668k2LiQvZ8vksqUHBTkmoUwU wWfmoEmAHM+pmr7ZCpX5sXssCKzoo3zf/x85CoUq27C0XGmE5pUkLR9WYmMNFWH2zhe8 0nyQ== X-Gm-Message-State: AKGB3mIxdd7odB9w9mM6U2WiQFXsZTSggOEwdsNlhu9CGcc6gCBeLAqE aJtvABKz6SAUgWBUjm474A+Jtlru/qkeR4BdOVtqXg== X-Google-Smtp-Source: ACJfBov1zna4fypxh9pKtBGzJ+PWQpI4rJdpvH0lc20W4Zh44ViL35Uoq0U/UwHo8AGpZVdNeZP2rD55J1Xh2Km7PsU= X-Received: by 10.46.59.12 with SMTP id i12mr3464076lja.88.1515249002090; Sat, 06 Jan 2018 06:30:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.19.210 with HTTP; Sat, 6 Jan 2018 06:29:21 -0800 (PST) In-Reply-To: References: From: Marco de Abreu Date: Sat, 6 Jan 2018 15:29:21 +0100 Message-ID: Subject: Re: Commiter access to Jenkins Sevrer To: dev@mxnet.incubator.apache.org Content-Type: multipart/alternative; boundary="f4f5e803d9048414e205621c668d" --f4f5e803d9048414e205621c668d Content-Type: text/plain; charset="UTF-8" @Kellen: From my experience it was a bit unclear which exact steps have to be executed in order to create a valid environment to run ci_build.sh with tests. For example, the script expects the source-code in a specific directory which is then getting softlinked into the docker container. The build artefacts are getting copied into another specific softlinked directory as a result of the build process. In order to get to the test stage, these specific directories have to be in place. In general, I've got the feeling that too many undocumented requirements exists before the ci_build.sh can be executed properly - which makes sense at some point as it is supposed to only be used on Jenkins-slave. I'd like to see the scripted revamped in such a way that it can be run out of the box on a developer computer as well as on CI, telling the user if anything is missing or expected. @Pedro: Thank you! I've already had the possibility to let Eric, Sheng and Suneel test the authentication mechanism and so far everything worked flawlessly. At the moment, the roles have to be assigned manually, but I'd like to invite everybody to try it out themselves on our test-system, available at http://jenkins.mxnet-ci-dev.amazon-ml.com/. Feel free to break it and let me know if anything is missing. If this system passed review and test, I'd like to migrate it to prod. -Marco On Sat, Jan 6, 2018 at 3:12 PM, Pedro Larroy wrote: > Agree that comitters should have access to Jenkins. > > I would like to as ask for some patience due to the ongoing progress > on the CI work and thank Amazon for providing the resources for > running the new CI and the great job done by Marco and the infra team. > > Are there some volunteers in helping with the authentication mechanism > for committers? > > Pedro. > > On Sat, Jan 6, 2018 at 1:15 PM, Marco de Abreu > wrote: > > While compile errors may be reproduced that way, it's hard to run any > tests > > due to the required softlink to the compiled binaries. It is possible, > but > > very inconvenient to use and thus it renders reproducing test results > very > > hard. > > > > I have been thinking about giving the possibility to download the > generated > > artefacts during build stage - for debugging reasons only! This way, they > > can be used in conjunction with unit tests to reproduce a test failure, > but > > this still needs some discussions and a security review. > > > > -Marco > > > > Am 06.01.2018 12:59 nachm. schrieb "kellen sunderland" < > > kellen.sunderland@gmail.com>: > > > >> Regarding the comments around reproducibility, what parts of the CI are > >> people having trouble reproducing now? I'm in favour of making our AMIs > >> public for transparency reasons (and so that people can provide > suggestions > >> on how to improve them), but I'm not sure it would help in terms of > >> reproducibility for any system other than Windows. When I have an > error in > >> CI I generally just do a `make clean` in my mxnet root source dire, then > >> copy the failing command from CI, i.e. `tests/ci_build/ci_build.sh cpu > >> --dockerbinary docker make DEV=1 USE_PROFILER=1 USE_CPP_PACKAGE=1 > >> USE_BLAS=openblas -j$(nproc)`. Are there CI tasks (other than Windows) > >> that don't work for people? If so maybe we can help fix those? > >> > >> > >> On Sat, Jan 6, 2018 at 11:50 AM, kellen sunderland < > >> kellen.sunderland@gmail.com> wrote: > >> > >> > +1, thanks for the work Marco. > >> > > >> > On Sat, Jan 6, 2018 at 12:24 AM, Naveen Swamy > >> wrote: > >> > > >> >> this sounds fine to me as long as there is at least one MXNet > committer > >> >> who > >> >> is also an admin. > >> >> > >> >> thanks Marco for making this happen :) > >> >> > >> >> - Naveen > >> >> > >> >> On Fri, Jan 5, 2018 at 2:54 PM, Marco de Abreu < > >> >> marco.g.abreu@googlemail.com > >> >> > wrote: > >> >> > >> >> > I'm proposing following permissions: https://i.imgur.com/uiFBtuW. > png. > >> >> The > >> >> > meaning of every permission is explained at > https://wiki.jenkins.io/ > >> >> > display/JENKINS/Matrix-based+security. > >> >> > > >> >> > Any objections? > >> >> > > >> >> > On Fri, Jan 5, 2018 at 11:03 PM, Marco de Abreu < > >> >> > marco.g.abreu@googlemail.com> wrote: > >> >> > > >> >> > > I'm currently working on a prototype of SSO based on GitHub and a > >> few > >> >> > > issues arose: > >> >> > > > >> >> > > We are not able to use the permission strategy which determines > the > >> >> > access > >> >> > > rights based on the read/write permission to a project as the > >> >> > > Jenkins-plugin is not able to resolve the link between > Jenkins-jobs > >> >> and > >> >> > > GitHub-repositories. Instead I would propose to use a role-based > >> >> approach > >> >> > > using https://wiki.jenkins.io/display/JENKINS/Role+Strategy+ > Plugin. > >> >> In > >> >> > > this case we would have three roles: Anonymous, Administrator and > >> >> > > Committer. While everybody would authenticate using their regular > >> >> GitHub > >> >> > > account, the role assignment would have to happen manually. > >> >> Considering > >> >> > > that the amount of administrators and committers doesn't change > that > >> >> > > frequently, this shouldn't be too much of an issue - auto > populating > >> >> the > >> >> > > status is not possible unfortunately. > >> >> > > > >> >> > > Reason for splitting Administrators and Committers into two > separate > >> >> > roles > >> >> > > has a security reason. At the moment, we're using Chris Oliviers > >> >> GitHub > >> >> > > credentials to populate the commit status. If all committers > would > >> >> gain > >> >> > > full admin rights, they would have access to these credentials. > >> Chris > >> >> is > >> >> > > not fine with this approach and would like to limit the amount of > >> >> people > >> >> > > with access to his credentials as much as possible. > >> >> > > > >> >> > > In order to address his concerns, I propose to add Chris to the > >> >> committer > >> >> > > as well as to the admin role, while all other committers will > only > >> >> > receive > >> >> > > the committer role without read access to the credentials. In a > >> later > >> >> > > email, I will make a proposal for the detailed committer role > >> rights. > >> >> You > >> >> > > can check all available options at https://wiki.jenkins.io/ > >> >> > > display/JENKINS/Matrix-based+security. > >> >> > > > >> >> > > All people who have access to the underlying AWS account would be > >> >> granted > >> >> > > the Administrator role with full access. At the moment, this > would > >> be > >> >> > > Meghna Baijal, Gautam Kumar and myself. > >> >> > > > >> >> > > An alternative solution would be to create a bot account > >> specifically > >> >> for > >> >> > > MXNet CI and use its credentials instead of Chris'. This account > >> >> requires > >> >> > > write permission to the repository, but would give us the > advantage > >> >> that > >> >> > > these credentials would be shared within the committers and thus > >> >> making > >> >> > the > >> >> > > restrictions regarding credentials obsolete (and Chris would be > >> happy > >> >> not > >> >> > > the see his face within every single PR :P ). I've asked around > and > >> >> > > received the feedback from multiple people that Apache Infra does > >> not > >> >> > want > >> >> > > to grant bot accounts write permission to a repository, but I > would > >> >> like > >> >> > to > >> >> > > confirm back considering that AppVeyor, for example, has a bot > >> account > >> >> > with > >> >> > > write permission. I would like to check back with a mentor and > >> create > >> >> an > >> >> > > Apache Infra ticket to request details and permission. > >> >> > > > >> >> > > I would propose to take both approaches at the same time, > meaning we > >> >> can > >> >> > > start with Chris in the committer AND admin role while trying to > get > >> >> > > permission for a bot account in the meantime. > >> >> > > > >> >> > > wdyt? > >> >> > > > >> >> > > On Fri, Jan 5, 2018 at 8:21 PM, Chris Olivier < > >> cjolivier01@gmail.com> > >> >> > > wrote: > >> >> > > > >> >> > >> I am fine without a vote unless a vote is required? Any > >> objections, > >> >> > >> anyone? You're sort of adding functionality here, not changing > or > >> >> > >> restricting... We can always change to Apache later. > >> >> > >> > >> >> > >> On Fri, Jan 5, 2018 at 11:18 AM, Marco de Abreu < > >> >> > >> marco.g.abreu@googlemail.com> wrote: > >> >> > >> > >> >> > >> > I'd be in favour of GitHub. Shall we open a vote or would you > >> like > >> >> me > >> >> > to > >> >> > >> > create a POC with GitHub first and afterwards we can check if > >> >> that's > >> >> > >> > enough? > >> >> > >> > > >> >> > >> > -Marco > >> >> > >> > > >> >> > >> > On Fri, Jan 5, 2018 at 8:13 PM, Chris Olivier < > >> >> cjolivier01@gmail.com> > >> >> > >> > wrote: > >> >> > >> > > >> >> > >> > > Apparently Apache supports OATH, so I am open to either. > >> >> > >> > > Good idea for the docker thing. > >> >> > >> > > > >> >> > >> > > On Fri, Jan 5, 2018 at 11:02 AM, Marco de Abreu < > >> >> > >> > > marco.g.abreu@googlemail.com> wrote: > >> >> > >> > > > >> >> > >> > > > GitHub SSO allows the neat feature that login and > permission > >> >> can > >> >> > be > >> >> > >> > > > selected depending on the access rights a user has to a > >> >> project. > >> >> > >> > Somebody > >> >> > >> > > > with write access (committers) would be get different > >> >> permissions > >> >> > >> than > >> >> > >> > > > somebody with only read access. > >> >> > >> > > > > >> >> > >> > > > We could check back with Apache for SSO, but this would > >> involve > >> >> > >> Apache > >> >> > >> > > > infra. We could put it up to a vote whether to use GitHub > or > >> >> > Apache > >> >> > >> > SSO. > >> >> > >> > > > > >> >> > >> > > > In order to reproduce a build failure we have been > thinking > >> >> about > >> >> > >> > > changing > >> >> > >> > > > the ci_build.sh in such a way that it can be run manually > >> >> without > >> >> > >> > > Jenkins. > >> >> > >> > > > The setup I took over binds the Jenkins work directory > into > >> the > >> >> > >> docker > >> >> > >> > > > containers and uses a few hacks which are hard to > reproduce > >> >> > >> locally. We > >> >> > >> > > > plan to reengineer this script to make it easier to run > >> >> manually. > >> >> > >> > > > But making the AMI public is a good idea! We plan to make > the > >> >> > whole > >> >> > >> > > > infrastructure code (based on Terraform) completely > public - > >> at > >> >> > the > >> >> > >> > > moment > >> >> > >> > > > it's in a private repository as it contains credentials, > but > >> >> they > >> >> > >> will > >> >> > >> > be > >> >> > >> > > > moved to KMS soon. It would definitely be a good approach > to > >> >> just > >> >> > >> > supply > >> >> > >> > > > the AMI so everybody could recreate the environment in > their > >> >> own > >> >> > >> > account. > >> >> > >> > > > > >> >> > >> > > > -Marco > >> >> > >> > > > > >> >> > >> > > > Am 05.01.2018 7:51 nachm. schrieb "Chris Olivier" < > >> >> > >> > cjolivier01@gmail.com > >> >> > >> > > >: > >> >> > >> > > > > >> >> > >> > > > Well, login to the Jenkins server, I would imagine. > >> >> > >> > > > > >> >> > >> > > > github or Apache SSO (does Apache support OAUTH?) seems > like > >> a > >> >> > good > >> >> > >> > idea > >> >> > >> > > as > >> >> > >> > > > long as there's a way to not let everyone with a github > >> account > >> >> > log > >> >> > >> in. > >> >> > >> > > > > >> >> > >> > > > Access to actual slave machines could be more restricted, > I > >> >> > imagine. > >> >> > >> > > > > >> >> > >> > > > Eventually, a public current AMI for a build slave would > be > >> >> good > >> >> > in > >> >> > >> > order > >> >> > >> > > > to reproduce build or test problems that can't be > reproduced > >> >> > >> locally. > >> >> > >> > > > > >> >> > >> > > > wdyt? > >> >> > >> > > > > >> >> > >> > > > > >> >> > >> > > > > >> >> > >> > > > On Fri, Jan 5, 2018 at 10:41 AM, Marco de Abreu < > >> >> > >> > > > marco.g.abreu@googlemail.com> wrote: > >> >> > >> > > > > >> >> > >> > > > > Would it be an acceptable solution if we add SSO or do > you > >> >> also > >> >> > >> want > >> >> > >> > > > access > >> >> > >> > > > > to the actual AWS account and all machines? > >> >> > >> > > > > > >> >> > >> > > > > Yes, the build jobs are automatically getting created > for > >> new > >> >> > >> > branches. > >> >> > >> > > > > > >> >> > >> > > > > -Marco > >> >> > >> > > > > > >> >> > >> > > > > Am 05.01.2018 7:35 nachm. schrieb "Marco de Abreu" < > >> >> > >> > > > > marco.g.abreu@googlemail.com>: > >> >> > >> > > > > > >> >> > >> > > > > I totally agree, this is not the way it should work in > an > >> >> Apache > >> >> > >> > > Project. > >> >> > >> > > > > It's running on an isengard account, meaning it is only > >> >> > accessible > >> >> > >> > for > >> >> > >> > > > > Amazon employees. The problem is that a compromised > account > >> >> > could > >> >> > >> > cause > >> >> > >> > > > > damage up to 170,000$ per day. There are alarms in > place to > >> >> > notice > >> >> > >> > > those > >> >> > >> > > > > cases, but we still have to be very careful. These high > >> >> limits > >> >> > >> have > >> >> > >> > > been > >> >> > >> > > > > chosen due to auto scaling being added within the next > >> >> week's. > >> >> > >> > > > > > >> >> > >> > > > > I'd be happy to introduce a committer into the CI > process > >> and > >> >> > all > >> >> > >> the > >> >> > >> > > > > necessary steps as well as granting them permission. The > >> only > >> >> > >> > > restriction > >> >> > >> > > > > being that it has to be and Amazon employee and access > to > >> >> > console, > >> >> > >> > > master > >> >> > >> > > > > and slave only being possible from the Corp network. > >> >> > >> > > > > > >> >> > >> > > > > There is no open ticket. What would you like to request? > >> >> > >> > > > > > >> >> > >> > > > > -Marco > >> >> > >> > > > > > >> >> > >> > > > > > >> >> > >> > > > > Am 05.01.2018 7:22 nachm. schrieb "Chris Olivier" < > >> >> > >> > > cjolivier01@gmail.com > >> >> > >> > > > >: > >> >> > >> > > > > > >> >> > >> > > > > Like John and other mentors were saying, it's not proper > >> for > >> >> CI > >> >> > to > >> >> > >> > be a > >> >> > >> > > > > closed/inaccessible environment. Is it running on an > >> >> Isengard > >> >> > >> > account > >> >> > >> > > or > >> >> > >> > > > > in PROD or CORP or just generic EC2? I think that we > >> should > >> >> > >> remedy > >> >> > >> > > this. > >> >> > >> > > > > It's very strange that no committers have access at all. > >> Is > >> >> > >> there a > >> >> > >> > > > ticket > >> >> > >> > > > > open to IPSEC? > >> >> > >> > > > > > >> >> > >> > > > > On Fri, Jan 5, 2018 at 10:17 AM, Marco de Abreu < > >> >> > >> > > > > marco.g.abreu@googlemail.com> wrote: > >> >> > >> > > > > > >> >> > >> > > > > > Hello Chris, > >> >> > >> > > > > > > >> >> > >> > > > > > At the moment this is not possible due Amazon AppSec > >> >> > >> (Application > >> >> > >> > > > > security) > >> >> > >> > > > > > restrictions which does not permit user data and > >> >> credentials > >> >> > on > >> >> > >> > these > >> >> > >> > > > > > machines. > >> >> > >> > > > > > > >> >> > >> > > > > > I have been thinking about adding single sign on > bound to > >> >> > >> GitHub, > >> >> > >> > but > >> >> > >> > > > we > >> >> > >> > > > > > would have to check back with AppSec. > >> >> > >> > > > > > > >> >> > >> > > > > > Is the reason for your request still the ability to > start > >> >> and > >> >> > >> stop > >> >> > >> > > > > running > >> >> > >> > > > > > builds? > >> >> > >> > > > > > > >> >> > >> > > > > > Best regards, > >> >> > >> > > > > > Marco > >> >> > >> > > > > > > >> >> > >> > > > > > Am 05.01.2018 7:11 nachm. schrieb "Chris Olivier" < > >> >> > >> > > > cjolivier01@gmail.com > >> >> > >> > > > > >: > >> >> > >> > > > > > > >> >> > >> > > > > > Marco, > >> >> > >> > > > > > > >> >> > >> > > > > > Are all committers able to get login access to the > >> Jenkins > >> >> > >> Server? > >> >> > >> > > If > >> >> > >> > > > > not, > >> >> > >> > > > > > why? > >> >> > >> > > > > > > >> >> > >> > > > > > -Chris > >> >> > >> > > > > > > >> >> > >> > > > > > >> >> > >> > > > > >> >> > >> > > > >> >> > >> > > >> >> > >> > >> >> > > > >> >> > > > >> >> > > >> >> > >> > > >> > > >> > --f4f5e803d9048414e205621c668d--