Skip to content

Commit

Permalink
Update setup instructions in readme files
Browse files Browse the repository at this point in the history
  • Loading branch information
GodVenn committed Jul 5, 2022
1 parent d12391b commit 5363a0b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ For development, please fork the repository. Then, clone the repository:
git clone https://github.com/equinor/flotilla
```

Please see separate installation and setup guides for [frontend](frontend), [backend](backend), and [Broker](broker).
Please see separate installation guides for [frontend](frontend), [backend](backend), and [Broker](broker).
For the environment setup, either run the script as described below or do it manually as described in each component.

### Automatic environment setup

Run the [setup.sh](./setup.sh) to automatically set up your dev environment for the components.
This script will ask you for the `Client Secret` for the backend and the `MQTT broker server key` for the MQTT broker.

## Run with docker

Expand Down
11 changes: 9 additions & 2 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,19 @@ If you already have visual studio installed, you can open the "Visual Studio Ins
To set up the backend on **Linux**, install .NET for linux
[here](https://docs.microsoft.com/en-us/dotnet/core/install/linux).

For the configuration to be able to read secrets from the keyvault, you will need to have the client secret stored locally
in your secret manager as described in the [Configuration Section](#Configuration).
For the configuration to be able to read secrets from the keyvault, you will need to have the client secret stored locally in your secret manager.

For the MQTT client to function, the application expects a config variable named `mqtt-broker-password`, containing the password for the mqtt broker.
This must either be stored in a connected keyvault or in the ASP.NET secret manager.

### Automatic environment setup

See [Flotilla readme](../README.md#setup)

### Manual environment setup

Add the client secret as described in the [Configuration Section](#Configuration).

## Run

To build and run the app, run the following command in the backend folder:
Expand Down
9 changes: 8 additions & 1 deletion broker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@

The broker expects a private key for its server x509 certificate used for TLS.
This must be provided through an environment variable called `FLOTILLA_BROKER_SERVER_KEY`.
This is a secret, and should be treated as such. It can be found in our keyvault.
This is a secret, and should be treated as such. It can be found in our keyvault.

### Automatic environment setup

See [Flotilla readme](../README.md#setup)

### Manual environment setup

The best way to pass this is to store it in a `.env` file in the root of flotilla, and docker compose loads this by default on startup.
See [Using the “--env-file” option](https://docs.docker.com/compose/environment-variables/#using-the---env-file--option) for more information.

Expand Down
9 changes: 8 additions & 1 deletion frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
The app uses TypeScript and React. For development, Node v17.x needs to be installed. Installation instructions can be found
[here](https://github.com/nodesource/distributions/blob/master/README.md).

The application reads environment variables from the `.env` file in the `frontend` folder.
The application reads environment variables from the `.env` file in the `frontend` folder.

### Automatic environment setup

See [Flotilla readme](../README.md#setup)

### Manual environment setup

As a starting point, make a copy of the `.env.example` file and rename it to `.env`.

## Install
Expand Down

0 comments on commit 5363a0b

Please sign in to comment.