Replies: 2 comments 6 replies
-
soup should have notified you that you have local configurations. Did you not see see it in the output? From https://docs.securityonion.net/en/2.3/soup.html#local-configurations:
|
Beta Was this translation helpful? Give feedback.
-
While we utilize only one Salt environment in Security Onion, it is almost functioning the same as mulitple environments. Below, is how we have configured the file_roots within /etc/salt/master and the top file located at /opt/so/saltstack/default/salt/top.sls. The file_roots dictates the order in which the Salt master will search for the file. If the file is found in local, then it will not look for the file within default. The top file determines which node, get which states and from which environment it is pulled from. /etc/salt/master
/opt/so/saltstack/default/salt/top.sls : note that this example has been simplified
So from the top file, we can see that all nodes If we consider trying to use multiple environments, then we modify
Now that we have two environments, we need to tell the Salt master about the other environment location, we do this by modifying the the config at /etc/salt/master:
So now, if we apply the cron.running state to a node, it will first check in local environment located at A good example of what multipe environments are used for is a dev, qa, prod configuration as seen here: https://docs.saltproject.io/en/latest/ref/states/top.html#multiple-environments I hope I was able to help with the question here. If there are any further questions, please feel free to ask. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Salt offers the ability to use environments functionality. This would allow SecurityOnion devs and admins to not have to overlay entire files in /opt/so/saltstack/local , which can cause problems on updates. In our case, upgrading to 2.3.130 caused massive issues.
The current configuration utilizes a single salt environment, and prioritizes files in local over default. This is fine if you never update, or do much customization. However, in order to change a single value (that is not configurable via pillar) in a file, you have to copy it from default to local, then make modifications, then in a month when you go to upgrade, you have to remember what and why you changed, or build a diff report before upgrading (if you remember to), to keep track of why you rejigged that file. Then after the upgrade, go through all your changes to see if you broke anything by upgrading.
Using a second environment, prioritized above the base environment, would allow you to just put additions (such as cron jobs or users stuff) into that environment. Think about how you modified your salt/common/init.sls .
Yes, using an include statement would also suffice for this. However, it includes the extra overhead of remembering to update that file at upgrade time.
Please let me know if I'm off base here. I've been complaining, and wanted to get other users'/admins' opinions on this. Especially if you have a large grid or highly customized environment.
Beta Was this translation helpful? Give feedback.
All reactions