| Aleš Komárek | 6357299 | 2017-04-11 13:16:44 +0200 | [diff] [blame] | 1 | ============ | 
 | 2 | Linux Fomula | 
 | 3 | ============ | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 4 |  | 
 | 5 | Linux Operating Systems. | 
 | 6 |  | 
 | 7 | * Ubuntu | 
 | 8 | * CentOS | 
 | 9 | * RedHat | 
 | 10 | * Fedora | 
 | 11 | * Arch | 
 | 12 |  | 
| Aleš Komárek | 6357299 | 2017-04-11 13:16:44 +0200 | [diff] [blame] | 13 | Sample Pillars | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 14 | ============== | 
 | 15 |  | 
| Aleš Komárek | 6357299 | 2017-04-11 13:16:44 +0200 | [diff] [blame] | 16 |  | 
 | 17 | Linux System | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 18 | ------------ | 
 | 19 |  | 
 | 20 | Basic Linux box | 
 | 21 |  | 
 | 22 | .. code-block:: yaml | 
 | 23 |  | 
 | 24 |     linux: | 
 | 25 |       system: | 
 | 26 |         enabled: true | 
 | 27 |         name: 'node1' | 
 | 28 |         domain: 'domain.com' | 
 | 29 |         cluster: 'system' | 
 | 30 |         environment: prod | 
 | 31 |         timezone: 'Europe/Prague' | 
 | 32 |         utc: true | 
 | 33 |  | 
| azvyagintsev | 967af13 | 2017-06-12 12:25:24 +0300 | [diff] [blame] | 34 | Linux with system users, some with password set: | 
 | 35 | .. WARNING:: | 
 | 36 | If no 'password' variable has been passed - any predifined password | 
 | 37 | will be removed. | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 38 |  | 
 | 39 | .. code-block:: yaml | 
 | 40 |  | 
 | 41 |     linux: | 
 | 42 |       system: | 
 | 43 |         ... | 
 | 44 |         user: | 
 | 45 |           jdoe: | 
 | 46 |             name: 'jdoe' | 
 | 47 |             enabled: true | 
 | 48 |             sudo: true | 
 | 49 |             shell: /bin/bash | 
 | 50 |             full_name: 'Jonh Doe' | 
 | 51 |             home: '/home/jdoe' | 
 | 52 |             email: 'jonh@doe.com' | 
 | 53 |           jsmith: | 
 | 54 |             name: 'jsmith' | 
 | 55 |             enabled: true | 
| azvyagintsev | 967af13 | 2017-06-12 12:25:24 +0300 | [diff] [blame] | 56 |             full_name: 'With clear password' | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 57 |             home: '/home/jsmith' | 
| azvyagintsev | 967af13 | 2017-06-12 12:25:24 +0300 | [diff] [blame] | 58 |             hash_password: true | 
 | 59 |             password: "userpassword" | 
 | 60 |           mark: | 
 | 61 |             name: 'mark' | 
 | 62 |             enabled: true | 
 | 63 |             full_name: "unchange password' | 
 | 64 |             home: '/home/mark' | 
 | 65 |             password: false | 
 | 66 |           elizabeth: | 
 | 67 |             name: 'elizabeth' | 
 | 68 |             enabled: true | 
 | 69 |             full_name: 'With hased password' | 
 | 70 |             home: '/home/elizabeth' | 
 | 71 |             password: "$6$nUI7QEz3$dFYjzQqK5cJ6HQ38KqG4gTWA9eJu3aKx6TRVDFh6BVJxJgFWg2akfAA7f1fCxcSUeOJ2arCO6EEI6XXnHXxG10" | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 72 |  | 
| Petr Michalec | 1c4c8d8 | 2017-02-28 19:09:21 +0100 | [diff] [blame] | 73 | Configure sudo for users and groups under ``/etc/sudoers.d/``. | 
 | 74 | This ways ``linux.system.sudo`` pillar map to actual sudo attributes: | 
 | 75 |  | 
 | 76 | .. code-block:: jinja | 
| Aleš Komárek | 6357299 | 2017-04-11 13:16:44 +0200 | [diff] [blame] | 77 |  | 
| Petr Michalec | 1c4c8d8 | 2017-02-28 19:09:21 +0100 | [diff] [blame] | 78 |    # simplified template: | 
 | 79 |    Cmds_Alias {{ alias }}={{ commands }} | 
 | 80 |    {{ user }}   {{ hosts }}=({{ runas }}) NOPASSWD: {{ commands }} | 
 | 81 |    %{{ group }} {{ hosts }}=({{ runas }}) NOPASSWD: {{ commands }} | 
 | 82 |  | 
 | 83 |    # when rendered: | 
 | 84 |    saltuser1 ALL=(ALL) NOPASSWD: ALL | 
 | 85 |  | 
| Petr Michalec | 1c4c8d8 | 2017-02-28 19:09:21 +0100 | [diff] [blame] | 86 | .. code-block:: yaml | 
| Aleš Komárek | 6357299 | 2017-04-11 13:16:44 +0200 | [diff] [blame] | 87 |  | 
| Petr Michalec | 1c4c8d8 | 2017-02-28 19:09:21 +0100 | [diff] [blame] | 88 |   linux: | 
 | 89 |     system: | 
 | 90 |       sudo: | 
 | 91 |         enabled: true | 
| Tomas Kamm | d8eb300 | 2017-05-08 19:30:29 +0200 | [diff] [blame] | 92 |         aliases: | 
| Petr Michalec | 1c4c8d8 | 2017-02-28 19:09:21 +0100 | [diff] [blame] | 93 |           host: | 
 | 94 |             LOCAL: | 
 | 95 |             - localhost | 
 | 96 |             PRODUCTION: | 
 | 97 |             - db1 | 
 | 98 |             - db2 | 
 | 99 |           runas: | 
 | 100 |             DBA: | 
 | 101 |             - postgres | 
 | 102 |             - mysql | 
 | 103 |             SALT: | 
 | 104 |             - root | 
 | 105 |           command: | 
 | 106 |             # Note: This is not 100% safe when ALL keyword is used, user still may modify configs and hide his actions. | 
 | 107 |             #       Best practice is to specify full list of commands user is allowed to run. | 
 | 108 |             SUPPORT_RESTRICTED: | 
 | 109 |             - /bin/vi /etc/sudoers* | 
 | 110 |             - /bin/vim /etc/sudoers* | 
 | 111 |             - /bin/nano /etc/sudoers* | 
 | 112 |             - /bin/emacs /etc/sudoers* | 
 | 113 |             - /bin/su - root | 
 | 114 |             - /bin/su - | 
 | 115 |             - /bin/su | 
 | 116 |             - /usr/sbin/visudo | 
 | 117 |             SUPPORT_SHELLS: | 
 | 118 |             - /bin/sh | 
 | 119 |             - /bin/ksh | 
 | 120 |             - /bin/bash | 
 | 121 |             - /bin/rbash | 
 | 122 |             - /bin/dash | 
 | 123 |             - /bin/zsh | 
 | 124 |             - /bin/csh | 
 | 125 |             - /bin/fish | 
 | 126 |             - /bin/tcsh | 
 | 127 |             - /usr/bin/login | 
 | 128 |             - /usr/bin/su | 
 | 129 |             - /usr/su | 
 | 130 |             ALL_SALT_SAFE: | 
 | 131 |             - /usr/bin/salt state* | 
 | 132 |             - /usr/bin/salt service* | 
 | 133 |             - /usr/bin/salt pillar* | 
 | 134 |             - /usr/bin/salt grains* | 
 | 135 |             - /usr/bin/salt saltutil* | 
 | 136 |             - /usr/bin/salt-call state* | 
 | 137 |             - /usr/bin/salt-call service* | 
 | 138 |             - /usr/bin/salt-call pillar* | 
 | 139 |             - /usr/bin/salt-call grains* | 
 | 140 |             - /usr/bin/salt-call saltutil* | 
 | 141 |             SALT_TRUSTED: | 
 | 142 |             - /usr/bin/salt* | 
 | 143 |         users: | 
 | 144 |           # saltuser1 with default values: saltuser1 ALL=(ALL) NOPASSWD: ALL | 
 | 145 |           saltuser1: {} | 
 | 146 |           saltuser2: | 
 | 147 |             hosts: | 
 | 148 |             - LOCAL | 
 | 149 |           # User Alias DBA | 
 | 150 |           DBA: | 
 | 151 |             hosts: | 
 | 152 |             - ALL | 
 | 153 |             commands: | 
 | 154 |             - ALL_SALT_SAFE | 
 | 155 |         groups: | 
 | 156 |           db-ops: | 
 | 157 |             hosts: | 
 | 158 |             - ALL | 
 | 159 |             - '!PRODUCTION' | 
 | 160 |             runas: | 
 | 161 |             - DBA | 
 | 162 |             commands: | 
 | 163 |             - /bin/cat * | 
 | 164 |             - /bin/less * | 
 | 165 |             - /bin/ls * | 
 | 166 |           salt-ops: | 
 | 167 |             hosts: | 
 | 168 |             - 'ALL' | 
 | 169 |             runas: | 
 | 170 |             - SALT | 
 | 171 |             commands: | 
 | 172 |             - SUPPORT_SHELLS | 
 | 173 |           salt-ops-2nd: | 
 | 174 |             name: salt-ops | 
 | 175 |             nopasswd: false | 
| Jakub Josef | 7a9d9b9 | 2017-05-16 11:39:01 +0200 | [diff] [blame] | 176 |             setenv: true # Enable sudo -E option | 
| Petr Michalec | 1c4c8d8 | 2017-02-28 19:09:21 +0100 | [diff] [blame] | 177 |             runas: | 
 | 178 |             - DBA | 
 | 179 |             commands: | 
 | 180 |             - ALL | 
 | 181 |             - '!SUPPORT_SHELLS' | 
 | 182 |             - '!SUPPORT_RESTRICTED' | 
 | 183 |  | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 184 | Linux with package, latest version | 
 | 185 |  | 
 | 186 | .. code-block:: yaml | 
 | 187 |  | 
 | 188 |     linux: | 
 | 189 |       system: | 
 | 190 |         ... | 
 | 191 |         package: | 
 | 192 |           package-name: | 
 | 193 |             version: latest | 
 | 194 |  | 
 | 195 | Linux with package from certail repo, version with no upgrades | 
 | 196 |  | 
 | 197 | .. code-block:: yaml | 
 | 198 |  | 
 | 199 |     linux: | 
 | 200 |       system: | 
 | 201 |         ... | 
 | 202 |         package: | 
 | 203 |           package-name: | 
 | 204 |             version: 2132.323 | 
 | 205 |             repo: 'custom-repo' | 
 | 206 |             hold: true | 
 | 207 |  | 
 | 208 | Linux with package from certail repo, version with no GPG verification | 
 | 209 |  | 
 | 210 | .. code-block:: yaml | 
 | 211 |  | 
 | 212 |     linux: | 
 | 213 |       system: | 
 | 214 |         ... | 
 | 215 |         package: | 
 | 216 |           package-name: | 
 | 217 |             version: 2132.323 | 
 | 218 |             repo: 'custom-repo' | 
 | 219 |             verify: false | 
 | 220 |  | 
| Bruno Binet | 69a9d8d | 2017-02-16 22:34:32 +0100 | [diff] [blame] | 221 | Linux with autoupdates (automatically install security package updates) | 
 | 222 |  | 
 | 223 | .. code-block:: yaml | 
 | 224 |  | 
 | 225 |     linux: | 
 | 226 |       system: | 
 | 227 |         ... | 
 | 228 |         autoupdates: | 
 | 229 |           enabled: true | 
 | 230 |           mail: root@localhost | 
 | 231 |           mail_only_on_error: true | 
 | 232 |           remove_unused_dependencies: false | 
 | 233 |           automatic_reboot: true | 
 | 234 |           automatic_reboot_time: "02:00" | 
 | 235 |  | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 236 | Linux with cron jobs | 
| Filip Pytloun | 9122222 | 2017-08-04 10:55:27 +0200 | [diff] [blame] | 237 | By default it will use name as an identifier, unless identifier key is | 
 | 238 | explicitly set or False (then it will use Salt's default behavior which is | 
 | 239 | identifier same as command resulting in not being able to change it) | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 240 |  | 
 | 241 | .. code-block:: yaml | 
 | 242 |  | 
 | 243 |     linux: | 
 | 244 |       system: | 
 | 245 |         ... | 
 | 246 |         job: | 
 | 247 |           cmd1: | 
 | 248 |             command: '/cmd/to/run' | 
| Filip Pytloun | 9122222 | 2017-08-04 10:55:27 +0200 | [diff] [blame] | 249 |             identifier: cmd1 | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 250 |             enabled: true | 
 | 251 |             user: 'root' | 
 | 252 |             hour: 2 | 
 | 253 |             minute: 0 | 
 | 254 |  | 
| Filip Pytloun | d0a29e7 | 2015-11-30 15:23:34 +0100 | [diff] [blame] | 255 | Linux security limits (limit sensu user memory usage to max 1GB): | 
 | 256 |  | 
 | 257 | .. code-block:: yaml | 
 | 258 |  | 
 | 259 |     linux: | 
 | 260 |       system: | 
 | 261 |         ... | 
 | 262 |         limit: | 
 | 263 |           sensu: | 
 | 264 |             enabled: true | 
 | 265 |             domain: sensu | 
 | 266 |             limits: | 
 | 267 |               - type: hard | 
 | 268 |                 item: as | 
 | 269 |                 value: 1000000 | 
 | 270 |  | 
| Filip Pytloun | 7fee054 | 2015-10-15 11:19:24 +0200 | [diff] [blame] | 271 | Enable autologin on tty1 (may work only for Ubuntu 14.04): | 
 | 272 |  | 
 | 273 | .. code-block:: yaml | 
 | 274 |  | 
 | 275 |     linux: | 
 | 276 |       system: | 
 | 277 |         console: | 
 | 278 |           tty1: | 
 | 279 |             autologin: root | 
| Filip Pytloun | 281d020 | 2016-01-29 14:03:51 +0100 | [diff] [blame] | 280 |           # Enable serial console | 
 | 281 |           ttyS0: | 
 | 282 |             autologin: root | 
 | 283 |             rate: 115200 | 
 | 284 |             term: xterm | 
| Filip Pytloun | 7fee054 | 2015-10-15 11:19:24 +0200 | [diff] [blame] | 285 |  | 
 | 286 | To disable set autologin to `false`. | 
 | 287 |  | 
| Filip Pytloun | 7731b85 | 2016-02-01 11:13:47 +0100 | [diff] [blame] | 288 | Set ``policy-rc.d`` on Debian-based systems. Action can be any available | 
 | 289 | command in ``while true`` loop and ``case`` context. | 
 | 290 | Following will disallow dpkg to stop/start services for cassandra package automatically: | 
 | 291 |  | 
 | 292 | .. code-block:: yaml | 
 | 293 |  | 
 | 294 |     linux: | 
 | 295 |       system: | 
 | 296 |         policyrcd: | 
 | 297 |           - package: cassandra | 
 | 298 |             action: exit 101 | 
 | 299 |           - package: '*' | 
 | 300 |             action: switch | 
 | 301 |  | 
| Filip Pytloun | c49445a | 2016-04-04 14:23:20 +0200 | [diff] [blame] | 302 | Set system locales: | 
 | 303 |  | 
 | 304 | .. code-block:: yaml | 
 | 305 |  | 
 | 306 |     linux: | 
 | 307 |       system: | 
 | 308 |         locale: | 
 | 309 |           en_US.UTF-8: | 
 | 310 |             default: true | 
| Filip Pytloun | ee1745f | 2016-04-04 17:39:41 +0200 | [diff] [blame] | 311 |           "cs_CZ.UTF-8 UTF-8": | 
| Filip Pytloun | c49445a | 2016-04-04 14:23:20 +0200 | [diff] [blame] | 312 |             enabled: true | 
 | 313 |  | 
| Andrey Shestakov | e7cca05 | 2017-05-24 23:06:24 +0300 | [diff] [blame] | 314 | Systemd settings: | 
 | 315 |  | 
 | 316 | .. code-block:: yaml | 
 | 317 |  | 
 | 318 |     linux: | 
 | 319 |       system: | 
 | 320 |         ... | 
 | 321 |         systemd: | 
 | 322 |           system: | 
 | 323 |             Manager: | 
 | 324 |               DefaultLimitNOFILE: 307200 | 
 | 325 |               DefaultLimitNPROC: 307200 | 
 | 326 |           user: | 
 | 327 |             Manager: | 
 | 328 |               DefaultLimitCPU: 2 | 
 | 329 |               DefaultLimitNPROC: 4 | 
 | 330 |  | 
| Filip Pytloun | 8b2131e | 2017-11-08 13:29:03 +0100 | [diff] [blame] | 331 | Ensure presence of directory: | 
 | 332 |  | 
 | 333 | .. code-block:: yaml | 
 | 334 |  | 
 | 335 |     linux: | 
 | 336 |       system: | 
 | 337 |         directory: | 
 | 338 |           /tmp/test: | 
 | 339 |             user: root | 
 | 340 |             group: root | 
 | 341 |             mode: 700 | 
 | 342 |             makedirs: true | 
 | 343 |  | 
| Richard Felkl | 2e07d65 | 2018-01-19 10:19:06 +0100 | [diff] [blame] | 344 | Ensure presence of file by specifying it's source: | 
 | 345 |  | 
 | 346 | .. code-block:: yaml | 
 | 347 |  | 
 | 348 |     linux: | 
 | 349 |       system: | 
 | 350 |         file: | 
 | 351 |           /tmp/test.txt: | 
 | 352 |             source: http://example.com/test.txt | 
| Richard Felkl | f40599a | 2018-02-06 22:56:41 +0100 | [diff] [blame] | 353 |             user: root #optional | 
 | 354 |             group: root #optional | 
 | 355 |             mode: 700 #optional | 
 | 356 |             dir_mode: 700 #optional | 
 | 357 |             encoding: utf-8 #optional | 
 | 358 |             hash: <<hash>> or <<URI to hash>> #optional | 
 | 359 |             makedirs: true #optional | 
 | 360 |  | 
 | 361 |     linux: | 
 | 362 |       system: | 
 | 363 |         file: | 
 | 364 |           test.txt: | 
 | 365 |             name: /tmp/test.txt | 
 | 366 |             source: http://example.com/test.txt | 
| Richard Felkl | 2e07d65 | 2018-01-19 10:19:06 +0100 | [diff] [blame] | 367 |  | 
 | 368 | Ensure presence of file by specifying it's contents: | 
 | 369 |  | 
 | 370 | .. code-block:: yaml | 
 | 371 |  | 
 | 372 |     linux: | 
 | 373 |       system: | 
 | 374 |         file: | 
 | 375 |           /tmp/test.txt: | 
 | 376 |             contents: | | 
 | 377 |               line1 | 
 | 378 |               line2 | 
| Richard Felkl | f40599a | 2018-02-06 22:56:41 +0100 | [diff] [blame] | 379 |  | 
 | 380 |     linux: | 
 | 381 |       system: | 
 | 382 |         file: | 
 | 383 |           /tmp/test.txt: | 
 | 384 |             contents_pillar: linux:network:hostname | 
 | 385 |  | 
 | 386 |     linux: | 
 | 387 |       system: | 
 | 388 |         file: | 
 | 389 |           /tmp/test.txt: | 
 | 390 |             contents_grains: motd | 
 | 391 |  | 
| Filip Pytloun | 281034a | 2016-01-04 18:06:22 +0100 | [diff] [blame] | 392 | Kernel | 
 | 393 | ~~~~~~ | 
 | 394 |  | 
 | 395 | Install always up to date LTS kernel and headers from Ubuntu trusty: | 
 | 396 |  | 
 | 397 | .. code-block:: yaml | 
 | 398 |  | 
 | 399 |     linux: | 
 | 400 |       system: | 
 | 401 |         kernel: | 
 | 402 |           type: generic | 
 | 403 |           lts: trusty | 
 | 404 |           headers: true | 
 | 405 |  | 
| Tomáš Kukrál | ba35b21 | 2017-02-15 17:59:46 +0100 | [diff] [blame] | 406 | Load kernel modules and add them to `/etc/modules`: | 
 | 407 |  | 
 | 408 | .. code-block:: yaml | 
 | 409 |  | 
 | 410 |     linux: | 
 | 411 |       system: | 
 | 412 |         kernel: | 
 | 413 |           modules: | 
 | 414 |             - nf_conntrack | 
 | 415 |             - tp_smapi | 
 | 416 |             - 8021q | 
 | 417 |  | 
| teoyaomiqui | 32b1f7c | 2017-05-24 14:36:09 +0300 | [diff] [blame] | 418 | Configure or blacklist kernel modules with additional options to `/etc/modprobe.d` following example  | 
 | 419 | will add `/etc/modprobe.d/nf_conntrack.conf` file with line `options nf_conntrack hashsize=262144`: | 
 | 420 |  | 
 | 421 | .. code-block:: yaml | 
 | 422 |  | 
 | 423 |     linux: | 
 | 424 |       system: | 
 | 425 |         kernel: | 
 | 426 |           module: | 
 | 427 |             nf_conntrack: | 
 | 428 |               option: | 
 | 429 |                 hashsize: 262144 | 
 | 430 |  | 
 | 431 |  | 
 | 432 |  | 
| Filip Pytloun | 281034a | 2016-01-04 18:06:22 +0100 | [diff] [blame] | 433 | Install specific kernel version and ensure all other kernel packages are | 
 | 434 | not present. Also install extra modules and headers for this kernel: | 
 | 435 |  | 
 | 436 | .. code-block:: yaml | 
 | 437 |  | 
 | 438 |     linux: | 
 | 439 |       system: | 
 | 440 |         kernel: | 
 | 441 |           type: generic | 
 | 442 |           extra: true | 
 | 443 |           headers: true | 
 | 444 |           version: 4.2.0-22 | 
 | 445 |  | 
| Jakub Pavlik | 32c2cb0 | 2016-01-29 12:45:29 +0100 | [diff] [blame] | 446 | Systcl kernel parameters | 
 | 447 |  | 
 | 448 | .. code-block:: yaml | 
 | 449 |  | 
 | 450 |     linux: | 
 | 451 |       system: | 
 | 452 |         kernel: | 
 | 453 |           sysctl: | 
 | 454 |             net.ipv4.tcp_keepalive_intvl: 3 | 
 | 455 |             net.ipv4.tcp_keepalive_time: 30 | 
 | 456 |             net.ipv4.tcp_keepalive_probes: 8 | 
 | 457 |  | 
| Michael Polenchuk | ebf5552 | 2018-01-25 13:22:39 +0400 | [diff] [blame] | 458 | Configure kernel boot options: | 
 | 459 |  | 
 | 460 | .. code-block:: yaml | 
 | 461 |  | 
 | 462 |     linux: | 
 | 463 |       system: | 
 | 464 |         kernel: | 
 | 465 |           boot_options: | 
 | 466 |             - elevator=deadline | 
 | 467 |             - spectre_v2=off | 
 | 468 |             - nopti | 
 | 469 |  | 
| Jiri Broulik | f8f55a2 | 2017-01-26 14:36:46 +0100 | [diff] [blame] | 470 |  | 
 | 471 | CPU | 
 | 472 | ~~~ | 
 | 473 |  | 
| teoyaomiqui | 32b1f7c | 2017-05-24 14:36:09 +0300 | [diff] [blame] | 474 | Enable cpufreq governor for every cpu: | 
| Jiri Broulik | f8f55a2 | 2017-01-26 14:36:46 +0100 | [diff] [blame] | 475 |  | 
 | 476 | .. code-block:: yaml | 
 | 477 |  | 
 | 478 |     linux: | 
 | 479 |       system: | 
 | 480 |         cpu: | 
 | 481 |           governor: performance | 
 | 482 |  | 
| Nick Metz | f04f5f3 | 2018-01-08 15:25:04 +0100 | [diff] [blame] | 483 |  | 
| Jiri Broulik | 303905d | 2018-01-11 14:12:48 +0100 | [diff] [blame] | 484 | CGROUPS | 
 | 485 | ~~~~~~~ | 
 | 486 |  | 
 | 487 | Setup linux cgroups: | 
 | 488 |  | 
 | 489 | .. code-block:: yaml | 
 | 490 |  | 
 | 491 |     linux: | 
 | 492 |       system: | 
 | 493 |         cgroup: | 
 | 494 |           enabled: true | 
 | 495 |           group: | 
 | 496 |             ceph_group_1: | 
 | 497 |               controller: | 
 | 498 |                 cpu: | 
 | 499 |                   shares: | 
 | 500 |                     value: 250 | 
 | 501 |                 cpuacct: | 
 | 502 |                   usage: | 
 | 503 |                     value: 0 | 
 | 504 |                 cpuset: | 
 | 505 |                   cpus: | 
 | 506 |                     value: 1,2,3 | 
 | 507 |                 memory: | 
 | 508 |                   limit_in_bytes: | 
 | 509 |                     value: 2G | 
 | 510 |                   memsw.limit_in_bytes: | 
 | 511 |                     value: 3G | 
 | 512 |               mapping: | 
 | 513 |                 subjects: | 
 | 514 |                 - '@ceph' | 
 | 515 |             generic_group_1: | 
 | 516 |               controller: | 
 | 517 |                 cpu: | 
 | 518 |                   shares: | 
 | 519 |                     value: 250 | 
 | 520 |                 cpuacct: | 
 | 521 |                   usage: | 
 | 522 |                     value: 0 | 
 | 523 |               mapping: | 
 | 524 |                 subjects: | 
 | 525 |                 - '*:firefox' | 
 | 526 |                 - 'student:cp' | 
 | 527 |  | 
 | 528 |  | 
| Nick Metz | f04f5f3 | 2018-01-08 15:25:04 +0100 | [diff] [blame] | 529 | Shared Libraries | 
 | 530 | ~~~~~~~~~~~~~~~~ | 
 | 531 |  | 
 | 532 | Set additional shared library to Linux system library path | 
 | 533 |  | 
 | 534 | .. code-block:: yaml | 
 | 535 |  | 
 | 536 |     linux: | 
 | 537 |       system: | 
 | 538 |         ld: | 
 | 539 |           library: | 
 | 540 |             java: | 
 | 541 |               - /usr/lib/jvm/jre-openjdk/lib/amd64/server | 
 | 542 |               - /opt/java/jre/lib/amd64/server | 
 | 543 |      | 
 | 544 |  | 
| Filip Pytloun | 2fde88b | 2017-10-05 10:30:29 +0200 | [diff] [blame] | 545 | Certificates | 
 | 546 | ~~~~~~~~~~~~ | 
 | 547 |  | 
 | 548 | Add certificate authority into system trusted CA bundle | 
 | 549 |  | 
 | 550 | .. code-block:: yaml | 
 | 551 |  | 
 | 552 |     linux: | 
 | 553 |       system: | 
 | 554 |         ca_certificates: | 
 | 555 |           mycert: | | 
 | 556 |             -----BEGIN CERTIFICATE----- | 
 | 557 |             MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG | 
 | 558 |             A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz | 
 | 559 |             cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2 | 
 | 560 |             MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV | 
 | 561 |             BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt | 
 | 562 |             YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN | 
 | 563 |             ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE | 
 | 564 |             BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is | 
 | 565 |             I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G | 
 | 566 |             CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do | 
 | 567 |             lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc | 
 | 568 |             AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k | 
 | 569 |             -----END CERTIFICATE----- | 
 | 570 |  | 
| Filip Pytloun | 361096c | 2017-08-23 10:57:20 +0200 | [diff] [blame] | 571 | Sysfs | 
 | 572 | ~~~~~ | 
 | 573 |  | 
 | 574 | Install sysfsutils and set sysfs attributes: | 
 | 575 |  | 
 | 576 | .. code-block:: yaml | 
 | 577 |  | 
 | 578 |     linux: | 
 | 579 |       system: | 
 | 580 |         sysfs: | 
 | 581 |           scheduler: | 
 | 582 |             block/sda/queue/scheduler: deadline | 
 | 583 |           power: | 
 | 584 |             mode: | 
 | 585 |               power/state: 0660 | 
 | 586 |             owner: | 
 | 587 |               power/state: "root:power" | 
 | 588 |             devices/system/cpu/cpu0/cpufreq/scaling_governor: powersave | 
 | 589 |  | 
| Jakub Pavlik | b148c8c | 2017-02-12 21:30:48 +0100 | [diff] [blame] | 590 | Huge Pages | 
 | 591 | ~~~~~~~~~~~~ | 
 | 592 |  | 
 | 593 | Huge Pages give a performance boost to applications that intensively deal | 
 | 594 | with memory allocation/deallocation by decreasing memory fragmentation. | 
 | 595 |  | 
 | 596 | .. code-block:: yaml | 
 | 597 |  | 
 | 598 |     linux: | 
 | 599 |       system: | 
 | 600 |         kernel: | 
 | 601 |           hugepages: | 
 | 602 |             small: | 
 | 603 |               size: 2M | 
 | 604 |               count: 107520 | 
 | 605 |               mount_point: /mnt/hugepages_2MB | 
 | 606 |               mount: false/true # default false | 
 | 607 |             large: | 
 | 608 |               default: true # default automatically mounted | 
 | 609 |               size: 1G | 
 | 610 |               count: 210 | 
 | 611 |               mount_point: /mnt/hugepages_1GB | 
 | 612 |  | 
 | 613 | Note: not recommended to use both pagesizes in concurrently. | 
| Jiri Broulik | f8f55a2 | 2017-01-26 14:36:46 +0100 | [diff] [blame] | 614 |  | 
| Jakub Pavlik | 5398d87 | 2017-02-13 22:30:47 +0100 | [diff] [blame] | 615 | Intel SR-IOV | 
 | 616 | ~~~~~~~~~~~~ | 
 | 617 |  | 
 | 618 | PCI-SIG Single Root I/O Virtualization and Sharing (SR-IOV) specification defines a standardized mechanism to virtualize PCIe devices. The mechanism can virtualize a single PCIe Ethernet controller to appear as multiple PCIe devices. | 
 | 619 |  | 
 | 620 | .. code-block:: yaml | 
 | 621 |  | 
 | 622 |     linux: | 
 | 623 |       system: | 
 | 624 |         kernel: | 
 | 625 |           sriov: True | 
 | 626 |           unsafe_interrupts: False # Default is false. for older platforms and AMD we need to add interrupt remapping workaround | 
 | 627 |         rc: | 
 | 628 |           local: | | 
 | 629 |             #!/bin/sh -e | 
 | 630 |             # Enable 7 VF on eth1 | 
 | 631 |             echo 7 > /sys/class/net/eth1/device/sriov_numvfs; sleep 2; ifup -a | 
 | 632 |             exit 0 | 
 | 633 |  | 
| Jakub Pavlik | 6c9ead1 | 2017-02-16 21:53:13 +0100 | [diff] [blame] | 634 | Isolate CPU options | 
 | 635 | ~~~~~~~~~~~~~~~~~~~ | 
 | 636 |  | 
 | 637 | Remove the specified CPUs, as defined by the cpu_number values, from the general kernel | 
 | 638 | SMP balancing and scheduler algroithms. The only way to move a process onto or off an | 
 | 639 | "isolated" CPU is via the CPU affinity syscalls. cpu_number begins at 0, so the | 
 | 640 | maximum value is 1 less than the number of CPUs on the system. | 
 | 641 |  | 
 | 642 | .. code-block:: yaml | 
 | 643 |  | 
 | 644 |     linux: | 
 | 645 |       system: | 
 | 646 |         kernel: | 
 | 647 |           isolcpu: 1,2,3,4,5,6,7 # isolate first cpu 0 | 
| Jiri Broulik | f8f55a2 | 2017-01-26 14:36:46 +0100 | [diff] [blame] | 648 |  | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 649 | Repositories | 
 | 650 | ~~~~~~~~~~~~ | 
 | 651 |  | 
 | 652 | RedHat based Linux with additional OpenStack repo | 
 | 653 |  | 
 | 654 | .. code-block:: yaml | 
 | 655 |  | 
 | 656 |     linux: | 
 | 657 |       system: | 
 | 658 |         ... | 
 | 659 |         repo: | 
 | 660 |           rdo-icehouse: | 
 | 661 |             enabled: true | 
 | 662 |             source: 'http://repos.fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/' | 
 | 663 |             pgpcheck: 0 | 
 | 664 |  | 
 | 665 | Ensure system repository to use czech Debian mirror (``default: true``) | 
 | 666 | Also pin it's packages with priority 900. | 
 | 667 |  | 
 | 668 | .. code-block:: yaml | 
 | 669 |  | 
 | 670 |    linux: | 
 | 671 |      system: | 
 | 672 |        repo: | 
 | 673 |          debian: | 
 | 674 |            default: true | 
 | 675 |            source: "deb http://ftp.cz.debian.org/debian/ jessie main contrib non-free" | 
 | 676 |            # Import signing key from URL if needed | 
 | 677 |            key_url: "http://dummy.com/public.gpg" | 
 | 678 |            pin: | 
 | 679 |              - pin: 'origin "ftp.cz.debian.org"' | 
 | 680 |                priority: 900 | 
 | 681 |                package: '*' | 
 | 682 |  | 
| Petr Michalec | 10462bb | 2017-03-23 19:18:08 +0100 | [diff] [blame] | 683 |  | 
 | 684 | Package manager proxy setup globally: | 
 | 685 |  | 
 | 686 | .. code-block:: yaml | 
 | 687 |  | 
 | 688 |     linux: | 
 | 689 |       system: | 
 | 690 |         ... | 
 | 691 |         repo: | 
 | 692 |           apt-mk: | 
 | 693 |             source: "deb http://apt-mk.mirantis.com/ stable main salt" | 
 | 694 |         ... | 
 | 695 |         proxy: | 
 | 696 |           pkg: | 
 | 697 |             enabled: true | 
 | 698 |             ftp:   ftp://ftp-proxy-for-apt.host.local:2121 | 
 | 699 |           ... | 
 | 700 |           # NOTE: Global defaults for any other componet that configure proxy on the system. | 
 | 701 |           #       If your environment has just one simple proxy, set it on linux:system:proxy. | 
 | 702 |           # | 
 | 703 |           # fall back system defaults if linux:system:proxy:pkg has no protocol specific entries | 
 | 704 |           # as for https and http | 
 | 705 |           ftp:   ftp://proxy.host.local:2121 | 
 | 706 |           http:  http://proxy.host.local:3142 | 
 | 707 |           https: https://proxy.host.local:3143 | 
 | 708 |  | 
 | 709 | Package manager proxy setup per repository: | 
 | 710 |  | 
 | 711 | .. code-block:: yaml | 
 | 712 |  | 
 | 713 |     linux: | 
 | 714 |       system: | 
 | 715 |         ... | 
 | 716 |         repo: | 
 | 717 |           debian: | 
 | 718 |             source: "deb http://apt-mk.mirantis.com/ stable main salt" | 
 | 719 |         ... | 
 | 720 |           apt-mk: | 
 | 721 |             source: "deb http://apt-mk.mirantis.com/ stable main salt" | 
 | 722 |             # per repository proxy | 
 | 723 |             proxy: | 
 | 724 |               enabled: true | 
 | 725 |               http:  http://maas-01:8080 | 
 | 726 |               https: http://maas-01:8080 | 
 | 727 |         ... | 
 | 728 |         proxy: | 
| Oleksandr Vlasov | 27a6c3a | 2017-04-11 16:01:19 -0600 | [diff] [blame] | 729 |           # package manager fallback defaults | 
| Petr Michalec | 10462bb | 2017-03-23 19:18:08 +0100 | [diff] [blame] | 730 |           # used if linux:system:repo:apt-mk:proxy has no protocol specific entries | 
 | 731 |           pkg: | 
 | 732 |             enabled: true | 
 | 733 |             ftp:   ftp://proxy.host.local:2121 | 
 | 734 |             #http:  http://proxy.host.local:3142 | 
 | 735 |             #https: https://proxy.host.local:3143 | 
| Oleksandr Vlasov | 27a6c3a | 2017-04-11 16:01:19 -0600 | [diff] [blame] | 736 |           ... | 
| Petr Michalec | 10462bb | 2017-03-23 19:18:08 +0100 | [diff] [blame] | 737 |           # global system fallback system defaults | 
 | 738 |           ftp:   ftp://proxy.host.local:2121 | 
 | 739 |           http:  http://proxy.host.local:3142 | 
 | 740 |           https: https://proxy.host.local:3143 | 
 | 741 |  | 
 | 742 |  | 
| Jiri Broulik | 34a29b4 | 2017-04-25 14:42:54 +0200 | [diff] [blame] | 743 | Remove all repositories: | 
 | 744 |  | 
 | 745 | .. code-block:: yaml | 
 | 746 |  | 
 | 747 |     linux: | 
 | 748 |       system: | 
 | 749 |         purge_repos: true | 
 | 750 |  | 
| Filip Pytloun | c512e6c | 2017-11-22 14:28:10 +0100 | [diff] [blame] | 751 | Setup custom apt config options: | 
 | 752 |  | 
 | 753 | .. code-block:: yaml | 
 | 754 |  | 
 | 755 |     linux: | 
 | 756 |       system: | 
 | 757 |         apt: | 
 | 758 |           config: | 
 | 759 |             compression-workaround: | 
 | 760 |               "Acquire::CompressionTypes::Order": "gz" | 
 | 761 |             docker-clean: | 
 | 762 |               "DPkg::Post-Invoke": | 
 | 763 |                 - "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true" | 
 | 764 |               "APT::Update::Post-Invoke": | 
 | 765 |                 - "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true" | 
| Jiri Broulik | 34a29b4 | 2017-04-25 14:42:54 +0200 | [diff] [blame] | 766 |  | 
| Petr Michalec | 10462bb | 2017-03-23 19:18:08 +0100 | [diff] [blame] | 767 | RC | 
 | 768 | ~~ | 
 | 769 |  | 
| Jakub Pavlik | 7885938 | 2016-01-21 11:26:39 +0100 | [diff] [blame] | 770 | rc.local example | 
 | 771 |  | 
 | 772 | .. code-block:: yaml | 
 | 773 |  | 
 | 774 |    linux: | 
 | 775 |      system: | 
 | 776 |        rc: | 
 | 777 |          local: | | 
 | 778 |            #!/bin/sh -e | 
 | 779 |            # | 
 | 780 |            # rc.local | 
 | 781 |            # | 
 | 782 |            # This script is executed at the end of each multiuser runlevel. | 
 | 783 |            # Make sure that the script will "exit 0" on success or any other | 
 | 784 |            # value on error. | 
 | 785 |            # | 
 | 786 |            # In order to enable or disable this script just change the execution | 
 | 787 |            # bits. | 
 | 788 |            # | 
 | 789 |            # By default this script does nothing. | 
 | 790 |            exit 0 | 
 | 791 |  | 
| Petr Michalec | 10462bb | 2017-03-23 19:18:08 +0100 | [diff] [blame] | 792 |  | 
| Filip Pytloun | 1f40dac | 2016-01-22 15:52:57 +0100 | [diff] [blame] | 793 | Prompt | 
 | 794 | ~~~~~~ | 
 | 795 |  | 
 | 796 | Setting prompt is implemented by creating ``/etc/profile.d/prompt.sh``. Every | 
 | 797 | user can have different prompt. | 
 | 798 |  | 
 | 799 | .. code-block:: yaml | 
 | 800 |  | 
 | 801 |     linux: | 
 | 802 |       system: | 
 | 803 |         prompt: | 
 | 804 |           root: \\n\\[\\033[0;37m\\]\\D{%y/%m/%d %H:%M:%S} $(hostname -f)\\[\\e[0m\\]\\n\\[\\e[1;31m\\][\\u@\\h:\\w]\\[\\e[0m\\] | 
 | 805 |           default: \\n\\D{%y/%m/%d %H:%M:%S} $(hostname -f)\\n[\\u@\\h:\\w] | 
 | 806 |  | 
 | 807 | On Debian systems to set prompt system-wide it's necessary to remove setting | 
 | 808 | PS1 in ``/etc/bash.bashrc`` and ``~/.bashrc`` (which comes from | 
 | 809 | ``/etc/skel/.bashrc``). This formula will do this automatically, but will not | 
| Filip Pytloun | d9b68da | 2016-01-22 15:58:41 +0100 | [diff] [blame] | 810 | touch existing user's ``~/.bashrc`` files except root. | 
| Jakub Pavlik | 7885938 | 2016-01-21 11:26:39 +0100 | [diff] [blame] | 811 |  | 
| Filip Pytloun | eef11c1 | 2016-03-25 11:00:23 +0100 | [diff] [blame] | 812 | Bash | 
 | 813 | ~~~~ | 
 | 814 |  | 
 | 815 | Fix bash configuration to preserve history across sessions (like ZSH does by | 
 | 816 | default). | 
 | 817 |  | 
 | 818 | .. code-block:: yaml | 
 | 819 |  | 
 | 820 |     linux: | 
 | 821 |       system: | 
 | 822 |         bash: | 
 | 823 |           preserve_history: true | 
 | 824 |  | 
| Filip Pytloun | e874dfb | 2016-01-22 16:57:34 +0100 | [diff] [blame] | 825 | Message of the day | 
 | 826 | ~~~~~~~~~~~~~~~~~~ | 
 | 827 |  | 
 | 828 | ``pam_motd`` from package ``update-motd`` is used for dynamic messages of the | 
 | 829 | day. Setting custom motd will cleanup existing ones. | 
 | 830 |  | 
 | 831 | .. code-block:: yaml | 
 | 832 |  | 
 | 833 |     linux: | 
 | 834 |       system: | 
 | 835 |         motd: | 
 | 836 |           - release: | | 
 | 837 |               #!/bin/sh | 
 | 838 |               [ -r /etc/lsb-release ] && . /etc/lsb-release | 
 | 839 |  | 
 | 840 |               if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then | 
 | 841 |               	# Fall back to using the very slow lsb_release utility | 
 | 842 |               	DISTRIB_DESCRIPTION=$(lsb_release -s -d) | 
 | 843 |               fi | 
 | 844 |  | 
 | 845 |               printf "Welcome to %s (%s %s %s)\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" "$(uname -r)" "$(uname -m)" | 
 | 846 |           - warning: | | 
 | 847 |               #!/bin/sh | 
 | 848 |               printf "This is [company name] network.\n" | 
 | 849 |               printf "Unauthorized access strictly prohibited.\n" | 
 | 850 |  | 
| Marek Celoud | 713e907 | 2017-05-18 15:20:25 +0200 | [diff] [blame] | 851 | Services | 
 | 852 | ~~~~~~~~ | 
 | 853 |  | 
 | 854 | Stop and disable linux service: | 
 | 855 |  | 
 | 856 | .. code-block:: yaml | 
 | 857 |  | 
 | 858 |     linux: | 
 | 859 |       system: | 
 | 860 |         service: | 
 | 861 |           apt-daily.timer: | 
 | 862 |             status: dead | 
 | 863 |  | 
 | 864 | Possible status is dead (disable service by default), running (enable service by default), enabled, disabled. | 
 | 865 |  | 
| Serhiy Ovsianikov | 67bd56a | 2017-08-11 15:56:01 +0300 | [diff] [blame] | 866 | Linux with atop service: | 
 | 867 |  | 
 | 868 | .. code-block:: yaml | 
 | 869 |  | 
 | 870 |     linux: | 
 | 871 |       system: | 
 | 872 |         atop: | 
 | 873 |           enabled: true | 
 | 874 |           interval: 20 | 
 | 875 |           logpath: "/var/log/atop" | 
 | 876 |           outfile: "/var/log/atop/daily.log" | 
 | 877 |  | 
| Filip Pytloun | 2f70b49 | 2016-02-19 15:55:25 +0100 | [diff] [blame] | 878 | RHEL / CentOS | 
| Filip Pytloun | 8296bb9 | 2016-02-19 18:42:09 +0100 | [diff] [blame] | 879 | ^^^^^^^^^^^^^ | 
| Filip Pytloun | 2f70b49 | 2016-02-19 15:55:25 +0100 | [diff] [blame] | 880 |  | 
 | 881 | Unfortunately ``update-motd`` is currently not available for RHEL so there's | 
 | 882 | no native support for dynamic motd. | 
 | 883 | You can still set static one, only pillar structure differs: | 
 | 884 |  | 
 | 885 | .. code-block:: yaml | 
 | 886 |  | 
 | 887 |     linux: | 
 | 888 |       system: | 
 | 889 |         motd: | | 
 | 890 |           This is [company name] network. | 
 | 891 |           Unauthorized access strictly prohibited. | 
 | 892 |  | 
| Filip Pytloun | 8296bb9 | 2016-02-19 18:42:09 +0100 | [diff] [blame] | 893 | Haveged | 
 | 894 | ~~~~~~~ | 
 | 895 |  | 
 | 896 | If you are running headless server and are low on entropy, it may be a good | 
 | 897 | idea to setup Haveged. | 
 | 898 |  | 
 | 899 | .. code-block:: yaml | 
 | 900 |  | 
 | 901 |     linux: | 
 | 902 |       system: | 
 | 903 |         haveged: | 
 | 904 |           enabled: true | 
 | 905 |  | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 906 | Linux network | 
 | 907 | ------------- | 
 | 908 |  | 
 | 909 | Linux with network manager | 
 | 910 |  | 
 | 911 | .. code-block:: yaml | 
 | 912 |  | 
 | 913 |     linux: | 
 | 914 |       network: | 
 | 915 |         enabled: true | 
 | 916 |         network_manager: true | 
 | 917 |  | 
 | 918 | Linux with default static network interfaces, default gateway interface and DNS servers | 
 | 919 |  | 
 | 920 | .. code-block:: yaml | 
 | 921 |  | 
 | 922 |     linux: | 
 | 923 |       network: | 
 | 924 |         enabled: true | 
 | 925 |         interface: | 
 | 926 |           eth0: | 
 | 927 |             enabled: true | 
 | 928 |             type: eth | 
 | 929 |             address: 192.168.0.102 | 
 | 930 |             netmask: 255.255.255.0 | 
 | 931 |             gateway: 192.168.0.1 | 
 | 932 |             name_servers: | 
 | 933 |             - 8.8.8.8 | 
 | 934 |             - 8.8.4.4 | 
 | 935 |             mtu: 1500 | 
 | 936 |  | 
| jan kaufman | 6d30adf | 2016-01-18 17:30:12 +0100 | [diff] [blame] | 937 | Linux with bonded interfaces and disabled NetworkManager | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 938 |  | 
 | 939 | .. code-block:: yaml | 
 | 940 |  | 
 | 941 |     linux: | 
 | 942 |       network: | 
 | 943 |         enabled: true | 
 | 944 |         interface: | 
 | 945 |           eth0: | 
 | 946 |             type: eth | 
 | 947 |             ... | 
 | 948 |           eth1: | 
 | 949 |             type: eth | 
 | 950 |             ... | 
 | 951 |           bond0: | 
 | 952 |             enabled: true | 
 | 953 |             type: bond | 
 | 954 |             address: 192.168.0.102 | 
 | 955 |             netmask: 255.255.255.0 | 
 | 956 |             mtu: 1500 | 
 | 957 |             use_in: | 
 | 958 |             - interface: ${linux:interface:eth0} | 
 | 959 |             - interface: ${linux:interface:eth0} | 
| jan kaufman | 6d30adf | 2016-01-18 17:30:12 +0100 | [diff] [blame] | 960 |         network_manager: | 
 | 961 |           disable: true | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 962 |  | 
| Jan Kaufman | 6a1ad71 | 2015-12-11 14:44:19 +0100 | [diff] [blame] | 963 | Linux with vlan interface_params | 
 | 964 |  | 
 | 965 | .. code-block:: yaml | 
 | 966 |  | 
 | 967 |     linux: | 
 | 968 |       network: | 
 | 969 |         enabled: true | 
 | 970 |         interface: | 
 | 971 |           vlan69: | 
 | 972 |             type: vlan | 
| jan kaufman | c0bd76f | 2015-12-15 16:45:44 +0100 | [diff] [blame] | 973 |             use_interfaces: | 
| Jan Kaufman | 6a1ad71 | 2015-12-11 14:44:19 +0100 | [diff] [blame] | 974 |             - interface: ${linux:interface:bond0} | 
| Jan Kaufman | 6a1ad71 | 2015-12-11 14:44:19 +0100 | [diff] [blame] | 975 |  | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 976 | Linux with wireless interface parameters | 
 | 977 |  | 
 | 978 | .. code-block:: yaml | 
 | 979 |  | 
 | 980 |     linux: | 
 | 981 |       network: | 
 | 982 |         enabled: true | 
 | 983 |         gateway: 10.0.0.1 | 
| Jan Kaufman | 6a1ad71 | 2015-12-11 14:44:19 +0100 | [diff] [blame] | 984 |         default_interface: eth0 | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 985 |         interface: | 
 | 986 |           wlan0: | 
 | 987 |             type: eth | 
 | 988 |             wireless: | 
 | 989 |               essid: example | 
 | 990 |               key: example_key | 
 | 991 |               security: wpa | 
 | 992 |               priority: 1 | 
 | 993 |  | 
 | 994 | Linux networks with routes defined | 
 | 995 |  | 
 | 996 | .. code-block:: yaml | 
 | 997 |  | 
 | 998 |     linux: | 
 | 999 |       network: | 
 | 1000 |         enabled: true | 
 | 1001 |         gateway: 10.0.0.1 | 
| Jan Kaufman | 6a1ad71 | 2015-12-11 14:44:19 +0100 | [diff] [blame] | 1002 |         default_interface: eth0 | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1003 |         interface: | 
 | 1004 |           eth0: | 
 | 1005 |             type: eth | 
 | 1006 |             route: | 
 | 1007 |               default: | 
 | 1008 |                 address: 192.168.0.123 | 
 | 1009 |                 netmask: 255.255.255.0 | 
 | 1010 |                 gateway: 192.168.0.1 | 
 | 1011 |  | 
 | 1012 | Native Linux Bridges | 
 | 1013 |  | 
 | 1014 | .. code-block:: yaml | 
 | 1015 |  | 
 | 1016 |     linux: | 
 | 1017 |       network: | 
 | 1018 |         interface: | 
 | 1019 |           eth1: | 
 | 1020 |             enabled: true | 
 | 1021 |             type: eth | 
 | 1022 |             proto: manual | 
 | 1023 |             up_cmds: | 
 | 1024 |             - ip address add 0/0 dev $IFACE | 
 | 1025 |             - ip link set $IFACE up | 
 | 1026 |             down_cmds: | 
 | 1027 |             - ip link set $IFACE down | 
 | 1028 |           br-ex: | 
 | 1029 |             enabled: true | 
 | 1030 |             type: bridge | 
 | 1031 |             address: ${linux:network:host:public_local:address} | 
 | 1032 |             netmask: 255.255.255.0 | 
 | 1033 |             use_interfaces: | 
 | 1034 |             - eth1 | 
 | 1035 |  | 
 | 1036 | OpenVswitch Bridges | 
 | 1037 |  | 
 | 1038 | .. code-block:: yaml | 
 | 1039 |  | 
 | 1040 |     linux: | 
 | 1041 |       network: | 
 | 1042 |         bridge: openvswitch | 
 | 1043 |         interface: | 
 | 1044 |           eth1: | 
 | 1045 |             enabled: true | 
 | 1046 |             type: eth | 
 | 1047 |             proto: manual | 
 | 1048 |             up_cmds: | 
 | 1049 |             - ip address add 0/0 dev $IFACE | 
 | 1050 |             - ip link set $IFACE up | 
 | 1051 |             down_cmds: | 
 | 1052 |             - ip link set $IFACE down | 
 | 1053 |           br-ex: | 
 | 1054 |             enabled: true | 
 | 1055 |             type: bridge | 
 | 1056 |             address: ${linux:network:host:public_local:address} | 
 | 1057 |             netmask: 255.255.255.0 | 
 | 1058 |             use_interfaces: | 
 | 1059 |             - eth1 | 
| Dmitry Stremkouski | a581ea7 | 2017-10-18 14:24:16 +0300 | [diff] [blame] | 1060 |           br-prv: | 
 | 1061 |             enabled: true | 
 | 1062 |             type: ovs_bridge | 
 | 1063 |             mtu: 65000 | 
 | 1064 |           br-ens7: | 
 | 1065 |             enabled: true | 
 | 1066 |             name: br-ens7 | 
 | 1067 |             type: ovs_bridge | 
 | 1068 |             proto: manual | 
 | 1069 |             mtu: 9000 | 
 | 1070 |             use_interfaces: | 
 | 1071 |             - ens7 | 
 | 1072 |           patch-br-ens7-br-prv: | 
 | 1073 |             enabled: true | 
 | 1074 |             name: ens7-prv | 
 | 1075 |             ovs_type: ovs_port | 
 | 1076 |             type: ovs_port | 
 | 1077 |             bridge: br-ens7 | 
 | 1078 |             port_type: patch | 
 | 1079 |             peer: prv-ens7 | 
 | 1080 |             mtu: 65000 | 
 | 1081 |           patch-br-prv-br-ens7: | 
 | 1082 |             enabled: true | 
 | 1083 |             name: prv-ens7 | 
 | 1084 |             bridge: br-prv | 
 | 1085 |             ovs_type: ovs_port | 
 | 1086 |             type: ovs_port | 
 | 1087 |             port_type: patch | 
 | 1088 |             peer: ens7-prv | 
 | 1089 |             mtu: 65000 | 
 | 1090 |           ens7: | 
 | 1091 |             enabled: true | 
 | 1092 |             name: ens7 | 
 | 1093 |             proto: manual | 
 | 1094 |             ovs_port_type: OVSPort | 
 | 1095 |             type: ovs_port | 
 | 1096 |             ovs_bridge: br-ens7 | 
 | 1097 |             bridge: br-ens7 | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1098 |  | 
| Petr Jediný | 8f8ae54 | 2017-07-13 16:19:12 +0200 | [diff] [blame] | 1099 | Debian manual proto interfaces | 
 | 1100 |  | 
 | 1101 | When you are changing interface proto from static in up state to manual, you | 
 | 1102 | may need to flush ip addresses. For example, if you want to use the interface | 
 | 1103 | and the ip on the bridge. This can be done by setting the ``ipflush_onchange`` | 
 | 1104 | to true. | 
 | 1105 |  | 
 | 1106 | .. code-block:: yaml | 
 | 1107 |  | 
 | 1108 |     linux: | 
 | 1109 |       network: | 
 | 1110 |         interface: | 
 | 1111 |           eth1: | 
 | 1112 |             enabled: true | 
 | 1113 |             type: eth | 
 | 1114 |             proto: manual | 
 | 1115 |             mtu: 9100 | 
 | 1116 |             ipflush_onchange: true | 
 | 1117 |  | 
| Jiri Broulik | 1a191e3 | 2018-01-15 15:54:21 +0100 | [diff] [blame] | 1118 | Debian static proto interfaces | 
 | 1119 |  | 
 | 1120 | When you are changing interface proto from dhcp in up state to static, you | 
 | 1121 | may need to flush ip addresses and restart interface to assign ip address from a managed file. | 
 | 1122 | For example, if you want to use the interface and the ip on the bridge. | 
 | 1123 | This can be done by setting the ``ipflush_onchange`` with combination | 
 | 1124 | ``restart_on_ipflush`` param set to to true. | 
 | 1125 |  | 
 | 1126 | .. code-block:: yaml | 
 | 1127 |  | 
 | 1128 |     linux: | 
 | 1129 |       network: | 
 | 1130 |         interface: | 
 | 1131 |           eth1: | 
 | 1132 |             enabled: true | 
 | 1133 |             type: eth | 
 | 1134 |             proto: static | 
 | 1135 |             address: 10.1.0.22 | 
 | 1136 |             netmask: 255.255.255.0 | 
 | 1137 |             ipflush_onchange: true | 
 | 1138 |             restart_on_ipflush: true | 
| Petr Jediný | 8f8ae54 | 2017-07-13 16:19:12 +0200 | [diff] [blame] | 1139 |  | 
| Petr Jediný | d577cb5 | 2017-06-28 20:17:49 +0200 | [diff] [blame] | 1140 | Concatinating and removing interface files | 
 | 1141 |  | 
 | 1142 | Debian based distributions have `/etc/network/interfaces.d/` directory, where | 
 | 1143 | you can store configuration of network interfaces in separate files. You can | 
 | 1144 | concatinate the files to the defined destination when needed, this operation | 
 | 1145 | removes the file from the `/etc/network/interfaces.d/`. If you just need to | 
 | 1146 | remove iface files, you can use the `remove_iface_files` key. | 
 | 1147 |  | 
 | 1148 | .. code-block:: yaml | 
 | 1149 |  | 
 | 1150 |     linux: | 
 | 1151 |       network: | 
 | 1152 |         concat_iface_files: | 
 | 1153 |         - src: '/etc/network/interfaces.d/50-cloud-init.cfg' | 
 | 1154 |           dst: '/etc/network/interfaces' | 
 | 1155 |         remove_iface_files: | 
 | 1156 |         - '/etc/network/interfaces.d/90-custom.cfg' | 
 | 1157 |  | 
 | 1158 |  | 
| Oleksandr Vlasov | 27a6c3a | 2017-04-11 16:01:19 -0600 | [diff] [blame] | 1159 | DHCP client configuration | 
 | 1160 |  | 
 | 1161 | None of the keys is mandatory, include only those you really need. For full list | 
 | 1162 | of available options under send, supersede, prepend, append refer to dhcp-options(5) | 
 | 1163 |  | 
 | 1164 | .. code-block:: yaml | 
 | 1165 |  | 
 | 1166 |      linux: | 
 | 1167 |        network: | 
 | 1168 |          dhclient: | 
 | 1169 |            enabled: true | 
 | 1170 |            backoff_cutoff: 15 | 
 | 1171 |            initial_interval: 10 | 
 | 1172 |            reboot: 10 | 
 | 1173 |            retry: 60 | 
 | 1174 |            select_timeout: 0 | 
 | 1175 |            timeout: 120 | 
 | 1176 |            send: | 
 | 1177 |              - option: host-name | 
 | 1178 |                declaration: "= gethostname()" | 
 | 1179 |            supersede: | 
 | 1180 |              - option: host-name | 
 | 1181 |                declaration: "spaceship" | 
 | 1182 |              - option: domain-name | 
 | 1183 |                declaration: "domain.home" | 
 | 1184 |              #- option: arp-cache-timeout | 
 | 1185 |              #  declaration: 20 | 
 | 1186 |            prepend: | 
 | 1187 |              - option: domain-name-servers | 
 | 1188 |                declaration: | 
 | 1189 |                  - 8.8.8.8 | 
 | 1190 |                  - 8.8.4.4 | 
 | 1191 |              - option: domain-search | 
 | 1192 |                declaration: | 
 | 1193 |                  - example.com | 
 | 1194 |                  - eng.example.com | 
 | 1195 |            #append: | 
 | 1196 |              #- option: domain-name-servers | 
 | 1197 |              #  declaration: 127.0.0.1 | 
 | 1198 |            # ip or subnet to reject dhcp offer from | 
 | 1199 |            reject: | 
 | 1200 |              - 192.33.137.209 | 
 | 1201 |              - 10.0.2.0/24 | 
 | 1202 |            request: | 
 | 1203 |              - subnet-mask | 
 | 1204 |              - broadcast-address | 
 | 1205 |              - time-offset | 
 | 1206 |              - routers | 
 | 1207 |              - domain-name | 
 | 1208 |              - domain-name-servers | 
 | 1209 |              - domain-search | 
 | 1210 |              - host-name | 
 | 1211 |              - dhcp6.name-servers | 
 | 1212 |              - dhcp6.domain-search | 
 | 1213 |              - dhcp6.fqdn | 
 | 1214 |              - dhcp6.sntp-servers | 
 | 1215 |              - netbios-name-servers | 
 | 1216 |              - netbios-scope | 
 | 1217 |              - interface-mtu | 
 | 1218 |              - rfc3442-classless-static-routes | 
 | 1219 |              - ntp-servers | 
 | 1220 |            require: | 
 | 1221 |              - subnet-mask | 
 | 1222 |              - domain-name-servers | 
 | 1223 |            # if per interface configuration required add below | 
 | 1224 |            interface: | 
 | 1225 |              ens2: | 
 | 1226 |                initial_interval: 11 | 
 | 1227 |                reject: | 
 | 1228 |                  - 192.33.137.210 | 
 | 1229 |              ens3: | 
 | 1230 |                initial_interval: 12 | 
 | 1231 |                reject: | 
 | 1232 |                  - 192.33.137.211 | 
 | 1233 |  | 
| Petr Michalec | eb14b55 | 2017-06-01 10:27:05 +0200 | [diff] [blame] | 1234 | Linux network systemd settings: | 
 | 1235 |  | 
 | 1236 | .. code-block:: yaml | 
 | 1237 |  | 
 | 1238 |     linux: | 
 | 1239 |       network: | 
 | 1240 |         ... | 
 | 1241 |         systemd: | 
 | 1242 |           link: | 
 | 1243 |             10-iface-dmz: | 
 | 1244 |               Match: | 
 | 1245 |                 MACAddress: c8:5b:67:fa:1a:af | 
 | 1246 |                 OriginalName: eth0 | 
 | 1247 |               Link: | 
 | 1248 |                 Name: dmz0 | 
 | 1249 |           netdev: | 
 | 1250 |             20-bridge-dmz: | 
 | 1251 |               match: | 
 | 1252 |                 name: dmz0 | 
 | 1253 |               network: | 
 | 1254 |                 mescription: bridge | 
 | 1255 |                 bridge: br-dmz0 | 
 | 1256 |           network: | 
 | 1257 |           # works with lowercase, keys are by default capitalized | 
 | 1258 |             40-dhcp: | 
 | 1259 |               match: | 
 | 1260 |                 name: '*' | 
 | 1261 |               network: | 
 | 1262 |                 DHCP: yes | 
 | 1263 |  | 
| Oleksandr Vlasov | 27a6c3a | 2017-04-11 16:01:19 -0600 | [diff] [blame] | 1264 |  | 
| Petr Michalec | 10462bb | 2017-03-23 19:18:08 +0100 | [diff] [blame] | 1265 | Configure global environment variables | 
| Petr Michalec | 10462bb | 2017-03-23 19:18:08 +0100 | [diff] [blame] | 1266 |  | 
| Ales Komarek | 417e8c5 | 2017-08-25 15:10:29 +0200 | [diff] [blame] | 1267 | Use ``/etc/environment`` for static system wide variable assignment after | 
 | 1268 | boot. Variable expansion is frequently not supported. | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1269 |  | 
 | 1270 | .. code-block:: yaml | 
 | 1271 |  | 
 | 1272 |     linux: | 
| Petr Michalec | 10462bb | 2017-03-23 19:18:08 +0100 | [diff] [blame] | 1273 |       system: | 
 | 1274 |         env: | 
 | 1275 |           BOB_VARIABLE: Alice | 
 | 1276 |           ... | 
 | 1277 |           BOB_PATH: | 
 | 1278 |             - /srv/alice/bin | 
 | 1279 |             - /srv/bob/bin | 
 | 1280 |           ... | 
 | 1281 |           ftp_proxy:   none | 
 | 1282 |           http_proxy:  http://global-http-proxy.host.local:8080 | 
 | 1283 |           https_proxy: ${linux:system:proxy:https} | 
 | 1284 |           no_proxy: | 
 | 1285 |             - 192.168.0.80 | 
 | 1286 |             - 192.168.1.80 | 
 | 1287 |             - .domain.com | 
 | 1288 |             - .local | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1289 |         ... | 
| Petr Michalec | 10462bb | 2017-03-23 19:18:08 +0100 | [diff] [blame] | 1290 |         # NOTE: global defaults proxy configuration. | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1291 |         proxy: | 
| Petr Michalec | 10462bb | 2017-03-23 19:18:08 +0100 | [diff] [blame] | 1292 |           ftp:   ftp://proxy.host.local:2121 | 
 | 1293 |           http:  http://proxy.host.local:3142 | 
 | 1294 |           https: https://proxy.host.local:3143 | 
 | 1295 |           noproxy: | 
 | 1296 |             - .domain.com | 
 | 1297 |             - .local | 
 | 1298 |  | 
 | 1299 | Configure profile.d scripts | 
| Petr Michalec | 10462bb | 2017-03-23 19:18:08 +0100 | [diff] [blame] | 1300 |  | 
| Ales Komarek | 417e8c5 | 2017-08-25 15:10:29 +0200 | [diff] [blame] | 1301 | The profile.d scripts are being sourced during .sh execution and support | 
 | 1302 | variable expansion in opposite to /etc/environment global settings in | 
 | 1303 | ``/etc/environment``. | 
| Petr Michalec | 10462bb | 2017-03-23 19:18:08 +0100 | [diff] [blame] | 1304 |  | 
 | 1305 | .. code-block:: yaml | 
 | 1306 |  | 
 | 1307 |     linux: | 
 | 1308 |       system: | 
 | 1309 |         profile: | 
 | 1310 |           locales: | | 
 | 1311 |             export LANG=C | 
 | 1312 |             export LC_ALL=C | 
 | 1313 |           ... | 
 | 1314 |           vi_flavors.sh: | | 
 | 1315 |             export PAGER=view | 
 | 1316 |             export EDITOR=vim | 
 | 1317 |             alias vi=vim | 
 | 1318 |           shell_locales.sh: | | 
 | 1319 |             export LANG=en_US | 
 | 1320 |             export LC_ALL=en_US.UTF-8 | 
 | 1321 |           shell_proxies.sh: | | 
 | 1322 |             export FTP_PROXY=ftp://127.0.3.3:2121 | 
 | 1323 |             export NO_PROXY='.local' | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1324 |  | 
 | 1325 | Linux with hosts | 
 | 1326 |  | 
| Filip Pytloun | 86506fe | 2017-01-26 14:36:16 +0100 | [diff] [blame] | 1327 | Parameter purge_hosts will enforce whole /etc/hosts file, removing entries | 
 | 1328 | that are not defined in model except defaults for both IPv4 and IPv6 localhost | 
 | 1329 | and hostname + fqdn. | 
| Ales Komarek | 417e8c5 | 2017-08-25 15:10:29 +0200 | [diff] [blame] | 1330 |  | 
| Filip Pytloun | 86506fe | 2017-01-26 14:36:16 +0100 | [diff] [blame] | 1331 | It's good to use this option if you want to ensure /etc/hosts is always in a | 
 | 1332 | clean state however it's not enabled by default for safety. | 
 | 1333 |  | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1334 | .. code-block:: yaml | 
 | 1335 |  | 
 | 1336 |     linux: | 
 | 1337 |       network: | 
| Filip Pytloun | 86506fe | 2017-01-26 14:36:16 +0100 | [diff] [blame] | 1338 |         purge_hosts: true | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1339 |         host: | 
| Filip Pytloun | 86506fe | 2017-01-26 14:36:16 +0100 | [diff] [blame] | 1340 |           # No need to define this one if purge_hosts is true | 
 | 1341 |           hostname: | 
 | 1342 |             address: 127.0.1.1 | 
 | 1343 |             names: | 
 | 1344 |             - ${linux:network:fqdn} | 
 | 1345 |             - ${linux:network:hostname} | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1346 |           node1: | 
 | 1347 |             address: 192.168.10.200 | 
 | 1348 |             names: | 
 | 1349 |             - node2.domain.com | 
 | 1350 |             - service2.domain.com | 
 | 1351 |           node2: | 
 | 1352 |             address: 192.168.10.201 | 
 | 1353 |             names: | 
 | 1354 |             - node2.domain.com | 
 | 1355 |             - service2.domain.com | 
 | 1356 |  | 
| Ales Komarek | 417e8c5 | 2017-08-25 15:10:29 +0200 | [diff] [blame] | 1357 | Linux with hosts collected from mine | 
 | 1358 |  | 
 | 1359 | In this case all dns records defined within infrastrucuture will be passed to | 
 | 1360 | local hosts records or any DNS server. Only hosts with `grain` parameter to | 
 | 1361 | true will be propagated to the mine. | 
 | 1362 |  | 
 | 1363 | .. code-block:: yaml | 
 | 1364 |  | 
 | 1365 |     linux: | 
 | 1366 |       network: | 
 | 1367 |         purge_hosts: true | 
 | 1368 |         mine_dns_records: true | 
 | 1369 |         host: | 
 | 1370 |           node1: | 
 | 1371 |             address: 192.168.10.200 | 
 | 1372 |             grain: true | 
 | 1373 |             names: | 
 | 1374 |             - node2.domain.com | 
 | 1375 |             - service2.domain.com | 
| Filip Pytloun | 86506fe | 2017-01-26 14:36:16 +0100 | [diff] [blame] | 1376 |  | 
| Filip Pytloun | de9bea5 | 2016-01-11 15:39:10 +0100 | [diff] [blame] | 1377 | Setup resolv.conf, nameservers, domain and search domains | 
 | 1378 |  | 
 | 1379 | .. code-block:: yaml | 
 | 1380 |  | 
 | 1381 |     linux: | 
 | 1382 |       network: | 
 | 1383 |         resolv: | 
 | 1384 |           dns: | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1385 |           - 8.8.4.4 | 
 | 1386 |           - 8.8.8.8 | 
| Filip Pytloun | de9bea5 | 2016-01-11 15:39:10 +0100 | [diff] [blame] | 1387 |           domain: my.example.com | 
 | 1388 |           search: | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1389 |           - my.example.com | 
 | 1390 |           - example.com | 
| Marek Celoud | f6cd192 | 2016-12-05 13:39:49 +0100 | [diff] [blame] | 1391 |           options: | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1392 |           - ndots: 5 | 
 | 1393 |           - timeout: 2 | 
 | 1394 |           - attempts: 2 | 
| Filip Pytloun | de9bea5 | 2016-01-11 15:39:10 +0100 | [diff] [blame] | 1395 |  | 
| Ales Komarek | 417e8c5 | 2017-08-25 15:10:29 +0200 | [diff] [blame] | 1396 | setting custom TX queue length for tap interfaces | 
| Andrii Petrenko | 735761d | 2017-03-21 17:17:35 -0700 | [diff] [blame] | 1397 |  | 
 | 1398 | .. code-block:: yaml | 
 | 1399 |  | 
 | 1400 |     linux: | 
 | 1401 |       network: | 
 | 1402 |         tap_custom_txqueuelen: 10000 | 
 | 1403 |  | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1404 | DPDK OVS interfaces | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1405 |  | 
 | 1406 | **DPDK OVS NIC** | 
 | 1407 |  | 
 | 1408 | .. code-block:: yaml | 
 | 1409 |  | 
 | 1410 |     linux: | 
 | 1411 |       network: | 
 | 1412 |         bridge: openvswitch | 
 | 1413 |         dpdk: | 
 | 1414 |           enabled: true | 
| Oleg Bondarev | 9a46679 | 2017-05-25 15:55:42 +0400 | [diff] [blame] | 1415 |           driver: uio/vfio | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1416 |         openvswitch: | 
 | 1417 |           pmd_cpu_mask: "0x6" | 
 | 1418 |           dpdk_socket_mem: "1024,1024" | 
 | 1419 |           dpdk_lcore_mask: "0x400" | 
 | 1420 |           memory_channels: 2 | 
 | 1421 |         interface: | 
 | 1422 |           dpkd0: | 
 | 1423 |             name: ${_param:dpdk_nic} | 
 | 1424 |             pci: 0000:06:00.0 | 
| Oleg Bondarev | 9a46679 | 2017-05-25 15:55:42 +0400 | [diff] [blame] | 1425 |             driver: igb_uio/vfio-pci | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1426 |             enabled: true | 
 | 1427 |             type: dpdk_ovs_port | 
 | 1428 |             n_rxq: 2 | 
| Oleg Bondarev | 43dbbd3 | 2017-05-24 17:06:19 +0400 | [diff] [blame] | 1429 |             pmd_rxq_affinity: "0:1,1:2" | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1430 |             bridge: br-prv | 
| Jakub Pavlik | aa75906 | 2017-03-13 15:57:26 +0100 | [diff] [blame] | 1431 |             mtu: 9000 | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1432 |           br-prv: | 
 | 1433 |             enabled: true | 
 | 1434 |             type: dpdk_ovs_bridge | 
 | 1435 |  | 
 | 1436 | **DPDK OVS Bond** | 
 | 1437 |  | 
 | 1438 | .. code-block:: yaml | 
 | 1439 |  | 
 | 1440 |     linux: | 
 | 1441 |       network: | 
 | 1442 |         bridge: openvswitch | 
 | 1443 |         dpdk: | 
 | 1444 |           enabled: true | 
| Oleg Bondarev | 9a46679 | 2017-05-25 15:55:42 +0400 | [diff] [blame] | 1445 |           driver: uio/vfio | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1446 |         openvswitch: | 
 | 1447 |           pmd_cpu_mask: "0x6" | 
 | 1448 |           dpdk_socket_mem: "1024,1024" | 
 | 1449 |           dpdk_lcore_mask: "0x400" | 
 | 1450 |           memory_channels: 2 | 
 | 1451 |         interface: | 
 | 1452 |           dpdk_second_nic: | 
 | 1453 |             name: ${_param:primary_second_nic} | 
 | 1454 |             pci: 0000:06:00.0 | 
| Oleg Bondarev | 9a46679 | 2017-05-25 15:55:42 +0400 | [diff] [blame] | 1455 |             driver: igb_uio/vfio-pci | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1456 |             bond: dpdkbond0 | 
 | 1457 |             enabled: true | 
 | 1458 |             type: dpdk_ovs_port | 
 | 1459 |             n_rxq: 2 | 
| Oleg Bondarev | 43dbbd3 | 2017-05-24 17:06:19 +0400 | [diff] [blame] | 1460 |             pmd_rxq_affinity: "0:1,1:2" | 
| Jakub Pavlik | aa75906 | 2017-03-13 15:57:26 +0100 | [diff] [blame] | 1461 |             mtu: 9000 | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1462 |           dpdk_first_nic: | 
 | 1463 |             name: ${_param:primary_first_nic} | 
 | 1464 |             pci: 0000:05:00.0 | 
| Oleg Bondarev | 9a46679 | 2017-05-25 15:55:42 +0400 | [diff] [blame] | 1465 |             driver: igb_uio/vfio-pci | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1466 |             bond: dpdkbond0 | 
 | 1467 |             enabled: true | 
 | 1468 |             type: dpdk_ovs_port | 
 | 1469 |             n_rxq: 2 | 
| Oleg Bondarev | 43dbbd3 | 2017-05-24 17:06:19 +0400 | [diff] [blame] | 1470 |             pmd_rxq_affinity: "0:1,1:2" | 
| Jakub Pavlik | aa75906 | 2017-03-13 15:57:26 +0100 | [diff] [blame] | 1471 |             mtu: 9000 | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1472 |           dpdkbond0: | 
 | 1473 |             enabled: true | 
 | 1474 |             bridge: br-prv | 
 | 1475 |             type: dpdk_ovs_bond | 
 | 1476 |             mode: active-backup | 
 | 1477 |           br-prv: | 
 | 1478 |             enabled: true | 
 | 1479 |             type: dpdk_ovs_bridge | 
 | 1480 |  | 
| Dzmitry Stremkouski | f619b07 | 2018-03-15 20:13:42 +0100 | [diff] [blame] | 1481 | **DPDK OVS LACP Bond with vlan tag** | 
 | 1482 |  | 
 | 1483 | .. code-block:: yaml | 
 | 1484 |  | 
 | 1485 |     linux: | 
 | 1486 |       network: | 
 | 1487 |         bridge: openvswitch | 
 | 1488 |         dpdk: | 
 | 1489 |           enabled: true | 
 | 1490 |           driver: uio | 
 | 1491 |         openvswitch: | 
 | 1492 |           pmd_cpu_mask: "0x6" | 
 | 1493 |           dpdk_socket_mem: "1024,1024" | 
 | 1494 |           dpdk_lcore_mask: "0x400" | 
 | 1495 |           memory_channels: "2" | 
 | 1496 |         interface: | 
 | 1497 |           eth3: | 
 | 1498 |             enabled: true | 
 | 1499 |             type: eth | 
 | 1500 |             proto: manual | 
 | 1501 |             name: ${_param:tenant_first_nic} | 
 | 1502 |           eth4: | 
 | 1503 |             enabled: true | 
 | 1504 |             type: eth | 
 | 1505 |             proto: manual | 
 | 1506 |             name: ${_param:tenant_second_nic} | 
 | 1507 |           dpdk0: | 
 | 1508 |             name: ${_param:tenant_first_nic} | 
 | 1509 |             pci: "0000:81:00.0" | 
 | 1510 |             driver: igb_uio | 
 | 1511 |             bond: bond1 | 
 | 1512 |             enabled: true | 
 | 1513 |             type: dpdk_ovs_port | 
 | 1514 |             n_rxq: 2 | 
 | 1515 |           dpdk1: | 
 | 1516 |             name: ${_param:tenant_second_nic} | 
 | 1517 |             pci: "0000:81:00.1" | 
 | 1518 |             driver: igb_uio | 
 | 1519 |             bond: bond1 | 
 | 1520 |             enabled: true | 
 | 1521 |             type: dpdk_ovs_port | 
 | 1522 |             n_rxq: 2 | 
 | 1523 |           bond1: | 
 | 1524 |             enabled: true | 
 | 1525 |             bridge: br-prv | 
 | 1526 |             type: dpdk_ovs_bond | 
 | 1527 |             mode: balance-slb | 
 | 1528 |           br-prv: | 
 | 1529 |             enabled: true | 
 | 1530 |             type: dpdk_ovs_bridge | 
 | 1531 |             tag: ${_param:tenant_vlan} | 
 | 1532 |             address: ${_param:tenant_address} | 
 | 1533 |             netmask: ${_param:tenant_network_netmask} | 
 | 1534 |  | 
| Jakub Pavlik | aa75906 | 2017-03-13 15:57:26 +0100 | [diff] [blame] | 1535 | **DPDK OVS bridge for VXLAN** | 
 | 1536 |  | 
 | 1537 | If VXLAN is used as tenant segmentation then ip address must be set on br-prv | 
 | 1538 |  | 
 | 1539 | .. code-block:: yaml | 
 | 1540 |  | 
 | 1541 |     linux: | 
 | 1542 |       network: | 
 | 1543 |         ... | 
 | 1544 |         interface: | 
 | 1545 |           br-prv: | 
 | 1546 |             enabled: true | 
 | 1547 |             type: dpdk_ovs_bridge | 
 | 1548 |             address: 192.168.50.0 | 
 | 1549 |             netmask: 255.255.255.0 | 
| Michael Polenchuk | d173d55 | 2018-01-22 15:22:47 +0400 | [diff] [blame] | 1550 |             tag: 101 | 
| Jakub Pavlik | aa75906 | 2017-03-13 15:57:26 +0100 | [diff] [blame] | 1551 |             mtu: 9000 | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1552 |  | 
| Oleksii Chupryn | e2151ff | 2018-03-13 16:01:12 +0200 | [diff] [blame] | 1553 |  | 
 | 1554 |  | 
 | 1555 | **DPDK OVS bridge with Linux network interface** | 
 | 1556 |  | 
 | 1557 | .. code-block:: yaml | 
 | 1558 |  | 
 | 1559 |     linux: | 
 | 1560 |       network: | 
 | 1561 |         ... | 
 | 1562 |         interface: | 
 | 1563 |           eth0: | 
 | 1564 |             type: eth | 
 | 1565 |             ovs_bridge: br-prv | 
 | 1566 |             ... | 
 | 1567 |           br-prv: | 
 | 1568 |             enabled: true | 
 | 1569 |             type: dpdk_ovs_bridge | 
 | 1570 |             ... | 
 | 1571 |  | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1572 | Linux storage | 
 | 1573 | ------------- | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1574 |  | 
 | 1575 | Linux with mounted Samba | 
 | 1576 |  | 
 | 1577 | .. code-block:: yaml | 
 | 1578 |  | 
 | 1579 |     linux: | 
 | 1580 |       storage: | 
 | 1581 |         enabled: true | 
 | 1582 |         mount: | 
 | 1583 |           samba1: | 
| Simon Pasquier | 376262a | 2016-11-16 15:21:51 +0100 | [diff] [blame] | 1584 |           - enabled: true | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1585 |           - path: /media/myuser/public/ | 
 | 1586 |           - device: //192.168.0.1/storage | 
 | 1587 |           - file_system: cifs | 
 | 1588 |           - options: guest,uid=myuser,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm | 
 | 1589 |  | 
| Jiri Broulik | b017f93 | 2017-03-31 13:55:36 +0200 | [diff] [blame] | 1590 | NFS mount | 
 | 1591 |  | 
 | 1592 | .. code-block:: yaml | 
 | 1593 |  | 
 | 1594 |   linux: | 
 | 1595 |     storage: | 
 | 1596 |       enabled: true | 
 | 1597 |       mount: | 
 | 1598 |         nfs_glance: | 
 | 1599 |           enabled: true | 
 | 1600 |           path: /var/lib/glance/images | 
 | 1601 |           device: 172.16.10.110:/var/nfs/glance | 
 | 1602 |           file_system: nfs | 
 | 1603 |           opts: rw,sync | 
 | 1604 |  | 
 | 1605 |  | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1606 | File swap configuration | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1607 |  | 
 | 1608 | .. code-block:: yaml | 
 | 1609 |  | 
 | 1610 |     linux: | 
 | 1611 |       storage: | 
 | 1612 |         enabled: true | 
 | 1613 |         swap: | 
 | 1614 |           file: | 
 | 1615 |             enabled: true | 
 | 1616 |             engine: file | 
 | 1617 |             device: /swapfile | 
 | 1618 |             size: 1024 | 
 | 1619 |  | 
| Jakub Pavlik | 21ca215 | 2017-02-27 22:21:09 +0100 | [diff] [blame] | 1620 | Partition swap configuration | 
| Lachlan Evenson | 3067651 | 2016-01-22 15:43:28 -0800 | [diff] [blame] | 1621 |  | 
 | 1622 | .. code-block:: yaml | 
 | 1623 |  | 
 | 1624 |     linux: | 
 | 1625 |       storage: | 
 | 1626 |         enabled: true | 
 | 1627 |         swap: | 
 | 1628 |           partition: | 
 | 1629 |             enabled: true | 
 | 1630 |             engine: partition | 
 | 1631 |             device: /dev/vg0/swap | 
 | 1632 |  | 
| Filip Pytloun | c8a001a | 2015-12-15 14:09:19 +0100 | [diff] [blame] | 1633 | LVM group `vg1` with one device and `data` volume mounted into `/mnt/data` | 
 | 1634 |  | 
 | 1635 | .. code-block:: yaml | 
 | 1636 |  | 
 | 1637 |     parameters: | 
 | 1638 |       linux: | 
 | 1639 |         storage: | 
 | 1640 |           mount: | 
 | 1641 |             data: | 
| Simon Pasquier | 376262a | 2016-11-16 15:21:51 +0100 | [diff] [blame] | 1642 |               enabled: true | 
| Filip Pytloun | c8a001a | 2015-12-15 14:09:19 +0100 | [diff] [blame] | 1643 |               device: /dev/vg1/data | 
 | 1644 |               file_system: ext4 | 
 | 1645 |               path: /mnt/data | 
 | 1646 |           lvm: | 
 | 1647 |             vg1: | 
 | 1648 |               enabled: true | 
 | 1649 |               devices: | 
 | 1650 |                 - /dev/sdb | 
 | 1651 |               volume: | 
 | 1652 |                 data: | 
 | 1653 |                   size: 40G | 
 | 1654 |                   mount: ${linux:storage:mount:data} | 
 | 1655 |  | 
| Jakub Pavlik | 4f74214 | 2017-08-08 15:05:50 +0200 | [diff] [blame] | 1656 | Create partitions on disk. Specify size in MB. It expects empty | 
| Piotr Kruk | d51911b | 2017-12-04 11:27:08 +0100 | [diff] [blame] | 1657 | disk without any existing partitions. (set startsector=1, if you want to start partitions from 2048) | 
| Jakub Pavlik | 4f74214 | 2017-08-08 15:05:50 +0200 | [diff] [blame] | 1658 |  | 
 | 1659 | .. code-block:: yaml | 
 | 1660 |  | 
 | 1661 |       linux: | 
 | 1662 |         storage: | 
 | 1663 |           disk: | 
 | 1664 |             first_drive: | 
| Piotr Kruk | d51911b | 2017-12-04 11:27:08 +0100 | [diff] [blame] | 1665 |               startsector: 1 | 
| Jakub Pavlik | 4f74214 | 2017-08-08 15:05:50 +0200 | [diff] [blame] | 1666 |               name: /dev/loop1 | 
 | 1667 |               type: gpt | 
 | 1668 |               partitions: | 
 | 1669 |                 - size: 200 #size in MB | 
 | 1670 |                   type: fat32 | 
 | 1671 |                 - size: 300 #size in MB | 
| Jakub Pavlik | 8e2140a | 2017-08-14 23:29:57 +0200 | [diff] [blame] | 1672 |                   mkfs: True | 
 | 1673 |                   type: xfs | 
| Jakub Pavlik | 4f74214 | 2017-08-08 15:05:50 +0200 | [diff] [blame] | 1674 |             /dev/vda1: | 
 | 1675 |               partitions: | 
 | 1676 |                 - size: 5 | 
 | 1677 |                   type: ext2 | 
 | 1678 |                 - size: 10 | 
 | 1679 |                   type: ext4 | 
| Ales Komarek | a634f4b | 2016-10-02 13:11:04 +0200 | [diff] [blame] | 1680 |  | 
 | 1681 | Multipath with Fujitsu Eternus DXL | 
 | 1682 |  | 
 | 1683 | .. code-block:: yaml | 
 | 1684 |  | 
 | 1685 |     parameters: | 
 | 1686 |       linux: | 
 | 1687 |         storage: | 
 | 1688 |           multipath: | 
 | 1689 |             enabled: true | 
 | 1690 |             blacklist_devices: | 
 | 1691 |             - /dev/sda | 
 | 1692 |             - /dev/sdb | 
 | 1693 |             backends: | 
 | 1694 |             - fujitsu_eternus_dxl | 
 | 1695 |  | 
 | 1696 | Multipath with Hitachi VSP 1000 | 
 | 1697 |  | 
 | 1698 | .. code-block:: yaml | 
 | 1699 |  | 
 | 1700 |     parameters: | 
 | 1701 |       linux: | 
 | 1702 |         storage: | 
 | 1703 |           multipath: | 
 | 1704 |             enabled: true | 
 | 1705 |             blacklist_devices: | 
 | 1706 |             - /dev/sda | 
 | 1707 |             - /dev/sdb | 
 | 1708 |             backends: | 
 | 1709 |             - hitachi_vsp1000 | 
 | 1710 |  | 
 | 1711 | Multipath with IBM Storwize | 
 | 1712 |  | 
 | 1713 | .. code-block:: yaml | 
 | 1714 |  | 
 | 1715 |     parameters: | 
 | 1716 |       linux: | 
 | 1717 |         storage: | 
 | 1718 |           multipath: | 
 | 1719 |             enabled: true | 
 | 1720 |             blacklist_devices: | 
 | 1721 |             - /dev/sda | 
 | 1722 |             - /dev/sdb | 
 | 1723 |             backends: | 
 | 1724 |             - ibm_storwize | 
 | 1725 |  | 
 | 1726 | Multipath with multiple backends | 
 | 1727 |  | 
 | 1728 | .. code-block:: yaml | 
 | 1729 |  | 
 | 1730 |     parameters: | 
 | 1731 |       linux: | 
 | 1732 |         storage: | 
 | 1733 |           multipath: | 
 | 1734 |             enabled: true | 
 | 1735 |             blacklist_devices: | 
 | 1736 |             - /dev/sda | 
 | 1737 |             - /dev/sdb | 
 | 1738 |             - /dev/sdc | 
 | 1739 |             - /dev/sdd | 
 | 1740 |             backends: | 
 | 1741 |             - ibm_storwize | 
 | 1742 |             - fujitsu_eternus_dxl | 
 | 1743 |             - hitachi_vsp1000 | 
 | 1744 |  | 
| Dmitry Stremkouski | 7d8d67a | 2017-11-15 13:08:19 +0300 | [diff] [blame] | 1745 | PAM LDAP integration | 
 | 1746 |  | 
 | 1747 | .. code-block:: yaml | 
 | 1748 |  | 
 | 1749 |     parameters: | 
 | 1750 |       linux: | 
 | 1751 |         system: | 
 | 1752 |           auth: | 
 | 1753 |             enabled: true | 
 | 1754 |             ldap: | 
 | 1755 |               enabled: true | 
 | 1756 |               binddn: cn=bind,ou=service_users,dc=example,dc=com | 
 | 1757 |               bindpw: secret | 
 | 1758 |               uri: ldap://127.0.0.1 | 
 | 1759 |               base: ou=users,dc=example,dc=com | 
 | 1760 |               ldap_version: 3 | 
 | 1761 |               pagesize: 65536 | 
 | 1762 |               referrals: off | 
 | 1763 |               filter: | 
 | 1764 |                 passwd: (&(&(objectClass=person)(uidNumber=*))(unixHomeDirectory=*)) | 
 | 1765 |                 shadow: (&(&(objectClass=person)(uidNumber=*))(unixHomeDirectory=*)) | 
 | 1766 |                 group:  (&(objectClass=group)(gidNumber=*)) | 
 | 1767 |  | 
| Ales Komarek | a634f4b | 2016-10-02 13:11:04 +0200 | [diff] [blame] | 1768 | Disabled multipath (the default setup) | 
 | 1769 |  | 
 | 1770 | .. code-block:: yaml | 
 | 1771 |  | 
 | 1772 |     parameters: | 
 | 1773 |       linux: | 
 | 1774 |         storage: | 
 | 1775 |           multipath: | 
 | 1776 |             enabled: false | 
 | 1777 |  | 
| Simon Pasquier | 375001e | 2017-01-26 13:22:33 +0100 | [diff] [blame] | 1778 | Linux with local loopback device | 
 | 1779 |  | 
 | 1780 | .. code-block:: yaml | 
 | 1781 |  | 
 | 1782 |     linux: | 
 | 1783 |       storage: | 
 | 1784 |         loopback: | 
 | 1785 |           disk1: | 
 | 1786 |             file: /srv/disk1 | 
 | 1787 |             size: 50G | 
 | 1788 |  | 
| Filip Pytloun | b2c8f85 | 2016-11-21 17:03:43 +0100 | [diff] [blame] | 1789 | External config generation | 
 | 1790 | -------------------------- | 
 | 1791 |  | 
 | 1792 | You are able to use config support metadata between formulas and only generate | 
 | 1793 | config files for external use, eg. docker, etc. | 
 | 1794 |  | 
 | 1795 | .. code-block:: yaml | 
 | 1796 |  | 
 | 1797 |     parameters: | 
 | 1798 |       linux: | 
 | 1799 |         system: | 
 | 1800 |           config: | 
 | 1801 |             pillar: | 
 | 1802 |               jenkins: | 
 | 1803 |                 master: | 
 | 1804 |                   home: /srv/volumes/jenkins | 
 | 1805 |                   approved_scripts: | 
 | 1806 |                     - method java.net.URL openConnection | 
 | 1807 |                   credentials: | 
 | 1808 |                     - type: username_password | 
 | 1809 |                       scope: global | 
 | 1810 |                       id: test | 
 | 1811 |                       desc: Testing credentials | 
 | 1812 |                       username: test | 
 | 1813 |                       password: test | 
 | 1814 |  | 
| Vladimir Eremin | ccf2884 | 2017-04-10 23:52:10 +0300 | [diff] [blame] | 1815 | Netconsole Remote Kernel Logging | 
 | 1816 | -------------------------------- | 
 | 1817 |  | 
 | 1818 | Netconsole logger could be configured for configfs-enabled kernels | 
 | 1819 | (`CONFIG_NETCONSOLE_DYNAMIC` should be enabled). Configuration applies both in | 
 | 1820 | runtime (if network is already configured), and on-boot after interface | 
 | 1821 | initialization. Notes: | 
 | 1822 |  | 
 | 1823 |  * receiver could be located only in same L3 domain | 
 | 1824 |    (or you need to configure gateway MAC manually) | 
 | 1825 |  * receiver's MAC is detected only on configuration time | 
 | 1826 |  * using broadcast MAC is not recommended | 
 | 1827 |  | 
 | 1828 | .. code-block:: yaml | 
 | 1829 |  | 
 | 1830 |     parameters: | 
 | 1831 |       linux: | 
 | 1832 |         system: | 
 | 1833 |           netconsole: | 
 | 1834 |             enabled: true | 
 | 1835 |             port: 514 (optional) | 
 | 1836 |             loglevel: debug (optional) | 
 | 1837 |             target: | 
 | 1838 |               192.168.0.1: | 
 | 1839 |                 interface: bond0 | 
 | 1840 |                 mac: "ff:ff:ff:ff:ff:ff" (optional) | 
| Ales Komarek | a634f4b | 2016-10-02 13:11:04 +0200 | [diff] [blame] | 1841 |  | 
| Filip Pytloun | f5383a4 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1842 | Usage | 
 | 1843 | ===== | 
 | 1844 |  | 
 | 1845 | Set mtu of network interface eth0 to 1400 | 
 | 1846 |  | 
 | 1847 | .. code-block:: bash | 
 | 1848 |  | 
 | 1849 |     ip link set dev eth0 mtu 1400 | 
 | 1850 |  | 
 | 1851 | Read more | 
 | 1852 | ========= | 
 | 1853 |  | 
 | 1854 | * https://www.archlinux.org/ | 
 | 1855 | * http://askubuntu.com/questions/175172/how-do-i-configure-proxies-in-ubuntu-server-or-minimal-cli-ubuntu | 
| Filip Pytloun | 018f871 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 1856 |  | 
 | 1857 | Documentation and Bugs | 
 | 1858 | ====================== | 
 | 1859 |  | 
 | 1860 | To learn how to install and update salt-formulas, consult the documentation | 
 | 1861 | available online at: | 
 | 1862 |  | 
 | 1863 |     http://salt-formulas.readthedocs.io/ | 
 | 1864 |  | 
 | 1865 | In the unfortunate event that bugs are discovered, they should be reported to | 
 | 1866 | the appropriate issue tracker. Use Github issue tracker for specific salt | 
 | 1867 | formula: | 
 | 1868 |  | 
 | 1869 |     https://github.com/salt-formulas/salt-formula-linux/issues | 
 | 1870 |  | 
 | 1871 | For feature requests, bug reports or blueprints affecting entire ecosystem, | 
 | 1872 | use Launchpad salt-formulas project: | 
 | 1873 |  | 
 | 1874 |     https://launchpad.net/salt-formulas | 
 | 1875 |  | 
 | 1876 | You can also join salt-formulas-users team and subscribe to mailing list: | 
 | 1877 |  | 
 | 1878 |     https://launchpad.net/~salt-formulas-users | 
 | 1879 |  | 
 | 1880 | Developers wishing to work on the salt-formulas projects should always base | 
 | 1881 | their work on master branch and submit pull request against specific formula. | 
 | 1882 |  | 
 | 1883 |     https://github.com/salt-formulas/salt-formula-linux | 
 | 1884 |  | 
 | 1885 | Any questions or feedback is always welcome so feel free to join our IRC | 
 | 1886 | channel: | 
 | 1887 |  | 
 | 1888 |     #salt-formulas @ irc.freenode.net |