14:10:40 #startmeeting AnsibleFest Austin: Contributors Summit - Galaxy Part 2 14:10:40 Meeting started Thu Oct 4 14:10:40 2018 UTC. 14:10:40 This meeting is logged and archived in a public location. 14:10:40 The chair is gundalow. Information about MeetBot at http://wiki.debian.org/MeetBot. 14:10:40 Useful Commands: #action #agreed #halp #info #idea #link #topic. 14:10:40 The meeting name has been set to 'ansiblefest_austin:_contributors_summit_-_galaxy_part_2' 14:11:13 #chair ryansb chouseknecht ryansb newswangerd 14:11:13 Current chairs: chouseknecht gundalow newswangerd ryansb 14:11:32 can't hear house too well 14:14:08 cant hear anything 14:15:16 We're talking about the role arg spec work that alikins did: https://github.com/ansible/ansible/pull/44983 14:17:12 * ryansb can hear 14:17:36 are they speaking right now? 14:17:44 now are 14:17:47 ah, now i heard tim 14:18:05 cool 14:19:23 Sorry we were doing AV things. 14:31:34 https://github.com/ansible/ansible/pull/44983 14:32:13 That is the PR for the ansible-role POC @alikins is talking about ^^^ 14:32:27 The objection: https://github.com/ansible/ansible/pull/44983#issuecomment-424400520 14:32:43 (Or at least the main one he is referring to) 14:34:21 I'm working on this for 2.8 (pulling arg_spec out of AnsibleModule), taking into account the work done by alikins and sivel as well as discussions with abadger1999 and nitzmahone. 14:35:27 So I'm hoping to unify all these ideas and get something working that meets these needs. 14:42:18 https://github.com/ansible/ansible/compare/devel...alikins:argument_spec is the 'arg spec in its own py module' branch. sivel has one as well at... 14:51:38 is there a link to this file calssifier code? 14:51:39 * bmbouter is curious 14:51:53 classifier* :) 14:55:36 sounds like it would simplify galaxy code if you can rely on pulp already providing the tests/scores 14:56:16 For those attending remotely, are you managing to follow along OK? Please do keep your ideas coming. 15:00:13 we have a lot of overlap with docs meeting on the argspec topic 15:06:51 Counterpoint on "you have a score of [low number] and no commits in X years" 15:07:33 that role may actually work great and not have needed changes. For example, I have roles for setting up my desktop machines that have been stable for 1.5-2 years since I wrote them 15:07:59 same, my 'tidy' role really has not needed updates, some things are just simple and stable 15:08:14 this is an AND condition though. 15:08:16 my oracle-java one ... well, that needs changes every year 15:09:15 i have no tests, probably violate all 'best practices' 15:10:04 bmbouter - https://github.com/willthames/ansible-review/blob/master/lib/ansiblereview/__init__.py#L177-L208 15:10:24 some of those violations could be spurious, i.e using shell: apt cause apt module does not suport a specifc switch (--auto-fix) 15:10:45 come on bcoca, just use warn=no 15:10:56 willthames: ty 15:11:33 how does one run the scoring from cli? 15:11:51 although it would punish you for that because generally it should be `command: apt` :) 15:11:53 willthames: so the scoring relies on warning? ... so if i warn=no all my shell usage? 15:12:10 willthames: apt -- | grep 15:12:14 yeah, ansible-lint would assume you know what you're doing 15:12:27 i can see that as a way to game the system 15:13:00 there are always ways to game the system 15:13:34 leave it to @geerlingguy ;) 15:14:22 Well he revealed all his secrets now, so the gaming will increase. :) 15:15:37 don't remove existing roles ever... what gets 'curated' into a 'good for stable ansible' set that is used for search is different 15:15:47 +1 15:15:56 *cough*role distro*cough* 15:16:30 repeat answer from IRC 15:20:07 shell: rm -rf / 15:20:17 ^ i would check even outside of 'python' 15:22:41 Bandit for python security things: https://github.com/PyCQA/bandit 15:25:51 That "shell: rm -rf /" - https://github.com/willthames/ansible-lint/blob/master/lib/ansiblelint/rules/UseCommandInsteadOfShellRule.py ;-) 15:26:18 shell: '{{cmd}} {{options}}' 15:26:25 vars: cmd: rm options: -rf 15:27:09 when you have such dynamic posiblities, linting is limited to what it can handle 15:29:25 For say, https://galaxy-dev.ansible.com/geerlingguy/php-mysql the survey could learn a 'flag this as harmful' etc 15:29:52 15:30:44 yeah, at some point there will have to be someone handling a issue/flagged/takedown/etc queue 15:48:08 alikins: https://gist.github.com/abadger/3edc108f5a5b88c1a9a46c4869d778fd#file-core-rst 15:48:19 alikins: sivel's branch is linked from a comment in there 15:48:23 sdoran: ^ as well 15:49:16 👍 15:57:04 https://github.com/ansible/ansible/compare/devel...sivel:categorization-of-basic to be explicit 16:10:18 well hello there, I was in the wrong channel. 16:10:22 [12:08] qq - how will we manage multiple versions of a role for different projects? 16:10:23 [12:09] Can I still install namespaced packages in a project subdir? 16:10:26 ^^ 16:10:29 he, was pasting for you 16:12:03 That's my main concern—because I often have different projects using different versions of the same role. 16:12:52 One other concern: Is the idea a collection could reference a separate role from elsewhere? E.g. I have a "webserver" collection, and it has some roles etc, but it also pulls in a separate "geerlingguy.apache" role or "geerlingguy.nginx" role so I don't have to duplicate those roles across different collections? 16:13:47 Without that features, collections can be fun little demo thingies, but there's no ability to 'compose' collections and that would be worthless in all but a couple tiny demo projects for me. 16:17:38 runtime should be establish in play/role 16:18:58 imo, fine grained collections (ie, say, 1 role per collection) should be the preferred approach 16:19:06 geerlingguy: I can see the need to compose. where/when would you want to compose what makes up a collection? locally/on-galaxy/both? 16:19:14 locally, mainly 16:19:21 but collections holding multiple collections/plugins/modules etc a possibility 16:19:29 also to note, collections are not 'ansilbe runtime concept' its a 'installer concept' 16:19:30 it would be cool to be able to make collections of collections on galaxy, but that sounds like it could be a little harder 16:20:00 ansible still just uses modules/plugins/roles as it does today 16:20:09 its the installation that collections make easier 16:20:29 okay, I think that was a little of my confusion, it sounded like you would use like "one collection" for a playbook 16:20:58 you could structure your collections per playbook, but that is not a requirement 16:21:01 So for the most part, my roles would become "a collection with one role" 16:21:07 probably 16:21:16 and that's fine by me :) 16:21:16 or if you have closely related roles/modules/plugins 16:21:22 Do collections allow for multiple versions of the same role/plugin/module to co-exist on the same system? 16:21:26 yeah that makes sense 16:21:47 sdoran: that is not inherit of collections but of the installer and how ansible executes 16:22:04 @sdoran: multiple versions of the same role in a collection is not handled 16:22:06 so mazer/ansible need to decide how to handle versions, collections just specify 'which version' 16:22:12 and yeah, back to the multiple version thing ^^ just being able to have playbook A use geerlingguy.apache 1.2.3 and playbook B use 3.2.1 is important (easy enough if mazer install can install locally instead of under ~) 16:22:19 geerlingguy: re collections of collections... I tend to agree. Some variation of that idea may be required to make it so a single git repo can be a collection and a trad style role simultaneously 16:23:00 alikins: yeah, for my own roles I always support n-2 Ansible releases (unless impossible), so I don't like the idea of having to fork things for a year or something weird like that 16:23:51 Ok. That's what I was wondering. 16:24:13 If you have a playbook that just says "apache" and you have "apache" in five different collections, which one gets used? 16:24:21 Namespacing roles makes it clearer. 16:24:24 collections use namespaces 16:24:44 the problem is 'non namespaced apache' module, it will use 'first in path' 16:24:50 So it'd be "collection1.apache". 16:24:54 sdoran: only a single version of a fully qualified role/module (ie, alikins.my_collection.my_module). But each namespace / collection could have different versions (ie, alikins.my_collection_old.my_module) 16:24:55 Right, that can be problematic. 16:25:02 so you cannot use 'apache' with a collection, always 'name.apache' 16:27:50 @alikins i forget, did we say that you could access a module from a collection without the namespace? 16:28:09 oh @chouseknecht just touched on that as i was typing that. ^^^ 16:28:10 that seems like it would be dangerous/not recommended (even if possible) 16:28:51 I wonder if it'd be useful to have the collection namespace be an inventory var. So you could "switch" which set of roles/plugins/modules you're using based on inventory. 16:29:15 Because otherwise you could end up with plabooks that are all the exact same, just with a different collection namespace. 16:29:28 * geerlingguy will be busy writing a script to go back and run `mazer build` and deploy for each git tag in his repos :P 16:30:09 Another quick question—any load testing done or planned for when we start serving archives from Galaxy instead of GitHub? 16:30:14 * sdoran wants to see geerlingguy's scripts for managing his mountain of roles :) 16:30:37 I imagine it will be a lot of bandwidth 16:30:40 @geerlingguy meaning the galaxy hub itself? 16:30:42 yeah 16:31:19 yes that is something we are considering. galaxy moved to red hat's openshift online cluster recently. 16:31:47 Good; I just don't want the launch of hosted archives to be tainted by super slowness or outages :) 16:31:51 we are also going to be working closely with the Red Hat Insights ops team. 16:32:09 geo issues are being discussed and are "on the board." 16:32:52 tima: let me verify, it's been a while but I think it can use short unambiquous names for roles 16:33:02 but thats hardly set in stone 16:33:03 yeah one nice thing about github-hosted-releases is they have their own CDN with good performance in india, asia, australia, etc. 16:33:53 It would be nice to have something like, in the manifest file, have "${GIT_TAG}" or something so when it builds from Travis, Circle, etc., it would just look at the current git tag/commit ref or something? 16:34:08 people still use svn .. but that is their hell to bear 16:34:16 otherwise I'll have to script that process as part of my CI build 16:35:17 svn+- 16:35:20 at least it's better than cvs 16:35:29 geerlingguy: pulp does scale testing regularly and it would actually be the thing serving back the bits 16:35:32 geerlingguy: lowbar 16:35:35 re: bandwidth 16:35:39 re: scalability rather 16:37:02 pulp is an implementation detail and it sounds like it'll work out fine, I'm more worried about the transition than anything else 16:37:19 OH! Forgot one question—how is auth handled? 16:37:21 so am i @geerlingguy 16:37:40 will get to your auth question in a second. 16:37:44 like how do I push my artifact and make sure it's me pushing my artifact? GitHub SSH pubkey synced to galaxy? 16:37:45 Thanks 16:38:40 tima: the bits around https://github.com/ansible/ansible/compare/mazer_role_loader#diff-57063b91d9c7fc66f5b6f2001cb4237eR59 16:39:19 i hope not, if we allow collections to 'cross depend' now we have to be very careful with deletions 16:40:10 I would imagine deletions would not be allowed, except for like "this is a national nuclear launch code stored in the collection" or something insane like that 16:40:34 i would only delete for same reasons we retire a role, severe violations 16:41:31 i would flag as 'unsecure' or 'deprecated' or 'reallydontdothis' so installer can warn 16:44:02 the suggestion is to not allow deletion of things in galaxy but to "hide" them so they don't show up in the UI or otherwise "advertise" that release of the role/content but if you explicitly ask for that version because you know it's there and you depend on it then you can still install it because it will exist 16:44:10 (transcribed for posterity) 16:44:20 having a deprecated checkbox++ 16:44:25 like for my tomcat6 role :P 16:44:33 java-- 16:44:35 like for tomcat in general 16:44:37 it's in dev. The feature allows people to deprecate repo's not individual releases 16:45:07 I'd be okay with repos only; I assume old releases are 'deprecated' anyways, because they're old :) 16:45:55 (and relatedly, signing—don't expect that right away, but someday maybe) 16:46:59 checksums and signing 16:47:12 checksums are easy part 16:47:36 installer should verify 16:47:49 @alikins ^^^ 16:48:00 also, they need to verify 'source' so https is normally enough, but if we want to also 'chain sign' the distributor 16:48:27 i.e galaxy key as we have deb/yum repo keys 16:49:09 just having hosted archives is like 1000x better 16:49:12 no blood tests to verify that statement 16:49:16 geerlingguy: +1 16:49:23 signing adds a little more value, but not nearly as much as getting off github releases 16:49:37 +1 16:49:44 being able to update without spending 30 minutes doing so for every playbook +1 16:49:45 geerlingguy: also, now archive is controlled centrally vs each user being able to remove his repo 16:49:51 yeah 16:52:15 Food is ready 16:56:07 signing artifacts and verifying artifacts before they are installed (ie, 'rpmsign' / gpg) is on the TODO list. As is client storing the pre file checksums somewhere (in the theoretical mazer collection db) for use by mazer to verify installed files (ie, `rpm -Va` style feature) 16:56:16 * alikins tries to catch up scrollback 16:57:52 We are breaking for food now, back in an hour 16:58:15 #endmeeting