-
Notifications
You must be signed in to change notification settings - Fork 3
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
Update to new formula standards #4
base: master
Are you sure you want to change the base?
Update to new formula standards #4
Conversation
7a75790
to
d9061fb
Compare
I ran the
|
One thing I'm wondering is what is the best for configuration: Like actually, the configuration are directly under the component, for example values:
master:
enabled: true
auth_code: someverystrongsecret
chunkserver:
enabled: true
auth_code: someverystrongsecret
master_host: foo.example.net
hdds:
/srv/moosefs-storage: {} Or under a values:
master:
enabled: true
config:
auth_code: someverystrongsecret
chunkserver:
enabled: true
config:
auth_code: someverystrongsecret
master_host: foo.example.net
hdds:
/srv/moosefs-storage: {} This will require only a little modification of |
d9061fb
to
8db2aed
Compare
My personal preference tends to be having a |
I completely agree with you, I'll wait for one or two more review of this before making the change. Thanks. |
8db2aed
to
444907c
Compare
02e6305
to
70bd1bf
Compare
I fixed some issue in
|
This is the base files for standard community formulas. Reset the `pillar.example` for new values
Force hostname that will be used in generated configuration files.
The v5 `map.jinja` is a generic and configurable system to load configuration values, exposed as the `mapdata` variable, from different places: - YAML files and templates from the fileserver for non-secret data - pillars or SDB are preferred for secret data - grains or `config.get` The `map.jinja` optional sources are configured with compound targeting like syntax `[<TYPE>[:<OPTION>[:<DELIMITER>]]@]<KEY>` with the following default ordered sources: - `Y:G@osarch`: YAML file and Jinja template named after `osarch` grain - `Y:G@os_family`: YAML file and Jinja template named after `os_family` grain - `Y:G@os` YAML file and Jinja template named after `os` grain - `Y:G@osfinger` YAML file and Jinja template named after `osfinger` grain - `C@{{ tplroot ~ ':lookup' }}`: dict retrieved with `salt["config.get"]` - `C@{{ tplroot }}`: dict retrieved with `salt["config.get"]` - `Y:G@id`: YAML file and Jinja template named after `osarch` grain This is done by two new libraries: - `libs/libmatchers.jinja` provides the `parse_matchers` macro to parse strings looking like compound matchers, for example `Y:G@osarch` - `libs/libmapstack.jinja` provides the `mapstack` macro to load configuration from different sources described by matchers Post-processing of `mapdata` variable can be done in a `parameters/post-map.jinja`. The v5 `map.jinja` is documented in `docs/map.jinja.rst`. BREAKING CHANGE: `map.jinja` now exports a generic `mapdata` variable BREAKING CHANGE: The per grain parameter values are now under `moosefs/parameters/`
The `files_switch` macros returns a `source` parameter for `file.managed` state to lookup the source in configurable places. See `docs/TOFS_pattern.rst` for the Template Override and Files Switch (TOFS) pattern.
* moosefs/libs/libconfig.jinja (boolean): convert a jinja boolean to configuration file boolean. (set_config): set a configuration parameter or commented default value. (format_export): format an export entry.
70bd1bf
to
5a93c69
Compare
I rebase my branch and switch to the I found it cleaner to have One thing that should be great is the possibility to test by writing data in the mount point but I don't know what could be a best practice to do that:
If someone has an idea 🙏 |
5a93c69
to
3d11998
Compare
59b74b4
to
2903a14
Compare
97190a0
to
d3cdbcc
Compare
The `moosefs.master` is split into subcomponents: - `moosefs.master.package` to handle packages installation / removal - `moosefs.master.config` to handle service configuration files - `moosefs.master.service` to handle start and stop of the service BREAKING CHANGE: `moosefs.master` is split in `moosefs.master.package`, `moosefs.master.config` and `moosefs.master.service`
The `moosefs.metalogger` is split into subcomponents: - `moosefs.metalogger.package` to handle packages installation / removal - `moosefs.metalogger.config` to handle service configuration files - `moosefs.metalogger.service` to handle start and stop of the service BREAKING CHANGE: `moosefs.metalogger` is split in `moosefs.metalogger.package`, `moosefs.metalogger.config` and `moosefs.metalogger.service`
The `moosefs.chunkserver` is split into subcomponents: - `moosefs.chunkserver.package` to handle packages installation / removal - `moosefs.chunkserver.config` to handle service configuration files - `moosefs.chunkserver.service` to handle start and stop of the service BREAKING CHANGE: `moosefs.chunkserver` is split in `moosefs.chunkserver.package`, `moosefs.chunkserver.config` and `moosefs.chunkserver.service`
The `moosefs.client` is split into subcomponents: - `moosefs.client.package` to handle packages installation / removal - `moosefs.client.config` to configure the mount BREAKING CHANGE: `moosefs.client` is split in `moosefs.client.package` and `moosefs.client.config`
The `moosefs.cgi` install only the `cgi` application.
The `cgiserv` is split into subcomponents: - `moosefs.cgiserv.package` to handle packages installation / removal - `moosefs.cgiserv.config` to handle service configuration files - `moosefs.cgiserv.service` to handle start and stop of the service BREAKING CHANGE: the `cgiserv` was provided by `moosefs.master` and is now split in `moosefs.cgiserv.package`, `moosefs.cgiserv.config` and `moosefs.cgiserv.service`
The `moosefs.cli` install only the `mfscli` command line tool.
The `moosefs.netdump` install only the `mfsnetdump` command line utility.
Minion should only have the proper configuration set and running `state.apply moosefs` will apply only enabled components. BREAKING CHANGE: you must set `master:enabled`, `metalogger:enabled`, `chunkserver:enabled`, `cgiserv:enabled`, `client:enabled`, `cli:enabled` and `netdump:enabled` to install each component with the top level state
d3cdbcc
to
4983d3c
Compare
4983d3c
to
7971280
Compare
In my latest modification:
|
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Primary type
[build]
Changes related to the build system[chore]
Changes to the build process or auxiliary tools and libraries such as documentation generation[ci]
Changes to the continuous integration configuration[feat]
A new feature[fix]
A bug fix[perf]
A code change that improves performance[refactor]
A code change that neither fixes a bug nor adds a feature[revert]
A change used to revert a previous commit[style]
Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)Secondary type
[docs]
Documentation changes[test]
Adding missing or correcting existing testsDoes this PR introduce a
BREAKING CHANGE
?YES
map
:map.jinja
now exports a genericmapdata
variablemap
: The per grain parameter values are now undermoosefs/parameters/
init
: you must setmaster:enabled
,metalogger:enabled
,chunkserver:enabled
,cgiserv:enabled
,client:enabled
,cli:enabled
andnetdump:enabled
to install each component with the top level statemaster
:moosefs.master
is split inmoosefs.master.package
,moosefs.master.config
andmoosefs.master.service
metalogger
:moosefs.metalogger
is split inmoosefs.metalogger.package
,moosefs.metalogger.config
andmoosefs.metalogger.service
chunkserver
:moosefs.chunkserver
is split inmoosefs.chunkserver.package
,moosefs.chunkserver.config
andmoosefs.chunkserver.service
client
:moosefs.client
is split inmoosefs.client.package
andmoosefs.client.config
cgiserv
: thecgiserv
was provided bymoosefs.master
and is now split inmoosefs.cgiserv.package
,moosefs.cgiserv.config
andmoosefs.cgiserv.service
Related issues and/or pull requests
saltstack-formulas/template-formula#21
Describe the changes you're proposing
I update the formula to new community standards:
map.jinja
.cleaned
to remove themlibs/
movePillar / config required to test the proposed changes
Debug log showing how the proposed changes work
./bin/kitchen converge default-debian-11-3004-1-py3
Documentation checklist
README
(e.g.Available states
).pillar.example
.Testing checklist
state_top
).Additional context