updated readme

master
Phanes 2017-12-07 02:24:17 -05:00
parent 49b4e77ca8
commit c75fa9d2c8
1 changed files with 39 additions and 0 deletions

39
README
View File

@ -65,3 +65,42 @@ The PLAN FILE is a specification of the order that Tasks are executed, and their
#### Configuration VERSION
The configuration version is checked to ensure that the configuration is consumable by that version of Examplar. This will pave the way for reverse compatibility if the project moves in that direction.
## I am seriously stupid and I still have no idea how to use this.
That's ok. We like stupid people, too. Here's a hello world.
# 1. Write your test.
First, we want to know all the things we need to be able to print "hello world" to the screen. In this case we just need to make we have the "echo" binary.
Write a bash script that checks if the "echo" binary is on the system.
#!/usr/bin/bash
stat /usr/bin/echo
exit $?
Save it as ~/check-echo.bash.
This script will be your "target" attribute for your "hello world" unit definition.
Write a "hello world" script.
#!/usr/bin/bash
echo "hello world"
exit $?
Save it as ~/hello.bash
This script will be your "rectify" attribute for your "hello world" unit definition.
At this point you've got both the script that checks if hello world can run and you've got your hello world script. Time to set up the unit.
Next, add the unit to the plan by name.
Point your config file at your plan file and your units directory.
Execute examplar:
examplar --verbose --config path/to/your/config/file.json
And you should see your hello world script.