@@ -9,7 +9,7 @@ Control core.
99core at ` 127.0.0.1:47102 ` .
1010
1111You can check the local ` coconut ` configuration with
12- ``` bash
12+ ```
1313$ coconut about
1414```
1515
@@ -34,7 +34,7 @@ the offered subcommands.
3434
3535At any step, you can type `$ coconut help <subcommand>` to get information on what you can do and how, for example :
3636
37- ` ` ` bash
37+ ` ` `
3838$ coconut help environment list
3939The environment list command shows a list of currently active environments.
4040This includes O² environments in any state.
@@ -59,7 +59,7 @@ Global Flags:
5959Assuming there's a running O² Control core and `coconut` is correctly configured, the following command should
6060return some details on the O² Control core :
6161
62- ` ` ` bash
62+ ` ` `
6363$ coconut info
6464O² Control core running on 127.0.0.1:47102
6565framework id: 1f303909-7beb-4bd2-800d-d71470e211d4-0078
@@ -76,12 +76,12 @@ resource management system (Apache Mesos). No environments and roles running yet
7676If you started the core with the provided `config.yaml`, it should come preloaded with some FairMQ examples.
7777The main subcommand for dealing with environments is (unsurprisingly) `environment`. Most subcommands have
7878shortened variants, so you might as well type `env` or `e`. Let's see what's running.
79- ` ` ` bash
79+ ```
8080$ coconut env list
8181no environments running
8282```
8383How do we create one? We can always ask `coconut`.
84- ` ` ` bash
84+ ```
8585$ coconut help env create
8686The environment create command requests from O² Control the
8787creation of a new O² environment.
@@ -101,13 +101,13 @@ Flags:
101101Note that if your `coconut` instance is configured correctly to point to the core's configuration (either Consul
102102or file), you can use the low level `dump` subcommand to list the available workflow templates.
103103
104- ` ` ` bash
104+ ```
105105$ coconut config dump /o2/control/workflows
106106```
107107
108108Let's create an environment by loading the workflow template for the FairMQ 1-n-1 example.
109109This will take a few seconds.
110- ` ` ` bash
110+ ```
111111$ coconut env create -w fairmq-ex-1-n-1
112112new environment created
113113environment id: 8132d249-e1b4-11e8-9f09-a08cfdc880fc
@@ -117,7 +117,7 @@ state: CONFIGURED
117117Boom. All environments transition to `CONFIGURED` immediately after creation.
118118This corresponds to the `READY` state for a FairMQ process, so a lot has already happened behind the scenes.
119119
120- ` ` ` bash
120+ ```
121121$ coconut env list
122122 ID | CREATED | STATE
123123+--------------------------------------+-------------------------+------------+
@@ -127,7 +127,7 @@ Take note of the environment ID, as it's the primary key for other environment o
127127
128128We can also check what tasks are currently running.
129129
130- ` ` ` bash
130+ ```
131131$ coconut role list
132132 NAME | HOSTNAME | LOCKED
133133+----------------------------------------------------------------+----------------+--------+
@@ -143,7 +143,7 @@ $ coconut role list
143143
144144Let's start the data flow. If all goes well, `START_ACTIVITY` takes us to `RUNNING`.
145145
146- ` ` ` bash
146+ ```
147147$ coconut env control 8132d249-e1b4-11e8-9f09-a08cfdc880fc --event START_ACTIVITY
148148transition complete
149149environment id: 8132d249-e1b4-11e8-9f09-a08cfdc880fc
@@ -152,7 +152,7 @@ state: RUNNING
152152
153153We can also query the state of the environment.
154154
155- ` ` ` bash
155+ ```
156156$ coconut env show 8132d249-e1b4-11e8-9f09-a08cfdc880fc
157157environment id: 8132d249-e1b4-11e8-9f09-a08cfdc880fc
158158created: 2018-11-06 12:10:01 CET
@@ -161,7 +161,7 @@ roles: fairmq-ex-1-n-1-processor#813a8b57-e1b4-11e8-9f09-a08cfdc880
161161```
162162
163163And then we go back.
164- ` ` ` bash
164+ ```
165165$ coconut e t 8132d249-e1b4-11e8-9f09-a08cfdc880fc -e STOP_ACTIVITY
166166transition complete
167167environment id: 8132d249-e1b4-11e8-9f09-a08cfdc880fc
0 commit comments