-
Notifications
You must be signed in to change notification settings - Fork 2
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
Configuration Design (super issue) #13
Comments
My proposal is described in "Management back-end" google document. |
It seems that i used anchors/aliases in a wrong way - currently they refer to strings instead of whole corresponding nodes... Also I am not sure about a good way to join 3 totally different sections: Services/Applications, Profiles and Stations (with cross-references between them) into one easy to understand and change .YAML file? Any suggestions are welcome! |
@porst17 @elondaits I need your feedback about the proposal... In the meantime i will try to fit the same structure into .INI file. |
My comments: General
or
not
because that is equivalent to
ServicesAndApplications
Profiles.yml
Stations.yml
|
Thanks for your comments. Updated revision:
Fixed - see update.
If we choose to use YAML - better use it fully: as far as i understand Say, if we have some (non-trivial) Profile for ~100 Stations - i would not
Fixed - see update.
All Services (and Applications) have to be defined in some docker-compose But this may change.
All
see to 2.2
Now it is
It seems that we lack a common definition of a Profile :-( IMO having default application in a profile makes it easier to change the Also it simplifies initial creation of new station definitions.
Sorry but I do not believe that there is canonical ("normal") approach which is ALWAYS best with no regard on
I think you consider Profiles as Tags to be attached to Applications, correct?
see 1.1
They both are combined together since currently there is no reuse for But it is possible to share them between Presets that can be easily
Has been renamed to
Corrected. See also 4.1. Is it any better now?
For some types of hosts already
I assume that you refer to using ~/.ssh/config and ~/.ssh/id_rsa, right?
Sure no inventions here - we directly use SSH keys! Just consider:
Did you even read the comments regarding ssh keys in the document |
They're a bit of a nightmare now. Resolving references should be done in our code, not in the YAML parser. In your example you described the apps and created an anchor for each and then on the description of the station you used those anchors.
Anchors can be used by the user to avoid writing the same value many times in the cfg, like a convenient macro... but we shouldn't use it as a structural / organizational element of the config. Also, there's no equivalent in JSON or INIs.
But this is exactly what you're doing with the anchors. We can reference the profile with a name/id and describe it elsewhere and this is resolved very easily in our program.
Yes. But if the value will always be the same then we don't need to indicate it in the cfg or it should go elsewhere where it doesn't need to be repeated. If it will be different each time then change it to make that clearer. Also consider using a default filename so it only needs to be configured if we want to override the default. If the cfg is shorter, it's better.
I'm suggesting it now so we can easily change it. After we coded it it's more difficult to change and once we released it's VERY hard.
They physical location and the software running on it are completely different concerns. We can use tags for physical locations, but tags are very lightweight identifiers that can be configured through a single field or even using the frontend. ... So far I understood the profile was the type of station (touch screen interactive, projector, dome projector, non interactive screen, kinect, etc.)
If Touch screen interactive stations run 5 different apps then having a default one in the cfg doesn't make it any easier to change the assignment because you only affect 1/5th of those... and you'd be configuring 4/5ths explicitly and 1/5th implicitly... which is messy. We should use the front end, and presets, to make it easier / faster to assign apps to stations.
Consider:
But also:
Not "tags", but "compatible profiles", just like the "compatible hardware / OS" requirements of any application. Making both possible does not make sense, because this configuration is used to restrict what apps can be launched on which profiles... if profiles indicate apps and apps indicate profiles you must maintain both lists manually instead of specifying one and computing the other through the program.
I understand the conceptual difference, not the practical purpose. If the relation is necessarily 1:1 (a station doesn't have more than one host, or vice-versa) then separating it makes configuration more complex for no purpose other than expressing a conceptual difference the user might not care about.
You wrote
then specifying "host type" is just adding an extra layer of opacity, when you could just have an explicit key They both are combined together since currently there is no reuse for
If this is a way for a logical station to change to a different physical host I don't understand why we'd want this functionality or extra complexity.
It doesn't matter if the ID is initially the hostname (although you might want shorter IDs without the full domain)... if there is a single My point is simply that a single address field could hold either hostname or IP, and that I can't think of a reason where we need the IP and can't resolve it through the DNS if we don't have it.
Explain the mechanism. The server has a private key and a public key, and there are no reasons why it wouldn't have them. The stations need the public key in its authorized hosts list, and this is transferred just once in a secure manner because it needs to be done using the station's password... so it makes no sense to have it in the cfg. Is there some other mechanism? Because anyway nothing but a public key should leave a system... the private key shouldn't be transmitted or known by external systems.
The same way they'll install an OS, Docker, setup networking, a user, backups, OMD, etc. on 150 stations... This is well beyond the scope of our tool! There are countless tools for parallel administration / deployment. Setting up passwordless ssh access is a security-sensitive operation that is done just once, so it has no reason to be in the config. ... But, how to set up passwordless ssh to 150 stations? With a list of 150 hostnames + their passwords + a script that transfers the server's public key to the authorized_keys file in the home of the user that will run docker using ssh with the password. Then you delete the list of hostnames + passwords. Though, once again, we don't need to take care of this with hilbert.
I don't have access to that document I think (just searched)... but if the idea completely vulnerates the security of stations and ssh credentials then it doesn't matter. If I'm failing to understand something and this is indeed reasonable and perfectly secure then consider a prospective customer might have the same concerns I have and go away, so we need to be clear and avoid misunderstandings. |
@elondaits sorry but I disagree with you on anchors: i noticed no total embedding according to following sample for Python2 with PyYAML & ruamel (see also http://pyyaml.org/wiki/PyYAMLDocumentation#Aliases):
Please also consider the following perfectly valid YAML: Therefore, for me aliases are exactly cross-references that can serve as unique IDs, provided one would not introduce multiple identical anchors by mistake, which can be detected during loading/parsing... but the situation is identical with using strings as IDs for (loose) references - which looks like re-inventing cross-references where they are already available... @elondaits could it be that you think about JSON instead of YAML? |
The fact that we have to send each other code samples to show how the parser interprets the file should be enough to make it clear that this feature isn't obvious enough to be used in cfg. The cfg should be obvious to the user. However...
Notice the Green Goblin was added to team beta and when we do So how can I validate? Suppose I check that every user in a team is also on the people table... I could do that... but consider team gamma where I added a Peter Parker with the wrong age... so to pick that error in the cfg I would have to compare EVERY FIELD of each person to make sure teams and people are consistent. Something else: Notice that on the people table I indexed each member with an ID that's non repeatable, because people is a map. If I repeat an ID the parser will overwrite the former occurrence with the latter... just like would happen on an INI file if I set a value twice. ... but now the ID is not accessible on the copies of the people that are on the teams. If I do |
I suppose you want to ensure that there are always unique canonical places in a config file for defining ALL possible items of the same type (e.g. Tables for "people" / "teams" etc.), where you additionally introduce (almost) unique IDs (as a primary key for those tables) for referencing from other parts - de-referencing such "ID"s you would have to do manually (i.e. know from context): whether some string is a just some a string or a reference to one of existing table. I hope i am not terribly wrong here? Also this approach is very generic and JSON-like. I suppose one just cannot do anything else with JSON... As a developer i am all for that approach! But after learning YAML i tried to make most use of YAML features to enable config-writers to easily create concise definitions with as small additional overhead as possible. In particular: to eliminate that cross-reference matching (IDs are often only introduced intermediately for correct serialization/deserialization) and necessarily total globalization of all kinds of shared information. BTW, following my proposal your sample YAML would look as follows:
As far as i understand parser/loader would have to fail on redefining tags (therefore unique IDs!), semantic checker will complain about old team players (if there is such a rule) and warn about direct object definitions within team definition (instead of using a global alias).
Wow, sounds really dangerous if that silently goes unmentioned by parser/loader due to language specification... e.g. "alice" immediately visible to a config writer is 'Alice Anderson' instead of later overwriting 'Alice Jameson' in a potentially very long listing of people. |
DONE:
|
Some ideas on the association of Stations and Applications:
So:
This has the following advantages:
And these problems:
|
Note: a few things for this super-issue are part of #44 |
Initial design issues:
Hilbert.yaml
?) format: mapping not list (Configuration design: Wrong format: list vs mapping #17). Conclusion: general config structureaddress
,description
,services
anddefault_application
data fields)null
|void
(non-domain words) (Configuration design: Do not use null | void #26).docker-compose.yml
) (Configuration design: Resources specified by URI (e.g. icons) #18, Location ofdocker-compose.yml
is questionable #9)Service
definition (Configuration design: Service definition #19)Hilbert-CLI-Server
know from the config whichServiceRuntime
to use? (How does hilbert know from the config which ServiceRuntime to use? #32). Note: same problem withPowerOnMethod
.profile
(Configuration design: Structure/definition of aprofile
#21). Conclusion: Configuration design: Structure/definition of aprofile
#21 (comment)Application::compatibleStations
: Group (Configuration design: Reflect n:m relation between stations and applications in the configuration #15). Conclusion is here~/.ssh/config
+ station addresses should also be SSH aliases (Configuration design: Separate Access Management? #25).intersectWith
,compatibleStations
. See Configuration design: Rename data fields #20 (comment)The text was updated successfully, but these errors were encountered: