Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.1.0 rc #12

Merged
merged 24 commits into from
Jul 4, 2018
Merged

V0.1.0 rc #12

merged 24 commits into from
Jul 4, 2018

Conversation

brucellino
Copy link
Member

Working version of the role.

brucellino and others added 19 commits June 27, 2018 09:33
The data provided by Lavoisier is a bit too complex to handle neatly
directly inside Ansible. The structure is too deep to be able to
efficiently loop over, and the json query becomes difficult to read.
For these reasons, I've decided to parse the data out of band with a
small python script in files/ which writes a cached data file in
JSON format.
The VO data is added to this repository, even though I am in two minds about it.

The pros are as follows:

- The task which configures lsc and vomses files needs this data locally.
- Re-using this role with other ones in playbook means that the data needs
  to be cached, since the user will not know a-priori that the data is needed
- we can do change-control on the data

The cons are as follows:

- there is a risk that the cached data is different from the "live" data
  exposed by lavoisier
- the repository becomes very large
- trivial changes to the file become difficult to maintain (beautifying)
- Caching the data is a manual process which could be easily forgotten by
  admins (can be mitigated with a git hook)
@brucellino
Copy link
Member Author

@gwarf @enolfc @orviz this is ready for review.
The PR is passing on Travis. Please check for

  • minor inconsistencies
  • whether the README is sensible and complete and
  • Any obvious tests which have not been added to the test coverage.

try:
data = requests.get(url).json()
except UserWarning as e:
print e
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work on python 3!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I indeed was troubled by this too. Since Ansible is 2.7, I thought it might be better to stick to a consistent version. Given the upcoming deprecation of 2.7, I guess it won't hurt to have a python3-compatible one too. I'll open an issue for the next milestone.

README.md Outdated
@@ -37,7 +94,7 @@ passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: brucellino.umd, release: 4, }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be EGI-Foundation.umd?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted - it's updated in e5015cc

@@ -36,8 +110,8 @@ passed in as parameters) is always nice for users too:
```yaml
- hosts: servers
roles:
- { role: brucellino.umd, release: 4, }
- { role: EGI-Foundation.voms-client, vos: 'atlas' }
- { role: EGI-Foundation.umd, release: 4 }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently it only works with underscore: EGI_Foundation.umd

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be the case if we were using the search API on galaxy. However, the requirements.yml at the moment is using the git fetcher (since 52ac706).
When the Galaxy API has stabilised, we can move back.

@gwarf gwarf removed their request for review July 2, 2018 12:20
@brucellino
Copy link
Member Author

@enolfc @orviz I think I have addressed your reviews - can you take a look and approve if necessary ?
Thanks!

Copy link
Contributor

@enolfc enolfc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@orviz orviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(y)

@brucellino
Copy link
Member Author

Thanks for the review guys. I'm going to go ahead and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants