-
Notifications
You must be signed in to change notification settings - Fork 24
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
WIP: Hackweek - Configure proxy formula #178
base: master
Are you sure you want to change the base?
Conversation
In my really simple scenario is working fine, but I don't know if it can be fine in more complicated environment. Any opinions is welcome |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't you missing file or state generating config-answers.txt
?
df78905
to
e555396
Compare
pkg.installed | ||
|
||
{%- if salt['pillar.get']('configure-proxy:ssl:key_group') %} | ||
/root/ssl-build/server.key: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that this is path we have always used, but that was because of user interaction. With salt states we can actually use something more in-line with FHS (even though FHS is these days not relevant).
How about storing it in /run
? Once we call configure-proxy, it calls mgr-ssl-cert-setup which will store certificates to the proper places and these downloaded files are no longer needed. So they can be removed later. /run
is tmpfs these days.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is just for us, then LGTM.
If we want to create package and ship it, then we need form for server username and password. Or some other way how to get this info.
|
||
configure-proxy: | ||
cmd.run: | ||
- name: configure-proxy.sh --rhn-user={{ grains.get('server_username') | default('admin', true) }} --rhn-password={{ grains.get('server_password') | default('admin', true) }} --non-interactive --answer-file /run/config-answers.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really valid only for sumaform
. I do not think salt clients usually have server_username
and server_password
in their grains. Is this intentional? If so, readme should mention steps how to use this formula.
But IMO this should be part of form and passed as pillar.
@@ -0,0 +1,3 @@ | |||
description: | |||
Enable and configure Proxy. | |||
group: general_system_configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: maybe we can have special group for this. Unfortunately formula group names are not product translated, so ${productName}
will not work, but something like SUSE Manager ecosystem
or Uyuni one.
Thanks @aaannz , I'll try to address all these things on next learning tuesday ;) |
This formula provides a new procedure for setting a uyuni proxy. With this new formula, the steps would be:
ca certificate, server certificate and server.key can be saved on the local uyuni proxy or they can be remote
Test can be found here: https://build.opensuse.org/package/show/home:mbussolotto/configure-proxy-formula