Skip to content

Commit

Permalink
Add ability to configure nox log level
Browse files Browse the repository at this point in the history
  • Loading branch information
nahsi committed Sep 21, 2024
1 parent dfb2d89 commit efadf01
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 16 deletions.
46 changes: 31 additions & 15 deletions roles/nox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ See this [example](https://github.com/fluencelabs/ansible/blob/main/example/)
### Cleanup nox state

Rerun playbook with `nox_cleanup_state` set to `true`:

```bash
ansible-playbook nox.yml -e "nox_cleanup_state=true"
```
Expand All @@ -22,7 +23,9 @@ ansible-playbook nox.yml -e "nox_branch=FLU-688"

## Role Variables

See [defaults/](https://github.com/fluencelabs/ansible/blob/main/roles/nox/defaults) for details and examples.
See
[defaults/](https://github.com/fluencelabs/ansible/blob/main/roles/nox/defaults)
for details and examples.

#### `fluence_project_dir`

Expand All @@ -43,52 +46,65 @@ Should be put to `files/` directory where you run this role.
- version of nox
- type: string

#### `nox_log_level`

- log level passed to `RUST_LOG` variable. Individual components log level can
me set like this `nox_log_level: "info,chain-listener=debug"`
- type: string
- default:
```yml
nox_log_level: "info"
```
#### `nox_dir`

- root nox directory
- type: string
- default:
```yml
nox_dir: "/opt/fluence/nox"
```
```yml
nox_dir: "/opt/fluence/nox"
```

It will contain everything this role creates: nox binaries, configs, secrets.

#### `nox_unit_file`

- systemd unit file
- type: string
- default: see [defaults/main.yml](https://github.com/fluencelabs/blob/main/roles/nox/defaults/main.yml)
- default: see
[defaults/main.yml](https://github.com/fluencelabs/blob/main/roles/nox/defaults/main.yml)

#### `nox_user`

- owner of Nox process and files
- type: string
- default:
```yml
nox_user: "nox"
```
```yml
nox_user: "nox"
```

#### `nox_group`

- group of `nox_user`
- type: string
- default:
```yml
nox_group: "nox"
```
```yml
nox_group: "nox"
```

#### `nox_cleanup_state`

- whether to cleanup nox state
- type: bool
- default:
```yml
nox_cleanup_state: false
```
```yml
nox_cleanup_state: false
```

#### `nox_branch`
- whole catalogue of branches can be viewed here https://files.fluence.dev/buckets/fluence-artifacts

- whole catalogue of branches can be viewed here
https://files.fluence.dev/buckets/fluence-artifacts

- type: string

Expand Down
3 changes: 2 additions & 1 deletion roles/nox/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ nox_dir: "/opt/fluence/nox"
nox_project_dir: ""
nox_group: "nox"
nox_user: "nox"
nox_log_level: "info"
nox_branch: ""
nox_cleanup_state: false
nox_unit_file: |
Expand All @@ -15,7 +16,7 @@ nox_unit_file: |
Environment="FLUENCE_CONFIG={{ nox_dir }}/Config.toml"
Environment="FLUENCE_BASE_DIR={{ nox_dir }}/state"
Environment="FLUENCE_ROOT_KEY_PAIR__PATH={{ nox_dir }}/state/root_secret_key.ed25519"
Environment="RUST_LOG=info,chain-listener=debug,chain-connector=debug"
Environment="RUST_LOG={{ nox_log_level }}"
ExecStart={{ nox_dir }}/nox
Restart=on-failure
User=root
Expand Down

0 comments on commit efadf01

Please sign in to comment.