-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
0 additions
and
86 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,27 +1,2 @@ | ||
# `recipe-runner` design | ||
|
||
See [`recipe-runnerd` spec](../../spec/executable/recipe-runner.md) for the | ||
public interface for `recipe-runnerd`. | ||
|
||
`recipe-runner` is designed to run as a wrapper on the recipe's lifecycle script | ||
section. It will take the script section as is and will replace the recipe | ||
variables with appropriate values during runtime. The executable also | ||
understands the gg-global config and how to interact with it. | ||
|
||
Once a recipe is translated to a unit file, the selected lifecycle will be | ||
converted to a json file with its different lifecycle section. Each lifecycle | ||
section will generate a unit file that is suffixed with it's phase. For an | ||
example a recipe names `sampleComponent-0.1.0` will have unit files named | ||
`sampleComponent-0.1.0_install` and `sampleComponent-0.1.0_run` to represent | ||
install and run phase of lifecycle. As per the recipe2unit's design. | ||
|
||
Once a unit file is created `ggdeploymentd` will use `recipe2unit`'s functions | ||
to execute the specific unit file that will run provided lifecycle phase as a | ||
first time installation process. | ||
|
||
`recipe-runner` will use the provided selected lifecycle section and use | ||
`execvp` to execute the argument provided lifecycle section as a bash script. It | ||
will also forward any environment variables set during runtime. As a side effect | ||
it will create a temporary bash script file with all the gg-recipe variables | ||
replaced with appropriate actual values from the global config and then use will | ||
provide the newly created script file to `execvp`. |
This file contains 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 |
---|---|---|
@@ -1,42 +1,2 @@ | ||
# `recipe-runnerd` spec | ||
|
||
`recipe-runnerd` will act like a wrapper around the generic component to | ||
dynamically update the GG-recipe variables | ||
|
||
- [recipe-runnerd-1] The executable will execute all the commands within a | ||
selected phase as a bash script. | ||
- [recipe-runnerd-2] The executable will also forward its environment variables | ||
to the running script using global config. | ||
- [recipe-runnerd-3] On execution failure it prints the error message to stderr | ||
- [recipe-runnerd-4] The executable will take only 1 file as an argument and | ||
phase | ||
|
||
## CLI parameters | ||
|
||
## phase | ||
|
||
- [recipe-runnerd-param-phase-1] The argument will dectate which phase needs to | ||
be executed. | ||
- [recipe-runnerd-param-phase-2] The phase argument can be provided by `--phase` | ||
or `-p`. | ||
- [recipe-runnerd-param-phase-3] The phase argument is required. | ||
|
||
### filePath | ||
|
||
- [recipe-runnerd-param-filePath-1] The argument will provide the path to | ||
selected lifecycle json. | ||
- [recipe-runnerd-param-filePath-2] The filePath argument can be provided by | ||
`--filepath` or `-f`. | ||
- [recipe-runnerd-param-filePath-3] The filePath argument is required. | ||
|
||
### timeout | ||
|
||
- [recipe-runnerd-param-timeout-1] The argument will allow user to edit the | ||
timeout seting for the given script in seconds. | ||
- [recipe-runnerd-param-timeout-2] The deafult value for the parmeter is 30 | ||
seconds. | ||
- [recipe-runnerd-param-timeout-3] The timeout argument can be provided by | ||
`--timeout` or `-t`. | ||
- [recipe-runnerd-param-timeout-4] The timeout argument is optional. | ||
|
||
## Environment Variables |
This file contains 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 |
---|---|---|
@@ -1,22 +1 @@ | ||
# `recipe2unit` spec | ||
|
||
`recipe2unit` converts a GG recipe into a linux specific systemd unit file so | ||
that it can be deployed within the edge device. | ||
|
||
- [recipe2unit-1] The executable intakes a GG recipe file and spits out a .unit | ||
file with all the features represented within the recipe. | ||
- [recipe2unit-2] In case of an error it will output `Error Parsing Recipe` | ||
along with appropriate error message. | ||
|
||
## CLI parameters | ||
|
||
### recipe-path | ||
|
||
- [recipe2unit-param-path-1] This argument will allow user to specify the | ||
recipe's location within the disk. | ||
- [recipe2unit-param-path-2] The argument must be provided by `--recipe-path`. | ||
- [recipe2unit-param-path-3] The argument is a required field | ||
|
||
## Environment Variables | ||
|
||
## Core Bus API |