All of lore.kernel.org
 help / color / mirror / Atom feed
* article on data in OpenBMC
@ 2020-05-22 20:46 Brad Bishop
  2020-05-26 15:56 ` Andrew Geissler
  0 siblings, 1 reply; 7+ messages in thread
From: Brad Bishop @ 2020-05-22 20:46 UTC (permalink / raw)
  To: openbmc

Hello

I wrote this article on data in OpenBMC to begin an attempt at making
it easier to find data, when porting new systems to OpenBMC.  I say
begin because I only documented three repositories.  The idea is that
more would be added to the list over time.  My intent would be to add
this to the docs repository or to the wiki.  I would love to hear any
feedback on my article or any ideas anyone has on data in OpenBMC.

thx - brad

----------------------------------------
# Data Driven Applications in OpenBMC

**Purpose:** Describe techniques for finding data in OpenBMC.

**Intended Audience:** System integrators, system engineers, developers porting
systems to OpenBMC.

**Prerequisites:** None

If you already know the techniques for finding data in OpenBMC, skip ahead to
[the list of OpenBMC applications with
data](#list-of-openbmc-applications-with-data).

## Techniques for finding data
### Runtime configuration files in bitbake metadata
Some applications consume data in the form of runtime configuration files.
Runtime means the application loads the configuration data when it is invoked,
on the target (on the BMC).  Configuration files are `/etc/<packagename>.conf`
or in `/etc/<packagename>/` in the target's root filesystem.  The format of a
configuration file is application specific.

To identify the location of a configuration file in bitbake metadata, first
identify which bitbake layer will host or already hosts the support for your
target.  Often this is `meta-<vendor>/meta-<target>` or just `meta-<vendor>`.
The former is used in one to one layer to target configurations, the latter in
one to many layer to target configurations.

#### Anatomy of a path in a bitbake layer
Most bitbake layers adhere to a de-facto standard directory hierarchy:

`recipes-<group>/<subgroup>/<package>/<target-group>`

The `<group>` is almost always phosphor, which refers to programs that provide
BMC specific functions and the `<subgroup>` refers to even more specific
functions like fan control or inventory management.  The `<package>` is the
program that makes use of the configuration file.  The `<target-group>` may just
be the target or it may refer to a group of targets if multiple targets share
the same configuration.

Configuration files may be found in the `<target-group>` directory or in the
`<package>` directory.  For example the location of the host processor console
configuration for the [Mihawk][2] server would be:

[`recipes-phosphor/console/obmc-console/mihawk/server.ttyVUART0.conf`][1]

### Build time configuration files in bitbake metadata
Other applications consume data in the form of build time configuration files.
Build time means the data is embedded directly into the application in some
fashion.  Typically build time configuration files in OpenBMC are written in
YAML, but the schemas are application specific.

The location of build time configuration files can be found in the same manner
as runtime configuration files.

### Application specific hardware databases
Another class of applications maintain databases of supported hardware.
Hardware databases are often just a hierarchy of JSON files in
`/usr/share/<packagename>/` in the target root filesystem.  Different
applications have different schema for their databases.  Applications with
hardware databases have some level of support for discovering out what kinds of
hardware exist and then load the correct data from the database.

Like other data, hardware databases can be found in the bitbake metadata.  Or
hardware databases are often found in the source repository for the application
itself.

## List of OpenBMC applications with data
When adding new applications to the list, be sure to indicate whether the
application uses [runtime](#runtime-configuration-files-in-bitbake-metadata) or
[build time](#build-time-configuration-files-in-bitbake-metadata) configuration
files, or a [hardware database](#application-specific-hardware-databases).  Also
list briefly what the application data describes and provide links to
application specific documentation that outline the data schema.

### obmc-console
obmc-console uses runtime configuration files in bitbake metadata.  The
obmc-console configuration describes the physical console (UART or VUART)
parameters.  Additional documentation for the obmc-console configuration can be
found [here][3].

### phosphor-regulators
phosphor-regulators uses a hardware database.  The database describes
information required to configure voltage regulators in servers, or any other
system with a voltage regulator.  Additional information about data in
phosphor-regulators can be found [here][4].

### phosphor-dbus-monitor
phosphor-dbus-monitor uses build time configuration files in bitbake metadata.
The phosphor-dbus-monitor configuration can describe anything, but is typically
used to express power or thermal system policies.  Additional informationi about
data in phosphor-dbus-monitor can be found [here][5].

[1]: https://github.com/openbmc/meta-ibm/tree/master/recipes-phosphor/console/obmc-console/mihawk/server.ttyVUART0.conf
[2]: https://github.com/openbmc/meta-ibm/tree/master/conf/machine/mihawk.conf
[3]: https://github.com/openbmc/obmc-console/tree/master/conf/server.ttyVUART0.conf.in
[4]: https://github.com/openbmc/phosphor-power/tree/master/phosphor-regulators/README.md
[5]: https://github.com/openbmc/phosphor-dbus-monitor/tree/master/src/example/example.yaml

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: article on data in OpenBMC
  2020-05-22 20:46 article on data in OpenBMC Brad Bishop
@ 2020-05-26 15:56 ` Andrew Geissler
  2020-05-26 18:10   ` Vijay Khemka
  2020-05-28  2:00   ` Patrick Williams
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Geissler @ 2020-05-26 15:56 UTC (permalink / raw)
  To: Brad Bishop; +Cc: openbmc



