Skip to content

Commit 42f60ef

Browse files
committed
[core] Update documentation
1 parent a67add8 commit 42f60ef

3 files changed

Lines changed: 54 additions & 25 deletions

File tree

hacking/BUILDING.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
# Building O² Control
22

3+
## Overview
4+
5+
O² Control consists of four main components:
6+
* core - Go, runs locally for testing purposes and connects to a Mesos master
7+
* executor - Go, runs throughout the cluster
8+
* coconut - Go, runs locally or wherever you like and connects to core
9+
* process control plugin + library - C++, runs throughout the cluster linked by user processes
10+
311
## Go environment
412

513
```bash
614
$ sudo yum update
7-
$ sudo yum install golang
15+
$ sudo yum install golang # or alisw-golang+1.11.1-1 and load the module
816
```
917

10-
We need to get the `protoc` binary for Protobuf 3.5 or later.
11-
It is available as an aliDist recipe, or as `alisw-protobuf+v3.5.2-2` (or newer) in the alisw YUM repository.
18+
We also need to get the `protoc` binary for Protobuf 3.5 or later.
19+
It is available as an aliDist recipe, or as `alisw-protobuf+v3.5.2-4` (or newer) in the alisw YUM repository.
1220
Pick your favorite way to install it, and make sure to load the Protobuf module before continuing.
1321

1422
Installing the `protobuf3-compiler` package from regular CentOS repositories and then creating a `protoc`
15-
symlink to the `protoc3` binary might also work, but is unsupported.
23+
symlink to the `protoc3` binary might also work, but is unsupported.
1624

1725
Setting `GOPATH` and `PATH`:
1826
```bash
@@ -26,10 +34,10 @@ $ go version
2634
$ go env
2735
```
2836

29-
## Clone and build
37+
## Clone and build the Go bits
3038

31-
Fetching the sources. You'll get a "no buildable Go source files" error,
32-
that's because O² Control has its own Makefile instead of using plain `go build`.
39+
Fetching the sources. You'll get a "no buildable Go source files" error and that's ok,
40+
it happens because O² Control has its own Makefile instead of using plain `go build`.
3341
```bash
3442
$ go get -d github.com/AliceO2Group/Control
3543
```
@@ -42,4 +50,7 @@ $ make all
4250

4351
You should find `o2control-core`, `o2control-executor` and `coconut` in `bin`.
4452

45-
Continue with [setting up the development cluster](DCOS.md).
53+
If you wish to also build the process control library and/or plugin, see [the OCC readme](../occ/README.md).
54+
55+
Otherwise, continue with [setting up the development cluster](DCOS.md) which includes instructions on
56+
installing these components from RPM.

hacking/DCOS.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# Setting up the DCOS Vagrant development environment
1+
# Setting up the DC/OS Vagrant development environment
22

3-
Unfortunately there is no suitable setup with just Mesos, so we're going to have to roll out the official DCOS development environment which is based on Vagrant and VirtualBox. Do not try this with less than 32GB of RAM.
3+
Unfortunately there is no suitable setup with just Mesos, so we're going to have to roll out the
4+
official DC/OS development environment which is based on Vagrant and VirtualBox. Do not try this
5+
with less than 32GB of RAM.
46

5-
## DCOS Vagrant quick start
7+
## DC/OS Vagrant quick start
68

79
1. Install Vagrant and VirtualBox.
810
2. Install vagrant-hostmanager plugin.
@@ -13,23 +15,31 @@ $ vagrant plugin install vagrant-hostmanager
1315
```bash
1416
$ git clone https://github.com/dcos/dcos-vagrant
1517
$ cd dcos-vagrant
16-
$ cd <path/to/o²control/hacking>/VagrantConfig.yaml .
18+
$ cp <path/to/o²control/hacking>/VagrantConfig.yaml .
1719
$ vagrant up
1820
```
19-
See [the DCOS Vagrant README](https://github.com/dcos/dcos-vagrant/blob/master/README.md) for more information.
21+
See [the DC/OS Vagrant README](https://github.com/dcos/dcos-vagrant/blob/master/README.md) for more information.
2022

2123
## Setting up O² software
2224

23-
For this we need [`fpctl`](https://github.com/AliceO2Group/Control/tree/master/fpctl). Install it as [instructed](https://github.com/AliceO2Group/Control/blob/master/fpctl/README.md) with `fpctl setup`, then copy into the `fpctl` configuration directory the inventory file for DCOS Vagrant.
25+
This bit really depends on what we want to run. As a minimum, the executor and occ plugin must be installed
26+
on the DC/OS cluster, and the easiest way to do this is from aliBuild-generated RPMs `alisw-Control` including
27+
`alisw-Control-OCCPlugin`.
28+
29+
[`fpctl`](https://github.com/AliceO2Group/Control/tree/master/fpctl) can help with this. Install it
30+
as [instructed](https://github.com/AliceO2Group/Control/blob/master/fpctl/README.md) with
31+
`fpctl setup`, then copy into the `fpctl` configuration directory the inventory file for DC/OS Vagrant.
2432
```bash
2533
$ cp <path/to/o²control/hacking>/inventory ~/.config/fpctl/
2634
```
2735

28-
Then we run `fpctl` to install O² software and configuration. This will also set some Mesos agent attributes which are necessary for matching an O² role to the correct machine. Ansible will spit out some errors, which are generally safe to ignore in this case.
36+
Then we run `fpctl` to install O² software and configuration. This will also set some Mesos agent
37+
attributes which can be useful for matching an O² role to the correct machine. Ansible will spit
38+
out some errors, which are generally safe to ignore in this case.
2939
```bash
3040
$ fpctl deploy -e "ignore_errors=yes"
3141
```
3242

33-
If `fpctl` prompts for it, the password for the `vagrant` user on the DCOS VMs is `vagrant`.
43+
If `fpctl` prompts for it, the password for the `vagrant` user on the DC/OS VMs is `vagrant`.
3444

3545
Continue with [running O² Control](RUNNING.md).

hacking/RUNNING.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,40 @@
11
# Running the O² control system
22

3-
This part assumes you have already set up the Go environment, fetched the sources and built `o2control-core` and `o2control-executor` in `bin`, deployed the DCOS Vagrant development environment and set up O² on this cluster with `fpctl`.
3+
This part assumes you have already set up the Go environment, fetched the sources and built
4+
`o2control-core` and `o2control-executor` in `bin`, deployed the DC/OS Vagrant development
5+
environment and set up the software you wish to run on this cluster (for example with `fpctl`).
46

57
## grpcc
68

7-
In order to talk to `o2control-core` we can use `coconut`, or we can make calls directly with a gRPC client, such as [`grpcc`](https://github.com/njpatel/grpcc).
9+
In order to talk to `o2control-core` we can use `coconut`, or we can make calls directly with a gRPC client,
10+
such as [`grpcc`](https://github.com/njpatel/grpcc).
811

9-
Assuming you have installed Node.js and `npm` (on CC7 `$ sudo yum install http-parser nodejs npm`), the installation with `npm` is straightforward.
12+
Assuming you have installed Node.js and `npm` (on CC7 `$ sudo yum install http-parser nodejs npm`), the
13+
installation with `npm` is straightforward.
1014
```bash
11-
$ npm install -g grpcc
15+
$ sudo npm install -g grpcc
1216
```
1317

1418
## Putting it all together
1519

16-
Assuming the DCOS Vagrant environment is up, a Mesos master will be running at `m1.dcos` with:
17-
* DCOS interface at [`http://m1.dcos/`](http://m1.dcos/),
20+
Assuming the DC/OS Vagrant environment is up, a Mesos master will be running at `m1.dcos` with:
21+
* DC/OS interface at [`http://m1.dcos/`](http://m1.dcos/),
1822
* Mesos interface at [`http://m1.dcos/mesos/`](http://m1.dcos/mesos/),
1923
* Marathon interface at [`http://m1.dcos/marathon/`](http://m1.dcos/marathon/).
2024

21-
The `hacking` directory contains some wrapper scripts that rely on a Mesos master at `m1.dcos` and make running `o2control-core` easy.
25+
The `hacking` directory contains some wrapper scripts that rely on a Mesos master at `m1.dcos` and
26+
make running `o2control-core` easy.
2227

23-
It also contains a dummy configuration file (`example-config.yaml`) which simulates what should normally be a Consul instance.
28+
It also contains a dummy configuration file (`config.yaml`) which simulates what should normally be
29+
a Consul instance.
2430

2531
Run `o2control-core`:
2632
```bash
2733
$ hacking/run.sh
2834
```
2935
or:
3036
```bash
31-
$ bin/o2control-core -mesos.url http://m1.dcos:5050/api/v1/scheduler -executor.binary ./bin/o2control-executor -verbose -config "file://hacking/example-config.yaml"
37+
$ bin/o2control-core -mesos.url http://m1.dcos:5050/api/v1/scheduler -executor.binary </in-cluster/path/to/o2control-executor> -verbose -config "file://hacking/example-config.yaml"
3238
```
3339

3440
Use `grpcc` to talk to it:
@@ -39,3 +45,5 @@ or:
3945
```bash
4046
$ grpcc -i --proto core/protos/o2control.proto --address 127.0.0.1:47102
4147
```
48+
49+
See [Using `coconut`](../coconut/README.md) for instructions on the O² Control core command line interface.

0 commit comments

Comments
 (0)