OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 1 | ===== |
| 2 | Usage |
| 3 | ===== |
Filip Pytloun | 10e4d6c | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 4 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 5 | The Network Time Protocol (NTP) formula is used to properly synchronize |
| 6 | services across the nodes. This file provides the sample configurations for |
| 7 | different use cases. |
Filip Pytloun | 10e4d6c | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 8 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 9 | * [Deprecated] NTP client configuration, should not be used if the ``stratum`` |
| 10 | parameter exists: |
Filip Pytloun | 10e4d6c | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 11 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 12 | .. code-block:: yaml |
Filip Pytloun | 10e4d6c | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 13 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 14 | ntp: |
| 15 | client: |
Ondrej Smola | d3c6703 | 2018-04-04 12:16:05 +0200 | [diff] [blame] | 16 | enabled: true |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 17 | strata: |
| 18 | - ntp.cesnet.cz |
| 19 | - ntp.nic.cz |
Ondrej Smola | d3c6703 | 2018-04-04 12:16:05 +0200 | [diff] [blame] | 20 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 21 | * The NTP client extended definition with auth: |
Ondrej Smola | d3c6703 | 2018-04-04 12:16:05 +0200 | [diff] [blame] | 22 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 23 | .. code-block:: yaml |
| 24 | |
| 25 | ntp: |
| 26 | client: |
Ondrej Smola | d3c6703 | 2018-04-04 12:16:05 +0200 | [diff] [blame] | 27 | enabled: true |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 28 | stratum: |
| 29 | primary: |
| 30 | server: ntp.cesnet.cz |
| 31 | key_id: 1 |
| 32 | secondary: |
| 33 | server: ntp.nic.cz |
| 34 | key_id: 2 |
| 35 | |
| 36 | * The NTP client with MD5 auth configuration: |
| 37 | |
| 38 | .. code-block:: yaml |
| 39 | |
| 40 | ntp: |
| 41 | client: |
| 42 | enabled: true |
| 43 | auth: |
| 44 | enabled: true |
| 45 | secrets: |
| 46 | 1: |
| 47 | secret_type: 'M' |
| 48 | secret: 'Runrabbitrundigthath' |
| 49 | trustedkey: true |
| 50 | 2: |
| 51 | secret_type: 'M' |
| 52 | secret: 'Howiwishyouwereherew' |
| 53 | trustedkey: true |
| 54 | stratum: |
| 55 | primary: |
| 56 | server: ntp.cesnet.cz |
| 57 | key_id: 1 |
| 58 | secondary: |
| 59 | server: ntp.nic.cz |
| 60 | key_id: 2 |
| 61 | |
| 62 | * The NTP server with MD5 auth configuration: |
| 63 | |
| 64 | .. code-block:: yaml |
| 65 | |
| 66 | ntp: |
| 67 | client: |
| 68 | enabled: false |
| 69 | server: |
| 70 | enabled: true |
| 71 | auth: |
| 72 | enabled: true |
| 73 | secrets: |
| 74 | 1: |
| 75 | secret_type: 'M' |
| 76 | secret: 'Runrabbitrundigthath' |
| 77 | trustedkey: true |
| 78 | 2: |
| 79 | secret_type: 'M' |
| 80 | secret: 'Howiwishyouwereherew' |
| 81 | trustedkey: true |
| 82 | stratum: |
| 83 | primary: |
| 84 | server: ntp.cesnet.cz |
| 85 | key_id: 1 |
| 86 | secondary: |
| 87 | server: ntp.nic.cz |
| 88 | key_id: 2 |
| 89 | |
| 90 | * A cleaning up of the NTP configurations left by DHCP: |
| 91 | |
| 92 | .. code-block:: yaml |
| 93 | |
| 94 | ntp: |
| 95 | client: |
| 96 | enabled: true |
| 97 | remove_dhcp_conf: true # default false |
| 98 | |
| 99 | * The NTP server simple peering definition: |
| 100 | |
| 101 | .. code-block:: yaml |
| 102 | |
| 103 | ntp: |
| 104 | server: |
| 105 | peers: |
| 106 | - 192.168.0.241 |
| 107 | - 192.168.0.242 |
| 108 | |
| 109 | * The NTP server extended peering definition: |
| 110 | |
| 111 | .. code-block:: yaml |
| 112 | |
| 113 | ntp: |
| 114 | server: |
| 115 | peers: |
Ondrej Smola | d3c6703 | 2018-04-04 12:16:05 +0200 | [diff] [blame] | 116 | 1: |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 117 | host: 192.168.31.1 |
Ondrej Smola | d3c6703 | 2018-04-04 12:16:05 +0200 | [diff] [blame] | 118 | 2: |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 119 | host: 192.168.31.2 |
| 120 | 3: |
| 121 | host: 192.168.31.3 |
Ondrej Smola | d3c6703 | 2018-04-04 12:16:05 +0200 | [diff] [blame] | 122 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 123 | * The NTP server definition enabling the ``listen`` and ``ignore`` actions on |
| 124 | specific addresses: |
azvyagintsev | 4e40470 | 2018-05-30 20:02:03 +0300 | [diff] [blame] | 125 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 126 | .. code-block:: yaml |
azvyagintsev | 4e40470 | 2018-05-30 20:02:03 +0300 | [diff] [blame] | 127 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 128 | ntp: |
| 129 | server: |
| 130 | 1: |
| 131 | value: wildcard |
| 132 | action: ignore |
| 133 | 2: |
| 134 | value: ::1 |
| 135 | action: listen |
| 136 | 3: |
| 137 | value: 192.168.31.1 |
| 138 | action: listen |
azvyagintsev | 4e40470 | 2018-05-30 20:02:03 +0300 | [diff] [blame] | 139 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 140 | **Read more** |
Filip Pytloun | 10e4d6c | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 141 | |
| 142 | * https://collectd.org/wiki/index.php/Plugin:NTPd |
Filip Pytloun | c4da434 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 143 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 144 | **Documentation and bugs** |
Filip Pytloun | c4da434 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 145 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 146 | * http://salt-formulas.readthedocs.io/ |
| 147 | Learn how to install and update salt-formulas |
Filip Pytloun | c4da434 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 148 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 149 | * https://github.com/salt-formulas/salt-formula-ntp/issues |
| 150 | In the unfortunate event that bugs are discovered, report the issue to the |
| 151 | appropriate issue tracker. Use the Github issue tracker for a specific salt |
| 152 | formula |
Filip Pytloun | c4da434 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 153 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 154 | * https://launchpad.net/salt-formulas |
| 155 | For feature requests, bug reports, or blueprints affecting the entire |
| 156 | ecosystem, use the Launchpad salt-formulas project |
Filip Pytloun | c4da434 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 157 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 158 | * https://launchpad.net/~salt-formulas-users |
| 159 | Join the salt-formulas-users team and subscribe to mailing list if required |
Filip Pytloun | c4da434 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 160 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 161 | * https://github.com/salt-formulas/salt-formula-ntp |
| 162 | Develop the salt-formulas projects in the master branch and then submit pull |
| 163 | requests against a specific formula |
Filip Pytloun | c4da434 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 164 | |
OlgaGusarenko | 5fc0932 | 2018-06-19 11:29:32 +0300 | [diff] [blame] | 165 | * #salt-formulas @ irc.freenode.net |
| 166 | Use this IRC channel in case of any questions or feedback which is always |
| 167 | welcome |
Filip Pytloun | c4da434 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 168 | |