-
- Notifications
You must be signed in to change notification settings - Fork 13
Add ADR to define default paths used by OS packages and agent #53
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits Select commit Hold shift + click to select a range
d440c4d
Wrote first version of directory structure adr.
soenkeliebau 4e9afe0
Updated ADR to reflect state of discussion.
soenkeliebau 120d723
Addressed comments by Lars
soenkeliebau 687ead5
Removed anything specific and left only the guiding principles in.
soenkeliebau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
= ADR011: Directory Structure Used by Stackable Components on Managed Hosts | ||
Sönke Liebau <soenke.liebau@stackable.de> | ||
v0.1, 12.03.2021 | ||
:status: accepted | ||
| ||
* Status: accepted | ||
* Deciders: | ||
** Sönke Liebau | ||
* Date: 12.03.2021 | ||
| ||
== Context and Problem Statement | ||
| ||
To run the Stackable platforms some components will need to be installed on the managed servers. | ||
We will offer OS packages for some distributions, currently deb and RPM packages are available. | ||
To make the components behave the same we would like to agree on some default directories and what content we will put there. | ||
| ||
This ADR is less to document alternative solutions, but rather to document the directory structure we agreed on, hence there are no alternative options discussed. | ||
Instead I have added excerpts from the https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html[Filesystem Hierarchy Standard] to illustrate why I think the chosen paths are the correct ones. | ||
| ||
== Decision | ||
| ||
---- | ||
/ | ||
├── etc | ||
│ └── opt | ||
soenkeliebau marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
│ └── stackable | ||
│ ├── agent | ||
│ │ └── secure | ||
│ ├── serviceconfig | ||
│ └── zookeeper-operator | ||
├── opt | ||
│ └── stackable | ||
│ ├── agent | ||
│ ├── packages | ||
│ └── zookeeper-operator | ||
└── var | ||
├── log | ||
│ └── stackable | ||
│ └── servicelogs | ||
└── opt | ||
└── stackable | ||
└── agent | ||
---- | ||
| ||
=== Binaries for Stackable Components | ||
| ||
In accordance with https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#optAddonApplicationSoftwarePackages[3.13.1] we will install the binaries for our components under `/opt/stackable/<packagename>/binaryfile. | ||
soenkeliebau marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
| ||
In the example above there are subdirectories for the agent and the ZooKeeper operator which contain the executable files for these components. | ||
| ||
=== Packages | ||
| ||
For worker servers which are under management by our agent, we will need to install packages that contain the upstream software that is being rolled out by the agent. | ||
As this is is also third party software but being used by Stackable we will install these under `/opt/stackable/' as well, but put them under a subdirectory `packages` | ||
| ||
This only refers to the default setting the agent is configured with though, this path can be freely chosen by the user. | ||
| ||
=== Configuration Files for Stackable Components | ||
| ||
According to https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#etcoptConfigurationFilesForOpt[3.7.4], if our binaries are kept under `/opt` we should keep the associated config files in `/etc/opt` and replicate the same folder structure here that can be found in `/opt`. | ||
| ||
Out of the current components, only the agent requires a config file that will be kept here. | ||
soenkeliebau marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
The agent also requires TLS keys, these will by default be kept in a `/etc/opt/stackable/agent/secret` - but this setting can be overridden in the agent config. | ||
| ||
=== Service Configuration | ||
Following the logic from above, config files that are written for the actual services that are managed by Stackable (Apache Kafka, Apache Hadoop, ...) should also reside in `/etc/opt/stackable` | ||
It doesn't make sense to call the containing directory `packages`, like the parent directory for the binaries, so instead I have renamed it to `serviceconfig` to better express what it actually contains. | ||
| ||
This only refers to the default setting the agent is configured with though, this path can be freely chosen by the user. | ||
soenkeliebau marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
| ||
=== Agent Working Directory | ||
soenkeliebau marked this conversation as resolved. Outdated Show resolved Hide resolved | ||
The agent keeps a working directory on disk, in which it can sometimes place state, depending on configuration and used features. | ||
This directory can be configured in the agent, and will default to `/var/opt/stackable/agent` following https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html#varoptVariableDataForOpt[5.12.1] | ||
| ||
=== Log File | ||
| ||
Stackable components that have been installed from OS packages write their logs directly to the systemd journal. | ||
These need not have a log directory on disk by default. | ||
| ||
For the services that are managed by Stackable, log directories will be kept in per-service subdirectories under `/var/log/stackable/servicelogs`. | ||
This can be configured in the agent and is just the default value. |
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.