Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
grk2450-fireworks-tutorial
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ivan Kondov
grk2450-fireworks-tutorial
Commits
6bf22da7
Commit
6bf22da7
authored
7 years ago
by
Ivan Kondov
Browse files
Options
Downloads
Patches
Plain Diff
made better structure and spell check
parent
ae68196e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/basics.rst
+20
-10
20 additions, 10 deletions
docs/basics.rst
with
20 additions
and
10 deletions
docs/basics.rst
+
20
−
10
View file @
6bf22da7
...
@@ -7,6 +7,9 @@ the top folder of the tutorial.
...
@@ -7,6 +7,9 @@ the top folder of the tutorial.
Compose fireworks and workflows
Compose fireworks and workflows
-------------------------------
-------------------------------
Formats and editors
~~~~~~~~~~~~~~~~~~~
Fireworks and Workflows can be defined in three different general-purpose
Fireworks and Workflows can be defined in three different general-purpose
languages: Python, JSON and YAML. There is no domain-specific language for
languages: Python, JSON and YAML. There is no domain-specific language for
FireWorks and thus no specialized editor. This is why, a normal text editor is
FireWorks and thus no specialized editor. This is why, a normal text editor is
...
@@ -16,10 +19,18 @@ is "nice to have".
...
@@ -16,10 +19,18 @@ is "nice to have".
All workflow definitions in all exercises will be based on JSON and YAML.
All workflow definitions in all exercises will be based on JSON and YAML.
Exercise 5 will introduce to writing a custom Firetask for which
Exercise 5 will introduce to writing a custom Firetask for which
Python will be used. Again, JSON and YAML will be used to define the workflows
Python will be used. Again, JSON and YAML will be used to define the workflows
using
the
custom Firetask. For each exercise there are one or more initial
using custom Firetask
s
. For each exercise there are one or more initial
examples in the **exercises/demos** folder. We recommend trying these examples
examples in the **exercises/demos** folder. We recommend trying these examples
before starting solving the problems.
before starting solving the problems.
**NOTE:** Most of the examples here will be presented in YAML (more readable and
concise). If you feel more comfortable with editing JSON you can use the converters
``yaml2json`` and ``json2yaml`` provided in the **bin** folder or/and the provided
JSON versions of the demos and solutions.
Workflow structure
~~~~~~~~~~~~~~~~~~
The building blocks of a workflow are the fireworks. The firework is the minimum
The building blocks of a workflow are the fireworks. The firework is the minimum
possible piece of the worklfow executed by the rocket launcher (see execution_).
possible piece of the worklfow executed by the rocket launcher (see execution_).
The major part of the workflow description is the list of fireworks, ``fws``.
The major part of the workflow description is the list of fireworks, ``fws``.
...
@@ -60,7 +71,7 @@ Here is a short example of a workflow, demonstration the use of the
...
@@ -60,7 +71,7 @@ Here is a short example of a workflow, demonstration the use of the
metadata: {}
metadata: {}
name: Simple coffee workflow
name: Simple coffee workflow
Open a text editor, such as
*vi*, *nano*, *
gedit
*
or
*
emacs
*
, and save the
Open a text editor, such as
``vi``, ``nano``, ``
gedit
``
or
``
emacs
``
, and save the
example above as **workflow.yaml**.
example above as **workflow.yaml**.
...
@@ -73,9 +84,9 @@ life cycle.
...
@@ -73,9 +84,9 @@ life cycle.
When used productively the LaunchPad contains many workflows in different states.
When used productively the LaunchPad contains many workflows in different states.
To distinguish between different workflows, the query commands can specify e.g.
To distinguish between different workflows, the query commands can specify e.g.
the firework ID from the relevant workflow on the LaunchPad or perform a
the firework ID from the relevant workflow on the LaunchPad or perform a
mongo-like queries. To avoid the need apply filters to the queries,
at the
mongo-like queries. To avoid the need
to
apply filters to the queries,
we will
beginning of each exercise in this tutorial we will clean up the LaunchPad from
clean up the LaunchPad from previous fireworks at the beginning of each exercise
previous fireworks
with this command::
in this tutorial
with this command::
lpad reset
lpad reset
...
@@ -96,10 +107,9 @@ at this stage and the errors appear at run time. To also check for such errors
...
@@ -96,10 +107,9 @@ at this stage and the errors appear at run time. To also check for such errors
the *-c* or *--check* flags can be used when adding the workflow to the
the *-c* or *--check* flags can be used when adding the workflow to the
LaunchPad::
LaunchPad::
lpad add -c workflow.json
lpad add -c workflow.json
If a workflow has been added without check it can be check later with::
If a workflow has been added without
such a
check
,
it can be check
ed
later with::
lpad check_wflow -i <firework ID>
lpad check_wflow -i <firework ID>
...
@@ -144,9 +154,9 @@ fireworks are completed (state *COMPLETED*) and the states of linked child
...
@@ -144,9 +154,9 @@ fireworks are completed (state *COMPLETED*) and the states of linked child
fireworks are updated as soon as a firework if completed. This means that any
fireworks are updated as soon as a firework if completed. This means that any
workflow will be run until there are no more fireworks in *READY* state.
workflow will be run until there are no more fireworks in *READY* state.
**NOTE:** In singleshot mode ``rlaunch`` runs the firework in the directory
where it is
**NOTE:** In singleshot mode ``rlaunch`` runs the firework in the directory
started. In rapidfire mode ``rlaunch`` creates
a runtime sibdirectory on
e per
firework
where it is
started. In rapidfire mode ``rlaunch`` creates
separat
e per
-
firework
and executes each firework in a separate directory
.
sub-directories at run time in which the fireworks are executed
.
To suppress verbose information on the screen the *-s* flag can be added::
To suppress verbose information on the screen the *-s* flag can be added::
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment