marco | 7072354 | 2016-06-14 20:25:31 +0200 | [diff] [blame] | 1 | |
| 2 | ================================== |
| 3 | zookeeper |
| 4 | ================================== |
| 5 | |
| 6 | Service zookeeper description |
| 7 | |
| 8 | Sample pillars |
| 9 | ============== |
| 10 | |
| 11 | Single zookeeper service |
| 12 | |
| 13 | .. code-block:: yaml |
| 14 | |
| 15 | zookeeper: |
| 16 | server: |
| 17 | enabled: true |
| 18 | members: |
| 19 | - host: ${_param:single_address} |
| 20 | id: 1 |
| 21 | |
| 22 | Cluster zookeeper service |
| 23 | |
| 24 | .. code-block:: yaml |
| 25 | |
| 26 | zookeeper: |
| 27 | server: |
| 28 | enabled: true |
| 29 | members: |
| 30 | - host: ${_param:cluster_node01_address} |
| 31 | id: 1 |
| 32 | - host: ${_param:cluster_node02_address} |
| 33 | id: 2 |
| 34 | - host: ${_param:cluster_node03_address} |
| 35 | id: 3 |
| 36 | |
Jiri Broulik | f7ce71d | 2017-07-06 13:51:20 +0200 | [diff] [blame] | 37 | Backup client with ssh/rsync remote host |
| 38 | |
| 39 | .. code-block:: yaml |
| 40 | |
| 41 | zookeeper: |
| 42 | backup: |
| 43 | client: |
| 44 | enabled: true |
| 45 | full_backups_to_keep: 3 |
| 46 | hours_before_full: 24 |
| 47 | target: |
| 48 | host: cfg01 |
Jiri Broulik | 4911149 | 2018-03-05 12:11:27 +0100 | [diff] [blame] | 49 | backup_dir: server-home-dir |
Jiri Broulik | f7ce71d | 2017-07-06 13:51:20 +0200 | [diff] [blame] | 50 | |
| 51 | .. note:: full_backups_to_keep param states how many backup will be stored locally on zookeeper client. |
| 52 | More options to relocate local backups can be done using salt-formula-backupninja. |
| 53 | |
Jiri Broulik | f789781 | 2018-07-31 11:31:34 +0200 | [diff] [blame] | 54 | Backup client containers with ssh/rsync remote host |
| 55 | |
| 56 | .. code-block:: yaml |
| 57 | |
| 58 | zookeeper: |
| 59 | backup: |
| 60 | client: |
| 61 | enabled: true |
| 62 | full_backups_to_keep: 3 |
| 63 | hours_before_full: 24 |
| 64 | containers: |
| 65 | - opencontrail_controller_1 |
| 66 | target: |
| 67 | host: cfg01 |
| 68 | backup_dir: server-home-dir |
| 69 | |
Jiri Broulik | f7ce71d | 2017-07-06 13:51:20 +0200 | [diff] [blame] | 70 | Backup client with local backup only |
| 71 | |
| 72 | .. code-block:: yaml |
| 73 | |
| 74 | zookeeper: |
| 75 | backup: |
| 76 | client: |
| 77 | enabled: true |
| 78 | full_backups_to_keep: 3 |
| 79 | hours_before_full: 24 |
| 80 | |
| 81 | .. note:: full_backups_to_keep param states how many backup will be stored locally on zookeeper client |
| 82 | |
Martin Polreich | 7a67549 | 2018-03-04 17:11:12 +0100 | [diff] [blame] | 83 | Backup client at exact times: |
| 84 | |
| 85 | ..code-block:: yaml |
| 86 | |
| 87 | zookeeper: |
| 88 | backup: |
| 89 | client: |
| 90 | enabled: true |
| 91 | full_backups_to_keep: 3 |
| 92 | incr_before_full: 3 |
| 93 | backup_times: |
Martin Polreich | 0bdc74a | 2018-04-25 15:33:46 +0200 | [diff] [blame] | 94 | day_of_week: 0 |
Martin Polreich | 7a67549 | 2018-03-04 17:11:12 +0100 | [diff] [blame] | 95 | hour: 4 |
| 96 | minute: 52 |
| 97 | compression: true |
| 98 | compression_threads: 2 |
| 99 | database: |
| 100 | user: user |
| 101 | password: password |
| 102 | target: |
| 103 | host: host01 |
| 104 | |
| 105 | .. note:: Parameters in ``backup_times`` section can be used to set up exact |
| 106 | time the cron job should be executed. In this example, the backup job |
| 107 | would be executed every Sunday at 4:52 AM. If any of the individual |
| 108 | ``backup_times`` parameters is not defined, the defalut ``*`` value will be |
| 109 | used. For example, if minute parameter is ``*``, it will run the backup every minute, |
| 110 | which is ususally not desired. |
Martin Polreich | 0bdc74a | 2018-04-25 15:33:46 +0200 | [diff] [blame] | 111 | Available parameters are ``day_of_week``, ``day_of_month``, ``month``, ``hour`` and ``minute``. |
Martin Polreich | 7a67549 | 2018-03-04 17:11:12 +0100 | [diff] [blame] | 112 | Please see the crontab reference for further info on how to set these parameters. |
| 113 | |
| 114 | .. note:: Please be aware that only ``backup_times`` section OR |
| 115 | ``hours_before_full(incr)`` can be defined. If both are defined, |
| 116 | the ``backup_times`` section will be peferred. |
| 117 | |
| 118 | .. note:: New parameter ``incr_before_full`` needs to be defined. This |
| 119 | number sets number of incremental backups to be run, before a full backup |
| 120 | is performed. |
| 121 | |
| 122 | |
Jiri Broulik | f7ce71d | 2017-07-06 13:51:20 +0200 | [diff] [blame] | 123 | Backup server rsync |
| 124 | |
| 125 | .. code-block:: yaml |
| 126 | |
| 127 | zookeeper: |
| 128 | backup: |
| 129 | server: |
| 130 | enabled: true |
| 131 | hours_before_full: 24 |
| 132 | full_backups_to_keep: 5 |
| 133 | key: |
| 134 | zookeeper_pub_key: |
| 135 | enabled: true |
| 136 | key: ssh_rsa |
| 137 | |
Jiri Broulik | 2756b32 | 2018-02-28 16:21:46 +0100 | [diff] [blame] | 138 | Backup server without strict client restriction |
| 139 | |
| 140 | .. code-block:: yaml |
| 141 | |
| 142 | zookeeper: |
| 143 | backup: |
| 144 | restrict_clients: false |
| 145 | |
Martin Polreich | 7a67549 | 2018-03-04 17:11:12 +0100 | [diff] [blame] | 146 | |
| 147 | Backup server at exact times: |
| 148 | |
| 149 | ..code-block:: yaml |
| 150 | |
| 151 | zookeeper: |
| 152 | backup: |
| 153 | server: |
| 154 | enabled: true |
| 155 | full_backups_to_keep: 3 |
| 156 | incr_before_full: 3 |
| 157 | backup_dir: /srv/backup |
| 158 | backup_times: |
Martin Polreich | 0bdc74a | 2018-04-25 15:33:46 +0200 | [diff] [blame] | 159 | day_of_week: 0 |
Martin Polreich | 7a67549 | 2018-03-04 17:11:12 +0100 | [diff] [blame] | 160 | hour: 4 |
| 161 | minute: 52 |
| 162 | key: |
| 163 | zookeeper_pub_key: |
| 164 | enabled: true |
| 165 | key: key |
| 166 | |
| 167 | .. note:: Parameters in ``backup_times`` section can be used to set up exact |
| 168 | time the cron job should be executed. In this example, the backup job |
| 169 | would be executed every Sunday at 4:52 AM. If any of the individual |
| 170 | ``backup_times`` parameters is not defined, the defalut ``*`` value will be |
| 171 | used. For example, if minute parameter is ``*``, it will run the backup every minute, |
| 172 | which is ususally not desired. |
Martin Polreich | 0bdc74a | 2018-04-25 15:33:46 +0200 | [diff] [blame] | 173 | Available parameters are ``day_of_week``, ``day_of_month``, ``month``, ``hour`` and ``minute``. |
Martin Polreich | 7a67549 | 2018-03-04 17:11:12 +0100 | [diff] [blame] | 174 | Please see the crontab reference for further info on how to set these parameters. |
| 175 | |
| 176 | .. note:: Please be aware that only ``backup_times`` section OR |
| 177 | ``hours_before_full(incr)`` can be defined. If both are defined, The |
| 178 | ``backup_times`` section will be peferred. |
| 179 | |
| 180 | .. note:: New parameter ``incr_before_full`` needs to be defined. This |
| 181 | number sets number of incremental backups to be run, before a full backup |
| 182 | is performed. |
| 183 | |
Jiri Broulik | f7ce71d | 2017-07-06 13:51:20 +0200 | [diff] [blame] | 184 | Client restore from local backup: |
| 185 | |
| 186 | .. code-block:: yaml |
| 187 | |
| 188 | zookeeper: |
| 189 | backup: |
| 190 | client: |
| 191 | enabled: true |
| 192 | full_backups_to_keep: 3 |
| 193 | hours_before_full: 24 |
| 194 | target: |
| 195 | host: cfg01 |
| 196 | restore_latest: 1 |
| 197 | restore_from: local |
| 198 | |
| 199 | .. note:: restore_latest param with a value of 1 means to restore db from the last full backup. 2 would mean to restore second latest full backup. |
| 200 | |
| 201 | |
| 202 | Client restore from remote backup: |
| 203 | |
| 204 | .. code-block:: yaml |
| 205 | |
| 206 | zookeeper: |
| 207 | backup: |
| 208 | client: |
| 209 | enabled: true |
| 210 | full_backups_to_keep: 3 |
| 211 | hours_before_full: 24 |
| 212 | target: |
| 213 | host: cfg01 |
| 214 | restore_latest: 1 |
| 215 | restore_from: remote |
| 216 | |
| 217 | .. note:: restore_latest param with a value of 1 means to restore db from the last full backup. 2 would mean to restore second latest full backup. |
| 218 | |
| 219 | |
Jiri Broulik | f789781 | 2018-07-31 11:31:34 +0200 | [diff] [blame] | 220 | Client restore container from remote backup: |
| 221 | |
| 222 | .. code-block:: yaml |
| 223 | |
| 224 | zookeeper: |
| 225 | backup: |
| 226 | client: |
| 227 | enabled: true |
| 228 | full_backups_to_keep: 3 |
| 229 | hours_before_full: 24 |
| 230 | containers: |
| 231 | - opencontrail_controller_1 |
| 232 | target: |
| 233 | host: cfg01 |
| 234 | restore_latest: 1 |
| 235 | restore_from: remote |
| 236 | |
marco | 7072354 | 2016-06-14 20:25:31 +0200 | [diff] [blame] | 237 | Read more |
| 238 | ========= |
| 239 | |
| 240 | * links |
Filip Pytloun | df51ee2 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 241 | |
| 242 | Documentation and Bugs |
| 243 | ====================== |
| 244 | |
| 245 | To learn how to install and update salt-formulas, consult the documentation |
| 246 | available online at: |
| 247 | |
| 248 | http://salt-formulas.readthedocs.io/ |
| 249 | |
| 250 | In the unfortunate event that bugs are discovered, they should be reported to |
| 251 | the appropriate issue tracker. Use Github issue tracker for specific salt |
| 252 | formula: |
| 253 | |
| 254 | https://github.com/salt-formulas/salt-formula-zookeeper/issues |
| 255 | |
| 256 | For feature requests, bug reports or blueprints affecting entire ecosystem, |
| 257 | use Launchpad salt-formulas project: |
| 258 | |
| 259 | https://launchpad.net/salt-formulas |
| 260 | |
| 261 | You can also join salt-formulas-users team and subscribe to mailing list: |
| 262 | |
| 263 | https://launchpad.net/~salt-formulas-users |
| 264 | |
| 265 | Developers wishing to work on the salt-formulas projects should always base |
| 266 | their work on master branch and submit pull request against specific formula. |
| 267 | |
| 268 | https://github.com/salt-formulas/salt-formula-zookeeper |
| 269 | |
| 270 | Any questions or feedback is always welcome so feel free to join our IRC |
| 271 | channel: |
| 272 | |
| 273 | #salt-formulas @ irc.freenode.net |