> On May 22, 2020, at 3:46 PM, Brad Bishop <bradleyb@fuzziesquirrel.com> wrote:
> 
> Hello
> 
> I wrote this article on data in OpenBMC to begin an attempt at making
> it easier to find data, when porting new systems to OpenBMC.  I say
> begin because I only documented three repositories.  The idea is that
> more would be added to the list over time.  My intent would be to add
> this to the docs repository or to the wiki.  I would love to hear any
> feedback on my article or any ideas anyone has on data in OpenBMC.

Nice! Definitely a point of confusion for people so having something
like this to reference and point to the more detailed areas is great.

What’s your vision for this article? A doc repo? A wiki? Wikis def
make it more likely to get updated.

> 
> thx - brad
> 
> ----------------------------------------
> # Data Driven Applications in OpenBMC
> 
> **Purpose:** Describe techniques for finding data in OpenBMC.
> 
> **Intended Audience:** System integrators, system engineers, developers porting
> systems to OpenBMC.
> 
> **Prerequisites:** None
> 
> If you already know the techniques for finding data in OpenBMC, skip ahead to
> [the list of OpenBMC applications with
> data](#list-of-openbmc-applications-with-data).
> 
> ## Techniques for finding data
> ### Runtime configuration files in bitbake metadata
> Some applications consume data in the form of runtime configuration files.
> Runtime means the application loads the configuration data when it is invoked,
> on the target (on the BMC).  Configuration files are `/etc/<packagename>.conf`
> or in `/etc/<packagename>/` in the target's root filesystem.  The format of a
> configuration file is application specific.

Not sure if this doc is the best place but I’d like to see a best practices on
file format (i.e. use .json) and runtime config file locations (i.\x10e.\x10 /etc/ /var type 
decisions). Also, the recommendation to make your data runtime config
vs. build time config when possible (to make live debug/test easier).

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: article on data in OpenBMC
  2020-05-26 15:56 ` Andrew Geissler
@ 2020-05-26 18:10   ` Vijay Khemka
  2020-05-28 12:43     ` Brad Bishop
  2020-05-28  2:00   ` Patrick Williams
  1 sibling, 1 reply; 7+ messages in thread
From: Vijay Khemka @ 2020-05-26 18:10 UTC (permalink / raw)
  To: Andrew Geissler, Brad Bishop; +Cc: openbmc



On 5/26/20, 8:57 AM, "openbmc on behalf of Andrew Geissler" <openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of geissonator@gmail.com> wrote:

    
    
    > On May 22, 2020, at 3:46 PM, Brad Bishop <bradleyb@fuzziesquirrel.com> wrote:
    > 
    > Hello
    > 
    > I wrote this article on data in OpenBMC to begin an attempt at making
    > it easier to find data, when porting new systems to OpenBMC.  I say
    > begin because I only documented three repositories.  The idea is that
    > more would be added to the list over time.  My intent would be to add
    > this to the docs repository or to the wiki.  I would love to hear any
    > feedback on my article or any ideas anyone has on data in OpenBMC.
    
    Nice! Definitely a point of confusion for people so having something
    like this to reference and point to the more detailed areas is great.
    
    What’s your vision for this article? A doc repo? A wiki? Wikis def
    make it more likely to get updated.
    
    > 
    > thx - brad
    > 
    > ----------------------------------------
    > # Data Driven Applications in OpenBMC
    > 
    > **Purpose:** Describe techniques for finding data in OpenBMC.
    > 
    > **Intended Audience:** System integrators, system engineers, developers porting
    > systems to OpenBMC.
    > 
    > **Prerequisites:** None
    > 
    > If you already know the techniques for finding data in OpenBMC, skip ahead to
    > [the list of OpenBMC applications with
    > data](#list-of-openbmc-applications-with-data).
    > 
    > ## Techniques for finding data
    > ### Runtime configuration files in bitbake metadata
    > Some applications consume data in the form of runtime configuration files.
    > Runtime means the application loads the configuration data when it is invoked,
    > on the target (on the BMC).  Configuration files are `/etc/<packagename>.conf`
    > or in `/etc/<packagename>/` in the target's root filesystem.  The format of a
    > configuration file is application specific.
    
    Not sure if this doc is the best place but I’d like to see a best practices on
    file format (i.e. use .json) and runtime config file locations (i.?e.? /etc/ /var type 
    decisions). Also, the recommendation to make your data runtime config
    vs. build time config when possible (to make live debug/test easier).

I agree with Andrew here. As not all data are under /etc, some of runtime data are
under /var as well so it would nice to have some policy defined what type can go
where.
    
    


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: article on data in OpenBMC
  2020-05-26 15:56 ` Andrew Geissler
  2020-05-26 18:10   ` Vijay Khemka
@ 2020-05-28  2:00   ` Patrick Williams
  2020-05-28 12:33     ` Brad Bishop
  1 sibling, 1 reply; 7+ messages in thread
From: Patrick Williams @ 2020-05-28  2:00 UTC (permalink / raw)
  To: Andrew Geissler; +Cc: Brad Bishop, openbmc

[-- Attachment #1: Type: text/plain, Size: 460 bytes --]

On Tue, May 26, 2020 at 10:56:19AM -0500, Andrew Geissler wrote:
> 
> 
> > On May 22, 2020, at 3:46 PM, Brad Bishop <bradleyb@fuzziesquirrel.com> wrote:
> What’s your vision for this article? A doc repo? A wiki? Wikis def
> make it more likely to get updated.

A few people asked similarly, but he had already submitted it to Gerrit
before posting to the ML:

    https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/32735

-- 
Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: article on data in OpenBMC
  2020-05-28  2:00   ` Patrick Williams
@ 2020-05-28 12:33     ` Brad Bishop
  0 siblings, 0 replies; 7+ messages in thread
From: Brad Bishop @ 2020-05-28 12:33 UTC (permalink / raw)
  To: Patrick Williams, Andrew Geissler; +Cc: openbmc

On Wed, 2020-05-27 at 21:00 -0500, Patrick Williams wrote:
> On Tue, May 26, 2020 at 10:56:19AM -0500, Andrew Geissler wrote:
> > 
> > > On May 22, 2020, at 3:46 PM, Brad Bishop <
> > > bradleyb@fuzziesquirrel.com> wrote:
> > What’s your vision for this article? A doc repo? A wiki? Wikis def
> > make it more likely to get updated.

I'd be fine with putting it on the wiki.  Does that make more sense?

> 
> A few people asked similarly, but he had already submitted it to
> Gerrit
> before posting to the ML:
> 
>     https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/32735
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: article on data in OpenBMC
  2020-05-26 18:10   ` Vijay Khemka
@ 2020-05-28 12:43     ` Brad Bishop
  2020-05-28 20:20       ` Vijay Khemka
  0 siblings, 1 reply; 7+ messages in thread
From: Brad Bishop @ 2020-05-28 12:43 UTC (permalink / raw)
  To: Vijay Khemka, Andrew Geissler; +Cc: openbmc

On Tue, 2020-05-26 at 18:10 +0000, Vijay Khemka wrote:
> 
> On 5/26/20, 8:57 AM, "openbmc on behalf of Andrew Geissler" <
> openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of 
> geissonator@gmail.com> wrote:
> 
>   
>     Not sure if this doc is the best place but I’d like to see a best
> practices on
>     file format (i.e. use .json) and runtime config file locations
> (i.?e.? /etc/ /var type 
>     decisions). Also, the recommendation to make your data runtime
> config
>     vs. build time config when possible (to make live debug/test
> easier).
> 
> I agree with Andrew here. As not all data are under /etc, some of
> runtime data are
> under /var as well

I do want to make a distinction between data that describes the
properties of the system (e.g. things you'd find in a schematic) vs data
generated by applications.  My intended audience was the people
generating the former.  Any ideas on what an outline that maintains that
distinction and includes application generated data would look like?

>  so it would nice to have some policy defined what type can go
> where.

Yeah, this is definitely something I've been wanting to cover.  Any
ideas on how to make this easy for someone to do?  For example we have
the anti-patterns document with a template - if we have a similar best-
practices document with a template would that help?  I'm not so sure
because the anti-patterns document hasn't gotten much traction
unfortunately...

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: article on data in OpenBMC
  2020-05-28 12:43     ` Brad Bishop
@ 2020-05-28 20:20       ` Vijay Khemka
  0 siblings, 0 replies; 7+ messages in thread
From: Vijay Khemka @ 2020-05-28 20:20 UTC (permalink / raw)
  To: Brad Bishop, Andrew Geissler; +Cc: openbmc



On 5/28/20, 5:43 AM, "Brad Bishop" <bradleyb@fuzziesquirrel.com> wrote:

    On Tue, 2020-05-26 at 18:10 +0000, Vijay Khemka wrote:
    > 
    > On 5/26/20, 8:57 AM, "openbmc on behalf of Andrew Geissler" <
    > openbmc-bounces+vijaykhemka=fb.com@lists.ozlabs.org on behalf of 
    > geissonator@gmail.com> wrote:
    > 
    >   
    >     Not sure if this doc is the best place but I’d like to see a best
    > practices on
    >     file format (i.e. use .json) and runtime config file locations
    > (i.?e.? /etc/ /var type 
    >     decisions). Also, the recommendation to make your data runtime
    > config
    >     vs. build time config when possible (to make live debug/test
    > easier).
    > 
    > I agree with Andrew here. As not all data are under /etc, some of
    > runtime data are
    > under /var as well
    
    I do want to make a distinction between data that describes the
    properties of the system (e.g. things you'd find in a schematic) vs data
    generated by applications.  My intended audience was the people
    generating the former.  Any ideas on what an outline that maintains that
    distinction and includes application generated data would look like?
    
    >  so it would nice to have some policy defined what type can go
    > where.
    
    Yeah, this is definitely something I've been wanting to cover.  Any
    ideas on how to make this easy for someone to do?  For example we have
    the anti-patterns document with a template - if we have a similar best-
    practices document with a template would that help?  I'm not so sure
    because the anti-patterns document hasn't gotten much traction
    unfortunately...
We can have a separate document or section in a document which will talk
about runtime configuration data type and its targeted location. Infact we 
can have a predefined variable for these like $systemdir. And meson will have
definition of these data input. We can also give example of meson file as how
it will be included for any project.
    


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-28 20:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 20:46 article on data in OpenBMC Brad Bishop
2020-05-26 15:56 ` Andrew Geissler
2020-05-26 18:10   ` Vijay Khemka
2020-05-28 12:43     ` Brad Bishop
2020-05-28 20:20       ` Vijay Khemka
2020-05-28  2:00   ` Patrick Williams
2020-05-28 12:33     ` Brad Bishop

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.