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

[DOCS] How do you actually install and try this? #37

Closed
tazaki opened this issue Feb 8, 2024 · 6 comments
Closed

[DOCS] How do you actually install and try this? #37

tazaki opened this issue Feb 8, 2024 · 6 comments
Labels
documentation Improvements or additions to documentation

Comments

@tazaki
Copy link

tazaki commented Feb 8, 2024

Description
I can't seem to find how to actually install and use this extension. My understanding is https://github.com/salt-extensions/saltext-vault/blob/main/README.md is just to install for development.

The install doc here https://github.com/salt-extensions/saltext-vault/blob/main/docs/topics/installation.md says to just salt-pip install saltext-vault but that does not exist.

What am I missing? How do I actually get this installed and try it?

Suggested Fix
Better docs or a link to how to install extensions?

Type of documentation
Guide

Additional context
I am running on a fresh install of salt 3006.5 on almalinux 9.3

Eager to help test but need some guidance please!

@tazaki tazaki added the documentation Improvements or additions to documentation label Feb 8, 2024
@lkubb
Copy link
Collaborator

lkubb commented Feb 14, 2024

Thanks for your interest in this extension! You're correct, this has not been released to PyPi yet. The reason is that imo having a working link to the rendered docs embedded in the release is quite important for this extension, but there is no organization-wide infrastructure for hosting them yet. @nicholasmhughes Has there been any progress regarding hosting the docs for extensions inside the org? Anything I can help with?

For the time being, you would have to build a release yourself to install it:

git clone https://github.com/salt-extensions/saltext-vault
cd saltext-vault
# optionally create a venv
python -m pip install build
python -m build --outdir dist/

This will yield a built wheel at dist/saltext.vault-0.1.dev<...>-py2.py3-none-any.whl, which you should be able to install on your nodes via salt-pip.

@lkubb lkubb pinned this issue Feb 14, 2024
@tazaki
Copy link
Author

tazaki commented Feb 14, 2024

Thank you! I thought my pip wasn't setup correctly...

I'll give this a try and report back...

@tazaki
Copy link
Author

tazaki commented Feb 14, 2024

Thanks! Was able to get it to build and install with your instructions.

[vagrant@saltmaster ~]$ sudo salt-pip list | grep vault
saltext.vault      0.1.dev986+g91e2d10

It seems like my vault.read_secrets are still working as expected...and I haven't made any changes. Is there a way to know I am using this ext instead of the default vault modules?

Edit:
Looks like I did not update my configs so it was falling back. I noticed these messages in the logs:

2024-02-14 22:16:21,038 [saltext.vault.utils.vault.factory:630 ][ERROR   ][5531] Failed to get Vault connection from master! No result returned - does the peer runner publish configuration include `vault.get_config`?
2024-02-14 22:16:21,039 [saltext.vault.utils.vault.factory:443 ][WARNING ][5531] Got empty response to Vault config request. Falling back to vault.generate_token. Please update your master peer_run configuration.

After adding the updates in https://github.com/salt-extensions/saltext-vault/blob/main/docs/topics/migration_from_core.md It worked great! Thank you for the help.

@tazaki tazaki closed this as completed Feb 14, 2024
@lkubb
Copy link
Collaborator

lkubb commented Feb 14, 2024

You're welcome. :)

The configuration is backwards-compatible, so it should have still been using the updated modules while warning about the need for updated config (the log message is in fact proof that you were using the modules from this extension). It's still important to update the config though to avoid unnecessary overhead.

Vs the 3006.* vault modules, there are many differences, most of which are marked by .. version(added|changed):: 1.0.0 in the code. An easy check would be to run salt-call vault.list_secrets some/path keys_only=true, which should only work with this extension.

@nicholasmhughes
Copy link
Member

Has there been any progress regarding hosting the docs for extensions inside the org?

Not yet. It's still on my list, and should get some attention soon.

@lkubb lkubb mentioned this issue Apr 23, 2024
3 tasks
@lkubb
Copy link
Collaborator

lkubb commented Apr 23, 2024

So, I managed to get docs builds from the main branch hosted on our GitHub Pages site (for a start). It's not perfect since they are not versioned (see #40 for details), but it removed the blocker for a first release:

https://pypi.org/project/saltext.vault/ 🎉

That felt good. :) Going to unpin this now, thanks for everyone's patience.

I have some other modules I would like to get included here, as well as Salt-SSH support. Stay tuned!

@lkubb lkubb unpinned this issue Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants