Set up influxdb

This commit is contained in:
2024-11-08 13:05:05 +01:00
parent ec76048ee0
commit 29f1560272
5 changed files with 88 additions and 6 deletions

View File

@@ -7,6 +7,10 @@ Classes for the devices, to structure each state, Messages exchanged, as data aw
| name | required | info |
|------------------------|----------|-------------------------|
| spring.profiles.active | * | Spring Boot environment |
| influxdb.bucket | | InfluxDB bucket |
| influxdb.org | | InfluxDB organization |
| influxdb.token | ** | InfluxDB access token |
| influxdb.url | * | InfluxDB host url |
Required: * can be stored as text, and ** need to be stored as secret.
@@ -18,7 +22,7 @@ Run `release.sh` script from `master` branch.
### Global gradle properties
To authenticate with Gradle to access repositories that require authentication, you can set your user and token in the `gradle.properties` file.
To authenticate with Gradle for services that require authentication, you can set your users and tokens in the `gradle.properties` file.
Here's how you can do it:
@@ -26,8 +30,17 @@ Here's how you can do it:
- On Unix-like systems (Linux, macOS), this directory is typically `~/.gradle/`.
- On Windows, this directory is typically `C:\Users\<YourUsername>\.gradle\`.
2. Add the following lines to the `gradle.properties` file:
```properties
repository.user=your_user
repository.token=your_token_value
```
or use environment variables `REPOSITORY_USER` and `REPOSITORY_TOKEN`
```properties
repository.user=your_user
repository.token=your_token_value
influxdb.token=your_token_value
```
or use environment variables `REPOSITORY_USER`, `REPOSITORY_TOKEN`, and `INFLUXDB_TOKEN`
### InfluxDB configuration
Create Bucket and Organization in InfluxDB (Local Development)
Log in to InfluxDB (e.g., via the InfluxDB UI at http://localhost:8086).
Click Create Organization, in the field `Organization Name` enter `hlaeja_ltd`, and in field `Bucket Name` enter `device-data`.