html5as-tutorial: Add a custom promise demo
Add a custom promise demo to the hml5as tutorial to show how to write plugin promises.
The custom promise merely checks if a file exists, and is used in the tutorial to check that the index.html
file that will be served by the instance exists.
We use the new options added in the slapos.cookbook:promise.plugin
recipe by !1058 (merged) to make creating a custom promise as simple as writing a file and downloading it.
In more details:
- Add a custom promise directly in the SR in
promise/check_index_exists.py
- Download this
promise.py
file - Add the promise in the instance using the new
file
option ofslapos.cookbook:promise.plugin
recipe