Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Add kallithea_version fact #10

Open
rauchrob opened this issue Jul 22, 2015 · 2 comments
Open

Add kallithea_version fact #10

rauchrob opened this issue Jul 22, 2015 · 2 comments
Milestone

Comments

@rauchrob
Copy link
Owner

No description provided.

@rauchrob rauchrob added this to the 0.3 milestone Jul 22, 2015
@rauchrob
Copy link
Owner Author

Have a look at the elasticsearch facts.

@rauchrob rauchrob modified the milestones: 0.4, 0.3 Jul 28, 2015
@rauchrob
Copy link
Owner Author

The elasticsearch module provides this esentially as follows:

  1. A selection of Puppet variables is written to a YAML file on the agent host (namely to /etc/elasticsearch/elasticsearch.yml
  2. Custom Facts are created, which read this YAML file.

For Kallithea, we will only have to remember the path $venv to its virtualenv (but be prepared that there are multiple instances and thus multiple virtualenvs), then the Kallithea version can be computed by running ${venv}/bin/pip show kallithea | grep '^Version:' | cut -d' ' -f2 or something like that

rauchrob added a commit that referenced this issue Oct 4, 2015
The implementation of the `kallithea_version` fact has been heavily
inspired by the elasticsearch/elasticsearch module.

The idea is to get the Kallithea version from the output of `pip version
kallithea`. However, the problem is that the path to the pip binary of
Kallitheas virtualenv depends on `$kallithea::install::venv`, which is
unknown on the puppet client. Therefore, we first store this information
on the Puppet client in `/etc/kallithea.yml` which enables us to read
them later, when the `kallithea_version` fact needs to be evaluated.

The concept of persisting interesting information on the client side
seems to be so useful, that I have generalized this by means of the
`settings_store` class and the `stored_setting` defined type. They are
based on the richardc/datacat module, which allows us to merge the data
given by multiple `stored_setting` declarations before they get written
to `/etc/kallithea.yml`.

refs #10
@rauchrob rauchrob mentioned this issue Oct 4, 2015
@rauchrob rauchrob modified the milestones: 0.4, 0.5 Dec 7, 2015
@rauchrob rauchrob modified the milestones: 1.0, 0.5 Jan 19, 2016
@rauchrob rauchrob modified the milestones: 1.0, 2.0 Feb 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant