[Swift-devel] new config

Mihael Hategan hategan at mcs.anl.gov
Wed Jul 9 15:16:01 CDT 2014


Hi,

I committed the new config code. Since it's a pretty big change, it
might take some testing to get it ironed out and some time to get used
to. Particularly, the tests have not been updated. Yadu, when you have
some time, let's work on updating our testing tools.

A bit of an overview:
- it's a JSON-like format, with optional key quoting, optional comma
between object keys (if there is a new line), optional "=" before a "{"
and ":" and "=" mean the same thing. So this is valid:
  site.local {
    execution {
      type: "ssh"
      URL: "localhost"
    }
  }
as is
  site.local.execution.type = "ssh"
  site.local.execution.URL = "localhost"

However, in order to reduce confusion, we should encourage only the
former choice.

- Most properties that were in swift.properties had their names changed
from a dot separator to camelCase. It was distasteful to see a file
where site options were camelCase and other options
used.dots.as.separators.

- Some options have changed a bit more than that. For example,
sitedir.keep is now keepSiteDir.

- I removed clustering (it wasn't used and is superseded by coasters)

- I also removed the graph generation option. It wasn't being used much
(outside of I2U2) and I would prefer that such tools be outside of the
run-time code and in the log analysis tools.

- Everything is validated. Unrecognized options, or invalid values will
produce an error. The "schema" used for validation is in
resources/swift.conf.schema.

- The preferred way of mixing configurations is through includes.

- There is a conversion tool, swift-convert-config. You can give it a
sites.xml, tc.data, and swift.properties, and it will print out a new
config from there.

- Somewhat unrelated, but wrapper/provider staging are now selectable
per site. You would say something like site.local { staging:
"provider" }

- There is also a swift-config-info tool. This is similar to David's
-listconfig option. It can list all available configuration properties
and also print documentation on selected options. For somebody who is
working on the command line doing stuff, it may be more convenient than
switching to a web browser to look up the configuration documentation.

- I still need to finish all property descriptions and update the
documentation.

Mihael




More information about the Swift-devel mailing list