Commit df6c6f69 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[4282] Updated sections of User's Guide with PgSQL host storage.

parent ddc79a87
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
</para> </para>
</section> </section>
<section> <section id="supported-databases">
<title>Supported Databases</title> <title>Supported Databases</title>
<para>The following table presents the capabilities of available <para>The following table presents the capabilities of available
...@@ -574,9 +574,20 @@ $ <userinput>kea-admin lease-init pgsql -u <replaceable>database-user</replaceab ...@@ -574,9 +574,20 @@ $ <userinput>kea-admin lease-init pgsql -u <replaceable>database-user</replaceab
<section id="pgsql-upgrade"> <section id="pgsql-upgrade">
<title>Upgrading a PostgreSQL Database from an Earlier Version of Kea</title> <title>Upgrading a PostgreSQL Database from an Earlier Version of Kea</title>
<para> <para>
Currently, PostgreSQL only supports Kea schema version 1.0 so no upgrades PostgreSQL database schema can be upgraded using the same tool and
are available. As upgrades become available, <command>kea-admin</command> commands as described in <xref linkend="mysql-upgrade"/>, with an
will support them. exception that the "pgsql" database backend type must be used in
those commands.
</para>
<para>
Use the following command to check current schema version:
<screen>
$ <userinput>kea-admin lease-version pgsql -u <replaceable>database-user</replaceable> -p <replaceable>database-password</replaceable> -n <replaceable>database-name</replaceable></userinput>
</screen>
Use the following command to perform an upgrade:
<screen>
$ <userinput>kea-admin lease-upgrade pgsql -u <replaceable>database-user</replaceable> -p <replaceable>database-password</replaceable> -n <replaceable>database-name</replaceable></userinput>
</screen>
</para> </para>
</section> </section>
</section> <!-- end of PostgreSQL sections --> </section> <!-- end of PostgreSQL sections -->
......
...@@ -486,33 +486,31 @@ If a timeout is given though, it should be an integer greater than zero. ...@@ -486,33 +486,31 @@ If a timeout is given though, it should be an integer greater than zero.
database. In fact, Kea server opens independent connections for each database. In fact, Kea server opens independent connections for each
purpose, be it lease or hosts information. This gives the solution most purpose, be it lease or hosts information. This gives the solution most
flexibility. Kea can be used to keep leases and host reservations flexibility. Kea can be used to keep leases and host reservations
separately, but can also point to the same database. Currently the only separately, but can also point to the same database. Currently the
supported hosts database type is MySQL.</para> supported hosts database types are MySQL and PostgreSQL. Cassandra
backend does not support host reservations yet.</para>
<para>Please note that usage of hosts storage is optional. User can define <para>Please note that usage of hosts storage is optional. User can define
all host reservations in the configuration file. That is the recommended way all host reservations in the configuration file. That is the recommended way
if the number of reservations is small. However, with the number of if the number of reservations is small. However, with the number of
reservations growing it's more convenient to use host storage. Please note reservations growing it's more convenient to use host storage. Please note
that both storages (configuration file and MySQL) can be used together. If that two storages (configuration file and one of the supported databases)
hosts are defined in both places, the definitions from configuration file can be used together. If hosts are defined in both places, the definitions
are checked first and external storage is checked later, if from configuration file are checked first and external storage is checked
necessary.</para> later, if necessary.</para>
<para>All hosts leases issued by the server are stored in the hosts
database. Currently there is only one available backend: MySQL. Other host
backends will become available in future Kea versions.</para>
<section id="hosts-database-configuration4"> <section id="hosts-database-configuration4">
<title>IPv4 Hosts Database Configuration</title> <title>IPv4 Hosts Database Configuration</title>
<para>Hosts database configuration is controlled through the Dhcp4/hosts-database <para>Hosts database configuration is controlled through the Dhcp4/hosts-database
parameters. If enabled, the type of the database must be set to "mysql". Other parameters. If enabled, the type of the database must be set to "mysql" or
hosts backends may be added in later Kea versions. "postgresql". Other hosts backends may be added in later Kea versions.
<screen> <screen>
"Dhcp4": { "hosts-database": { <userinput>"type": "mysql"</userinput>, ... }, ... } "Dhcp4": { "hosts-database": { <userinput>"type": "mysql"</userinput>, ... }, ... }
</screen> </screen>
Next, the name of the database to hold the leases must be set: this is the Next, the name of the database to hold the reservations must be set: this is the
name used when the lease database was created (see <xref linkend="mysql-database-create"/>). name used when the lease database was created (see <xref linkend="supported-databases"/>
for instructions how to setup desired database type).
<screen> <screen>
"Dhcp4": { "hosts-database": { <userinput>"name": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... } "Dhcp4": { "hosts-database": { <userinput>"name": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... }
</screen> </screen>
......
...@@ -486,33 +486,31 @@ If a timeout is given though, it should be an integer greater than zero. ...@@ -486,33 +486,31 @@ If a timeout is given though, it should be an integer greater than zero.
database. In fact, Kea server opens independent connections for each database. In fact, Kea server opens independent connections for each
purpose, be it lease or hosts information. This gives the solution most purpose, be it lease or hosts information. This gives the solution most
flexibility. Kea can be used to keep leases and host reservations flexibility. Kea can be used to keep leases and host reservations
separately, but can also point to the same database. Currently the only separately, but can also point to the same database. Currently the
supported hosts database type is MySQL.</para> supported hosts database types are MySQL and PostgreSQL. Cassandra
backend does not support host reservations yet.</para>
<para>Please note that usage of hosts storage is optional. User can define <para>Please note that usage of hosts storage is optional. User can define
all host reservations in the configuration file. That is the recommended way all host reservations in the configuration file. That is the recommended way
if the number of reservations is small. However, with the number of if the number of reservations is small. However, with the number of
reservations growing it's more convenient to use host storage. Please note reservations growing it's more convenient to use host storage. Please note
that both storages (configuration file and MySQL) can be used together. If that both storages (configuration file and one of the supported databases)
hosts are defined in both places, the definitions from configuration file can be used together. If hosts are defined in both places, the definitions
are checked first and external storage is checked later, if from configuration file are checked first and external storage is checked
necessary.</para> later, if necessary.</para>
<para>All hosts leases issued by the server are stored in the hosts
database. Currently there is only one available backend: MySQL. Other host
backends will become available in future Kea versions.</para>
<section id="hosts-database-configuration6"> <section id="hosts-database-configuration6">
<title>IPv6 Hosts Database Configuration</title> <title>IPv6 Hosts Database Configuration</title>
<para>Hosts database configuration is controlled through the Dhcp6/hosts-database <para>Hosts database configuration is controlled through the Dhcp6/hosts-database
parameters. If enabled, the type of the database must be set to "mysql". Other parameters. If enabled, the type of the database must be set to "mysql" or
hosts backends may be added in later Kea versions. "postgresql". Other hosts backends may be added in later Kea versions.
<screen> <screen>
"Dhcp6": { "hosts-database": { <userinput>"type": "mysql"</userinput>, ... }, ... } "Dhcp6": { "hosts-database": { <userinput>"type": "mysql"</userinput>, ... }, ... }
</screen> </screen>
Next, the name of the database to hold the leases must be set: this is the Next, the name of the database to hold the reservations must be set: this is the
name used when the lease database was created (see <xref linkend="mysql-database-create"/>). name used when the database was created (see <xref linkend="supported-databases"/>
for instructions how to setup desired database type).
<screen> <screen>
"Dhcp6": { "hosts-database": { <userinput>"name": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... } "Dhcp6": { "hosts-database": { <userinput>"name": "<replaceable>database-name</replaceable>" </userinput>, ... }, ... }
</screen> </screen>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment