mirror of
https://github.com/google/glazier.git
synced 2025-12-19 18:27:35 -05:00
chore: Multiple freshness updates
PiperOrigin-RevId: 490734481
This commit is contained in:
committed by
Copybara-Service
parent
9c5f120db8
commit
282eea22a4
@@ -1,6 +1,6 @@
|
||||
# Glazier Setup Overview
|
||||
|
||||
<!--* freshness: { owner: 'winops-imaing' reviewed: '2021-11-02' } *-->
|
||||
<!--* freshness: { owner: '@tseknet' reviewed: '2022-11-24' } *-->
|
||||
|
||||
If you're new to Glazier, the [About Glazier](about.md) document will give a
|
||||
high-level overview of what Glazier is and how it works.
|
||||
@@ -101,11 +101,12 @@ One way to accomplish this would be to:
|
||||
## Distribution Point
|
||||
|
||||
Glazier requires a web-based repository of binary and image files to be
|
||||
available over HTTP(S). You can use any web server or platform that suits your
|
||||
needs.
|
||||
available over HTTP(S). Configuration files can be served over this same
|
||||
web-based repository, or a local directory. You can use any web server or
|
||||
platform that suits your needs.
|
||||
|
||||
Inside the root of your web host, create two directories: the config root and
|
||||
the binary root.
|
||||
Inside the root of your web host/local filesystem, create two directories: the
|
||||
config root and the binary root.
|
||||
|
||||
### Config Root
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Creating New Actions
|
||||
|
||||
<!--* freshness: { owner: 'winops-imaging' reviewed: '2021-10-19' } *-->
|
||||
<!--* freshness: { owner: '@tseknet' reviewed: '2022-11-24' } *-->
|
||||
|
||||
Glazier's Actions are the core of the system's configuration language. Glazier
|
||||
ships with some [existing actions](../actions.md), but for more custom
|
||||
@@ -22,7 +22,7 @@ All actions receive two parameters, as defined by BaseAction: `args` and
|
||||
|
||||
* An example of the Get action with its args, as written in a config:
|
||||
|
||||
```
|
||||
```yaml
|
||||
Get:
|
||||
- ['windows10.wim', 'c:\base.wim', '4b5b6bf0e59dadb4663ad9b4110bf0794ba24c344291f30d47467d177feb4776']
|
||||
```
|
||||
@@ -41,7 +41,7 @@ configs.
|
||||
Import `BaseAction` and create a new Python class decended from it. The name of
|
||||
the class will be the name of the command we use in new configs.
|
||||
|
||||
```
|
||||
```python
|
||||
from glazier.lib.actions.base import ActionError
|
||||
from glazier.lib.actions.base import BaseAction
|
||||
|
||||
@@ -73,7 +73,7 @@ it should abort the installation until things are fixed.
|
||||
Once your action class has been defined, open *glazier/lib/actions/\_\_init\_\_.py*. Add
|
||||
a new line declaring the name of your class to export it to the config handler.
|
||||
|
||||
```
|
||||
```python
|
||||
FancyAction = fancy.FancyAction
|
||||
```
|
||||
|
||||
@@ -91,11 +91,11 @@ list, we know a mistake has been made and the config is broken.
|
||||
|
||||
An example validator for Get:
|
||||
|
||||
```
|
||||
def Validate(self):
|
||||
self._TypeValidator(self._args, list)
|
||||
for arg in self._args:
|
||||
self._ListOfStringsValidator(arg, 2, 3)
|
||||
```python
|
||||
def Validate(self):
|
||||
self._TypeValidator(self._args, list)
|
||||
for arg in self._args:
|
||||
self._ListOfStringsValidator(arg, 2, 3)
|
||||
```
|
||||
|
||||
The `Validate` function should raise `ValidationError` if it finds a problem
|
||||
@@ -113,7 +113,7 @@ Once we have the config YAML, testing validity of the entire config is as simple
|
||||
as looping through each element, verifying that a corresponding Action exists,
|
||||
and calling its `Validate` function.
|
||||
|
||||
```
|
||||
```python
|
||||
from glazier.lib import actions
|
||||
|
||||
...
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# Tips for Writing Effective Glazier Configs
|
||||
|
||||
<!--* freshness: { owner: 'winops-imaging' reviewed: '2021-10-13' } *-->
|
||||
<!--* freshness: { owner: '@tseknet' reviewed: '2022-11-24' } *-->
|
||||
|
||||
* YAML supports comments. Use them to delineate/decorate config blocks as well
|
||||
as communicating intent or documenting bugs/TODOs.
|
||||
* Pins can be used to exclude items as well. `!win10` will exclude your
|
||||
`win10` pin for example.
|
||||
* Some parts of configs are strictly ordered and others are not. The
|
||||
top-level, implemented as an ordered list, will always happen in sequence.
|
||||
Be careful not to assume strict ordering in other parts of the config,
|
||||
@@ -17,6 +19,7 @@
|
||||
include statement that references the new config file.
|
||||
* Use includes and directory structure to break up the configuration flow in a
|
||||
logical way. Everything could live in one file and directory if you wanted
|
||||
it to, but it would be ugly and hard to read.
|
||||
it to, but it would be ugly and hard to read. Technically, Glazier's config
|
||||
can all be in one file, but that wouldn't be very human-readable.
|
||||
* It's easier to cherrypick changes from separate files. Consider separating
|
||||
elements that are frequently changed for easier management across branches.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Glazier Installer Host Specification
|
||||
|
||||
<!--* freshness: { owner: 'winops-imaging' reviewed: '2021-10-19' } *-->
|
||||
<!--* freshness: { owner: '@tseknet' reviewed: '2022-11-24' } *-->
|
||||
|
||||
The spec module contains libraries for determining the desired host
|
||||
specification:
|
||||
|
||||
Reference in New Issue
Block a user