mariadb: Collection of small improvements (#909)

* mariadb: Prettier YAML & JSON files

* mariadb: Move data files into data folder

* mariadb: Update add-on URL

* mariadb: Tweaks to documentation and changelog
This commit is contained in:
Franck Nijhof
2019-12-19 12:53:58 +01:00
committed by Pascal Vizeli
parent b30fe9c749
commit f1f67a6d67
7 changed files with 39 additions and 35 deletions

View File

@@ -1,13 +1,17 @@
# Changelog
## 1.3
- Update from bash to bashio
## 1.2
- Change the way to migrate data
## 1.1
- Fix connection issue with 10.3.13
## 1.0
- Update MariaDB to 10.3.13

View File

@@ -8,7 +8,7 @@ ENV LANG C.UTF-8
RUN apk add --no-cache mariadb mariadb-client
# Copy data
COPY run.sh /
COPY mariadb-server.cnf /etc/my.cnf.d/
COPY data/run.sh /
COPY data/mariadb-server.cnf /etc/my.cnf.d/
CMD [ "/run.sh" ]

View File

@@ -10,18 +10,18 @@ You can use this add-on to install MariaDB, which is an open-source (GPLv2 licen
## Installation
The installation of this add-on is straightforward and easy to do.
Follow these steps to get the add-on installed on your system:
1. Navigate in your Home Assistant frontend to **Hass.io** -> **Add-on Store**.
1. Find the "MariaDB" add-on and click it.
1. Click on the "INSTALL" button.
2. Find the "MariaDB" add-on and click it.
3. Click on the "INSTALL" button.
## How to use
1. Set the `logins` -> `password` field to something strong and unique.
1. Start the add-on.
1. Check the add-on log output to see the result.
1. Add `recorder` component to your Home Assistnat configuration.
2. Start the add-on.
3. Check the add-on log output to see the result.
4. Add `recorder` component to your Home Assistant configuration.
## Add-on Configuration
@@ -55,21 +55,21 @@ Example add-on configuration:
### Option: `databases` (required)
Database name, e.g., `homeassistant`
Database name, e.g., `homeassistant`. Multiple are allowed.
### Option: `logins` (required)
This section defines a create user definition in MariaDB. [Create User][createuser] documentation.
### Option: `logins` -> `username` (required)
### Option: `logins.username` (required)
Database user login, e.g., `hass`. [User Name][username] documentation.
### Option: `logins` -> `host` (required)
### Option: `logins.host` (required)
Hostname allowed to connect to database. [Host Name][hostname] documentation.
### Option: `logins` -> `password` (required)
### Option: `logins.password` (required)
Password for user login. This should be strong and unique.
@@ -77,21 +77,21 @@ Password for user login. This should be strong and unique.
This section grant privileges to users in MariaDB. [Grant][grant] documentation.
### Option: `rights` -> `username` (required)
### Option: `rights.username` (required)
This should be the same user name defined in `logins` -> `username`.
### Option: `rights` -> `host` (required)
### Option: `rights.host` (required)
This should be the same hostname defined in `logins` -> `host`.
### Option: `rights` -> `database` (required)
### Option: `rights.database` (required)
This should be the same database defined in `databases`.
### Option: `rights` -> `grant` (required)
### Option: `rights.grant` (required)
This is the grant statement giving your user access to the databse.
This is the grant statement giving your user access to the database.
## Home Assistant Configuration

View File

@@ -11,12 +11,11 @@ pr: none
variables:
- name: versionBuilder
value: '2.0'
value: "2.0"
- group: docker
jobs:
- template: /.azure/azp-template-addon.yml
parameters:
addon: 'mariadb'
arch: '--all'
addon: "mariadb"
arch: "--all"

View File

@@ -3,7 +3,7 @@
"version": "1.3",
"slug": "mariadb",
"description": "An SQL database server",
"url": "https://home-assistant.io/addons/mariadb/",
"url": "https://github.com/home-assistant/hassio-addons/tree/master/mariadb",
"arch": ["armhf", "armv7", "aarch64", "amd64", "i386"],
"startup": "system",
"boot": "auto",
@@ -12,18 +12,19 @@
},
"options": {
"databases": ["homeassistant"],
"logins": [
{"username": "hass", "host": "%", "password": null}
],
"logins": [{ "username": "hass", "host": "%", "password": null }],
"rights": [
{"username": "hass", "host": "%", "database": "homeassistant", "grant": "ALL PRIVILEGES ON"}
{
"username": "hass",
"host": "%",
"database": "homeassistant",
"grant": "ALL PRIVILEGES ON"
}
]
},
"schema": {
"databases": ["str"],
"logins": [
{"username": "str", "host": "str", "password": "str"}
],
"logins": [{ "username": "str", "host": "str", "password": "str" }],
"rights": [
{ "username": "str", "host": "str", "database": "str", "grant": "str" }
]