blob: f62a937c411c98cbbef231e80823bbb248b1896e [file] [log] [blame]
Aleš Komárek63572992017-04-11 13:16:44 +02001============
2Linux Fomula
3============
Filip Pytlounf5383a42015-10-06 16:28:32 +02004
5Linux Operating Systems.
6
7* Ubuntu
8* CentOS
9* RedHat
10* Fedora
11* Arch
12
Aleš Komárek63572992017-04-11 13:16:44 +020013Sample Pillars
Filip Pytlounf5383a42015-10-06 16:28:32 +020014==============
15
Aleš Komárek63572992017-04-11 13:16:44 +020016
17Linux System
Filip Pytlounf5383a42015-10-06 16:28:32 +020018------------
19
20Basic 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
azvyagintsev967af132017-06-12 12:25:24 +030034Linux with system users, some with password set:
35.. WARNING::
36If no 'password' variable has been passed - any predifined password
37will be removed.
Filip Pytlounf5383a42015-10-06 16:28:32 +020038
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
azvyagintsev967af132017-06-12 12:25:24 +030056 full_name: 'With clear password'
Filip Pytlounf5383a42015-10-06 16:28:32 +020057 home: '/home/jsmith'
azvyagintsev967af132017-06-12 12:25:24 +030058 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 Pytlounf5383a42015-10-06 16:28:32 +020072
Petr Michalec1c4c8d82017-02-28 19:09:21 +010073Configure sudo for users and groups under ``/etc/sudoers.d/``.
74This ways ``linux.system.sudo`` pillar map to actual sudo attributes:
75
76.. code-block:: jinja
Aleš Komárek63572992017-04-11 13:16:44 +020077
Petr Michalec1c4c8d82017-02-28 19:09:21 +010078 # 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 Michalec1c4c8d82017-02-28 19:09:21 +010086.. code-block:: yaml
Aleš Komárek63572992017-04-11 13:16:44 +020087
Petr Michalec1c4c8d82017-02-28 19:09:21 +010088 linux:
89 system:
90 sudo:
91 enabled: true
Tomas Kammd8eb3002017-05-08 19:30:29 +020092 aliases:
Petr Michalec1c4c8d82017-02-28 19:09:21 +010093 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 Josef7a9d9b92017-05-16 11:39:01 +0200176 setenv: true # Enable sudo -E option
Petr Michalec1c4c8d82017-02-28 19:09:21 +0100177 runas:
178 - DBA
179 commands:
180 - ALL
181 - '!SUPPORT_SHELLS'
182 - '!SUPPORT_RESTRICTED'
183
Filip Pytlounf5383a42015-10-06 16:28:32 +0200184Linux with package, latest version
185
186.. code-block:: yaml
187
188 linux:
189 system:
190 ...
191 package:
192 package-name:
193 version: latest
194
195Linux 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
208Linux 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 Binet69a9d8d2017-02-16 22:34:32 +0100221Linux 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 Pytlounf5383a42015-10-06 16:28:32 +0200236Linux with cron jobs
Filip Pytloun91222222017-08-04 10:55:27 +0200237By default it will use name as an identifier, unless identifier key is
238explicitly set or False (then it will use Salt's default behavior which is
239identifier same as command resulting in not being able to change it)
Filip Pytlounf5383a42015-10-06 16:28:32 +0200240
241.. code-block:: yaml
242
243 linux:
244 system:
245 ...
246 job:
247 cmd1:
248 command: '/cmd/to/run'
Filip Pytloun91222222017-08-04 10:55:27 +0200249 identifier: cmd1
Filip Pytlounf5383a42015-10-06 16:28:32 +0200250 enabled: true
251 user: 'root'
252 hour: 2
253 minute: 0
254
Filip Pytlound0a29e72015-11-30 15:23:34 +0100255Linux 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 Pytloun7fee0542015-10-15 11:19:24 +0200271Enable 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 Pytloun281d0202016-01-29 14:03:51 +0100280 # Enable serial console
281 ttyS0:
282 autologin: root
283 rate: 115200
284 term: xterm
Filip Pytloun7fee0542015-10-15 11:19:24 +0200285
286To disable set autologin to `false`.
287
Filip Pytloun7731b852016-02-01 11:13:47 +0100288Set ``policy-rc.d`` on Debian-based systems. Action can be any available
289command in ``while true`` loop and ``case`` context.
290Following 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 Pytlounc49445a2016-04-04 14:23:20 +0200302Set system locales:
303
304.. code-block:: yaml
305
306 linux:
307 system:
308 locale:
309 en_US.UTF-8:
310 default: true
Filip Pytlounee1745f2016-04-04 17:39:41 +0200311 "cs_CZ.UTF-8 UTF-8":
Filip Pytlounc49445a2016-04-04 14:23:20 +0200312 enabled: true
313
Andrey Shestakove7cca052017-05-24 23:06:24 +0300314Systemd 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 Pytloun281034a2016-01-04 18:06:22 +0100331Kernel
332~~~~~~
333
334Install always up to date LTS kernel and headers from Ubuntu trusty:
335
336.. code-block:: yaml
337
338 linux:
339 system:
340 kernel:
341 type: generic
342 lts: trusty
343 headers: true
344
Tomáš Kukrálba35b212017-02-15 17:59:46 +0100345Load kernel modules and add them to `/etc/modules`:
346
347.. code-block:: yaml
348
349 linux:
350 system:
351 kernel:
352 modules:
353 - nf_conntrack
354 - tp_smapi
355 - 8021q
356
teoyaomiqui32b1f7c2017-05-24 14:36:09 +0300357Configure or blacklist kernel modules with additional options to `/etc/modprobe.d` following example
358will add `/etc/modprobe.d/nf_conntrack.conf` file with line `options nf_conntrack hashsize=262144`:
359
360.. code-block:: yaml
361
362 linux:
363 system:
364 kernel:
365 module:
366 nf_conntrack:
367 option:
368 hashsize: 262144
369
370
371
Filip Pytloun281034a2016-01-04 18:06:22 +0100372Install specific kernel version and ensure all other kernel packages are
373not present. Also install extra modules and headers for this kernel:
374
375.. code-block:: yaml
376
377 linux:
378 system:
379 kernel:
380 type: generic
381 extra: true
382 headers: true
383 version: 4.2.0-22
384
Jakub Pavlik32c2cb02016-01-29 12:45:29 +0100385Systcl kernel parameters
386
387.. code-block:: yaml
388
389 linux:
390 system:
391 kernel:
392 sysctl:
393 net.ipv4.tcp_keepalive_intvl: 3
394 net.ipv4.tcp_keepalive_time: 30
395 net.ipv4.tcp_keepalive_probes: 8
396
Jiri Broulikf8f55a22017-01-26 14:36:46 +0100397
398CPU
399~~~
400
teoyaomiqui32b1f7c2017-05-24 14:36:09 +0300401Enable cpufreq governor for every cpu:
Jiri Broulikf8f55a22017-01-26 14:36:46 +0100402
403.. code-block:: yaml
404
405 linux:
406 system:
407 cpu:
408 governor: performance
409
Filip Pytloun2fde88b2017-10-05 10:30:29 +0200410Certificates
411~~~~~~~~~~~~
412
413Add certificate authority into system trusted CA bundle
414
415.. code-block:: yaml
416
417 linux:
418 system:
419 ca_certificates:
420 mycert: |
421 -----BEGIN CERTIFICATE-----
422 MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
423 A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
424 cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
425 MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
426 BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
427 YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
428 ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
429 BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
430 I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
431 CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
432 lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
433 AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
434 -----END CERTIFICATE-----
435
Filip Pytloun361096c2017-08-23 10:57:20 +0200436Sysfs
437~~~~~
438
439Install sysfsutils and set sysfs attributes:
440
441.. code-block:: yaml
442
443 linux:
444 system:
445 sysfs:
446 scheduler:
447 block/sda/queue/scheduler: deadline
448 power:
449 mode:
450 power/state: 0660
451 owner:
452 power/state: "root:power"
453 devices/system/cpu/cpu0/cpufreq/scaling_governor: powersave
454
Jakub Pavlikb148c8c2017-02-12 21:30:48 +0100455Huge Pages
456~~~~~~~~~~~~
457
458Huge Pages give a performance boost to applications that intensively deal
459with memory allocation/deallocation by decreasing memory fragmentation.
460
461.. code-block:: yaml
462
463 linux:
464 system:
465 kernel:
466 hugepages:
467 small:
468 size: 2M
469 count: 107520
470 mount_point: /mnt/hugepages_2MB
471 mount: false/true # default false
472 large:
473 default: true # default automatically mounted
474 size: 1G
475 count: 210
476 mount_point: /mnt/hugepages_1GB
477
478Note: not recommended to use both pagesizes in concurrently.
Jiri Broulikf8f55a22017-01-26 14:36:46 +0100479
Jakub Pavlik5398d872017-02-13 22:30:47 +0100480Intel SR-IOV
481~~~~~~~~~~~~
482
483PCI-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.
484
485.. code-block:: yaml
486
487 linux:
488 system:
489 kernel:
490 sriov: True
491 unsafe_interrupts: False # Default is false. for older platforms and AMD we need to add interrupt remapping workaround
492 rc:
493 local: |
494 #!/bin/sh -e
495 # Enable 7 VF on eth1
496 echo 7 > /sys/class/net/eth1/device/sriov_numvfs; sleep 2; ifup -a
497 exit 0
498
Jakub Pavlik6c9ead12017-02-16 21:53:13 +0100499Isolate CPU options
500~~~~~~~~~~~~~~~~~~~
501
502Remove the specified CPUs, as defined by the cpu_number values, from the general kernel
503SMP balancing and scheduler algroithms. The only way to move a process onto or off an
504"isolated" CPU is via the CPU affinity syscalls. cpu_number begins at 0, so the
505maximum value is 1 less than the number of CPUs on the system.
506
507.. code-block:: yaml
508
509 linux:
510 system:
511 kernel:
512 isolcpu: 1,2,3,4,5,6,7 # isolate first cpu 0
Jiri Broulikf8f55a22017-01-26 14:36:46 +0100513
Filip Pytlounf5383a42015-10-06 16:28:32 +0200514Repositories
515~~~~~~~~~~~~
516
517RedHat based Linux with additional OpenStack repo
518
519.. code-block:: yaml
520
521 linux:
522 system:
523 ...
524 repo:
525 rdo-icehouse:
526 enabled: true
527 source: 'http://repos.fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/'
528 pgpcheck: 0
529
530Ensure system repository to use czech Debian mirror (``default: true``)
531Also pin it's packages with priority 900.
532
533.. code-block:: yaml
534
535 linux:
536 system:
537 repo:
538 debian:
539 default: true
540 source: "deb http://ftp.cz.debian.org/debian/ jessie main contrib non-free"
541 # Import signing key from URL if needed
542 key_url: "http://dummy.com/public.gpg"
543 pin:
544 - pin: 'origin "ftp.cz.debian.org"'
545 priority: 900
546 package: '*'
547
Petr Michalec10462bb2017-03-23 19:18:08 +0100548
549Package manager proxy setup globally:
550
551.. code-block:: yaml
552
553 linux:
554 system:
555 ...
556 repo:
557 apt-mk:
558 source: "deb http://apt-mk.mirantis.com/ stable main salt"
559 ...
560 proxy:
561 pkg:
562 enabled: true
563 ftp: ftp://ftp-proxy-for-apt.host.local:2121
564 ...
565 # NOTE: Global defaults for any other componet that configure proxy on the system.
566 # If your environment has just one simple proxy, set it on linux:system:proxy.
567 #
568 # fall back system defaults if linux:system:proxy:pkg has no protocol specific entries
569 # as for https and http
570 ftp: ftp://proxy.host.local:2121
571 http: http://proxy.host.local:3142
572 https: https://proxy.host.local:3143
573
574Package manager proxy setup per repository:
575
576.. code-block:: yaml
577
578 linux:
579 system:
580 ...
581 repo:
582 debian:
583 source: "deb http://apt-mk.mirantis.com/ stable main salt"
584 ...
585 apt-mk:
586 source: "deb http://apt-mk.mirantis.com/ stable main salt"
587 # per repository proxy
588 proxy:
589 enabled: true
590 http: http://maas-01:8080
591 https: http://maas-01:8080
592 ...
593 proxy:
Oleksandr Vlasov27a6c3a2017-04-11 16:01:19 -0600594 # package manager fallback defaults
Petr Michalec10462bb2017-03-23 19:18:08 +0100595 # used if linux:system:repo:apt-mk:proxy has no protocol specific entries
596 pkg:
597 enabled: true
598 ftp: ftp://proxy.host.local:2121
599 #http: http://proxy.host.local:3142
600 #https: https://proxy.host.local:3143
Oleksandr Vlasov27a6c3a2017-04-11 16:01:19 -0600601 ...
Petr Michalec10462bb2017-03-23 19:18:08 +0100602 # global system fallback system defaults
603 ftp: ftp://proxy.host.local:2121
604 http: http://proxy.host.local:3142
605 https: https://proxy.host.local:3143
606
607
Jiri Broulik34a29b42017-04-25 14:42:54 +0200608Remove all repositories:
609
610.. code-block:: yaml
611
612 linux:
613 system:
614 purge_repos: true
615
616
Petr Michalec10462bb2017-03-23 19:18:08 +0100617RC
618~~
619
Jakub Pavlik78859382016-01-21 11:26:39 +0100620rc.local example
621
622.. code-block:: yaml
623
624 linux:
625 system:
626 rc:
627 local: |
628 #!/bin/sh -e
629 #
630 # rc.local
631 #
632 # This script is executed at the end of each multiuser runlevel.
633 # Make sure that the script will "exit 0" on success or any other
634 # value on error.
635 #
636 # In order to enable or disable this script just change the execution
637 # bits.
638 #
639 # By default this script does nothing.
640 exit 0
641
Petr Michalec10462bb2017-03-23 19:18:08 +0100642
Filip Pytloun1f40dac2016-01-22 15:52:57 +0100643Prompt
644~~~~~~
645
646Setting prompt is implemented by creating ``/etc/profile.d/prompt.sh``. Every
647user can have different prompt.
648
649.. code-block:: yaml
650
651 linux:
652 system:
653 prompt:
654 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\\]
655 default: \\n\\D{%y/%m/%d %H:%M:%S} $(hostname -f)\\n[\\u@\\h:\\w]
656
657On Debian systems to set prompt system-wide it's necessary to remove setting
658PS1 in ``/etc/bash.bashrc`` and ``~/.bashrc`` (which comes from
659``/etc/skel/.bashrc``). This formula will do this automatically, but will not
Filip Pytlound9b68da2016-01-22 15:58:41 +0100660touch existing user's ``~/.bashrc`` files except root.
Jakub Pavlik78859382016-01-21 11:26:39 +0100661
Filip Pytlouneef11c12016-03-25 11:00:23 +0100662Bash
663~~~~
664
665Fix bash configuration to preserve history across sessions (like ZSH does by
666default).
667
668.. code-block:: yaml
669
670 linux:
671 system:
672 bash:
673 preserve_history: true
674
Filip Pytloune874dfb2016-01-22 16:57:34 +0100675Message of the day
676~~~~~~~~~~~~~~~~~~
677
678``pam_motd`` from package ``update-motd`` is used for dynamic messages of the
679day. Setting custom motd will cleanup existing ones.
680
681.. code-block:: yaml
682
683 linux:
684 system:
685 motd:
686 - release: |
687 #!/bin/sh
688 [ -r /etc/lsb-release ] && . /etc/lsb-release
689
690 if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then
691 # Fall back to using the very slow lsb_release utility
692 DISTRIB_DESCRIPTION=$(lsb_release -s -d)
693 fi
694
695 printf "Welcome to %s (%s %s %s)\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" "$(uname -r)" "$(uname -m)"
696 - warning: |
697 #!/bin/sh
698 printf "This is [company name] network.\n"
699 printf "Unauthorized access strictly prohibited.\n"
700
Marek Celoud713e9072017-05-18 15:20:25 +0200701Services
702~~~~~~~~
703
704Stop and disable linux service:
705
706.. code-block:: yaml
707
708 linux:
709 system:
710 service:
711 apt-daily.timer:
712 status: dead
713
714Possible status is dead (disable service by default), running (enable service by default), enabled, disabled.
715
Serhiy Ovsianikov67bd56a2017-08-11 15:56:01 +0300716Linux with atop service:
717
718.. code-block:: yaml
719
720 linux:
721 system:
722 atop:
723 enabled: true
724 interval: 20
725 logpath: "/var/log/atop"
726 outfile: "/var/log/atop/daily.log"
727
Filip Pytloun2f70b492016-02-19 15:55:25 +0100728RHEL / CentOS
Filip Pytloun8296bb92016-02-19 18:42:09 +0100729^^^^^^^^^^^^^
Filip Pytloun2f70b492016-02-19 15:55:25 +0100730
731Unfortunately ``update-motd`` is currently not available for RHEL so there's
732no native support for dynamic motd.
733You can still set static one, only pillar structure differs:
734
735.. code-block:: yaml
736
737 linux:
738 system:
739 motd: |
740 This is [company name] network.
741 Unauthorized access strictly prohibited.
742
Filip Pytloun8296bb92016-02-19 18:42:09 +0100743Haveged
744~~~~~~~
745
746If you are running headless server and are low on entropy, it may be a good
747idea to setup Haveged.
748
749.. code-block:: yaml
750
751 linux:
752 system:
753 haveged:
754 enabled: true
755
Filip Pytlounf5383a42015-10-06 16:28:32 +0200756Linux network
757-------------
758
759Linux with network manager
760
761.. code-block:: yaml
762
763 linux:
764 network:
765 enabled: true
766 network_manager: true
767
768Linux with default static network interfaces, default gateway interface and DNS servers
769
770.. code-block:: yaml
771
772 linux:
773 network:
774 enabled: true
775 interface:
776 eth0:
777 enabled: true
778 type: eth
779 address: 192.168.0.102
780 netmask: 255.255.255.0
781 gateway: 192.168.0.1
782 name_servers:
783 - 8.8.8.8
784 - 8.8.4.4
785 mtu: 1500
786
jan kaufman6d30adf2016-01-18 17:30:12 +0100787Linux with bonded interfaces and disabled NetworkManager
Filip Pytlounf5383a42015-10-06 16:28:32 +0200788
789.. code-block:: yaml
790
791 linux:
792 network:
793 enabled: true
794 interface:
795 eth0:
796 type: eth
797 ...
798 eth1:
799 type: eth
800 ...
801 bond0:
802 enabled: true
803 type: bond
804 address: 192.168.0.102
805 netmask: 255.255.255.0
806 mtu: 1500
807 use_in:
808 - interface: ${linux:interface:eth0}
809 - interface: ${linux:interface:eth0}
jan kaufman6d30adf2016-01-18 17:30:12 +0100810 network_manager:
811 disable: true
Filip Pytlounf5383a42015-10-06 16:28:32 +0200812
Jan Kaufman6a1ad712015-12-11 14:44:19 +0100813Linux with vlan interface_params
814
815.. code-block:: yaml
816
817 linux:
818 network:
819 enabled: true
820 interface:
821 vlan69:
822 type: vlan
jan kaufmanc0bd76f2015-12-15 16:45:44 +0100823 use_interfaces:
Jan Kaufman6a1ad712015-12-11 14:44:19 +0100824 - interface: ${linux:interface:bond0}
Jan Kaufman6a1ad712015-12-11 14:44:19 +0100825
Filip Pytlounf5383a42015-10-06 16:28:32 +0200826Linux with wireless interface parameters
827
828.. code-block:: yaml
829
830 linux:
831 network:
832 enabled: true
833 gateway: 10.0.0.1
Jan Kaufman6a1ad712015-12-11 14:44:19 +0100834 default_interface: eth0
Filip Pytlounf5383a42015-10-06 16:28:32 +0200835 interface:
836 wlan0:
837 type: eth
838 wireless:
839 essid: example
840 key: example_key
841 security: wpa
842 priority: 1
843
844Linux networks with routes defined
845
846.. code-block:: yaml
847
848 linux:
849 network:
850 enabled: true
851 gateway: 10.0.0.1
Jan Kaufman6a1ad712015-12-11 14:44:19 +0100852 default_interface: eth0
Filip Pytlounf5383a42015-10-06 16:28:32 +0200853 interface:
854 eth0:
855 type: eth
856 route:
857 default:
858 address: 192.168.0.123
859 netmask: 255.255.255.0
860 gateway: 192.168.0.1
861
862Native Linux Bridges
863
864.. code-block:: yaml
865
866 linux:
867 network:
868 interface:
869 eth1:
870 enabled: true
871 type: eth
872 proto: manual
873 up_cmds:
874 - ip address add 0/0 dev $IFACE
875 - ip link set $IFACE up
876 down_cmds:
877 - ip link set $IFACE down
878 br-ex:
879 enabled: true
880 type: bridge
881 address: ${linux:network:host:public_local:address}
882 netmask: 255.255.255.0
883 use_interfaces:
884 - eth1
885
886OpenVswitch Bridges
887
888.. code-block:: yaml
889
890 linux:
891 network:
892 bridge: openvswitch
893 interface:
894 eth1:
895 enabled: true
896 type: eth
897 proto: manual
898 up_cmds:
899 - ip address add 0/0 dev $IFACE
900 - ip link set $IFACE up
901 down_cmds:
902 - ip link set $IFACE down
903 br-ex:
904 enabled: true
905 type: bridge
906 address: ${linux:network:host:public_local:address}
907 netmask: 255.255.255.0
908 use_interfaces:
909 - eth1
910
Petr Jediný8f8ae542017-07-13 16:19:12 +0200911Debian manual proto interfaces
912
913When you are changing interface proto from static in up state to manual, you
914may need to flush ip addresses. For example, if you want to use the interface
915and the ip on the bridge. This can be done by setting the ``ipflush_onchange``
916to true.
917
918.. code-block:: yaml
919
920 linux:
921 network:
922 interface:
923 eth1:
924 enabled: true
925 type: eth
926 proto: manual
927 mtu: 9100
928 ipflush_onchange: true
929
930
Petr Jedinýd577cb52017-06-28 20:17:49 +0200931Concatinating and removing interface files
932
933Debian based distributions have `/etc/network/interfaces.d/` directory, where
934you can store configuration of network interfaces in separate files. You can
935concatinate the files to the defined destination when needed, this operation
936removes the file from the `/etc/network/interfaces.d/`. If you just need to
937remove iface files, you can use the `remove_iface_files` key.
938
939.. code-block:: yaml
940
941 linux:
942 network:
943 concat_iface_files:
944 - src: '/etc/network/interfaces.d/50-cloud-init.cfg'
945 dst: '/etc/network/interfaces'
946 remove_iface_files:
947 - '/etc/network/interfaces.d/90-custom.cfg'
948
949
Oleksandr Vlasov27a6c3a2017-04-11 16:01:19 -0600950DHCP client configuration
951
952None of the keys is mandatory, include only those you really need. For full list
953of available options under send, supersede, prepend, append refer to dhcp-options(5)
954
955.. code-block:: yaml
956
957 linux:
958 network:
959 dhclient:
960 enabled: true
961 backoff_cutoff: 15
962 initial_interval: 10
963 reboot: 10
964 retry: 60
965 select_timeout: 0
966 timeout: 120
967 send:
968 - option: host-name
969 declaration: "= gethostname()"
970 supersede:
971 - option: host-name
972 declaration: "spaceship"
973 - option: domain-name
974 declaration: "domain.home"
975 #- option: arp-cache-timeout
976 # declaration: 20
977 prepend:
978 - option: domain-name-servers
979 declaration:
980 - 8.8.8.8
981 - 8.8.4.4
982 - option: domain-search
983 declaration:
984 - example.com
985 - eng.example.com
986 #append:
987 #- option: domain-name-servers
988 # declaration: 127.0.0.1
989 # ip or subnet to reject dhcp offer from
990 reject:
991 - 192.33.137.209
992 - 10.0.2.0/24
993 request:
994 - subnet-mask
995 - broadcast-address
996 - time-offset
997 - routers
998 - domain-name
999 - domain-name-servers
1000 - domain-search
1001 - host-name
1002 - dhcp6.name-servers
1003 - dhcp6.domain-search
1004 - dhcp6.fqdn
1005 - dhcp6.sntp-servers
1006 - netbios-name-servers
1007 - netbios-scope
1008 - interface-mtu
1009 - rfc3442-classless-static-routes
1010 - ntp-servers
1011 require:
1012 - subnet-mask
1013 - domain-name-servers
1014 # if per interface configuration required add below
1015 interface:
1016 ens2:
1017 initial_interval: 11
1018 reject:
1019 - 192.33.137.210
1020 ens3:
1021 initial_interval: 12
1022 reject:
1023 - 192.33.137.211
1024
Petr Michaleceb14b552017-06-01 10:27:05 +02001025Linux network systemd settings:
1026
1027.. code-block:: yaml
1028
1029 linux:
1030 network:
1031 ...
1032 systemd:
1033 link:
1034 10-iface-dmz:
1035 Match:
1036 MACAddress: c8:5b:67:fa:1a:af
1037 OriginalName: eth0
1038 Link:
1039 Name: dmz0
1040 netdev:
1041 20-bridge-dmz:
1042 match:
1043 name: dmz0
1044 network:
1045 mescription: bridge
1046 bridge: br-dmz0
1047 network:
1048 # works with lowercase, keys are by default capitalized
1049 40-dhcp:
1050 match:
1051 name: '*'
1052 network:
1053 DHCP: yes
1054
Oleksandr Vlasov27a6c3a2017-04-11 16:01:19 -06001055
Petr Michalec10462bb2017-03-23 19:18:08 +01001056Configure global environment variables
Petr Michalec10462bb2017-03-23 19:18:08 +01001057
Ales Komarek417e8c52017-08-25 15:10:29 +02001058Use ``/etc/environment`` for static system wide variable assignment after
1059boot. Variable expansion is frequently not supported.
Filip Pytlounf5383a42015-10-06 16:28:32 +02001060
1061.. code-block:: yaml
1062
1063 linux:
Petr Michalec10462bb2017-03-23 19:18:08 +01001064 system:
1065 env:
1066 BOB_VARIABLE: Alice
1067 ...
1068 BOB_PATH:
1069 - /srv/alice/bin
1070 - /srv/bob/bin
1071 ...
1072 ftp_proxy: none
1073 http_proxy: http://global-http-proxy.host.local:8080
1074 https_proxy: ${linux:system:proxy:https}
1075 no_proxy:
1076 - 192.168.0.80
1077 - 192.168.1.80
1078 - .domain.com
1079 - .local
Filip Pytlounf5383a42015-10-06 16:28:32 +02001080 ...
Petr Michalec10462bb2017-03-23 19:18:08 +01001081 # NOTE: global defaults proxy configuration.
Filip Pytlounf5383a42015-10-06 16:28:32 +02001082 proxy:
Petr Michalec10462bb2017-03-23 19:18:08 +01001083 ftp: ftp://proxy.host.local:2121
1084 http: http://proxy.host.local:3142
1085 https: https://proxy.host.local:3143
1086 noproxy:
1087 - .domain.com
1088 - .local
1089
1090Configure profile.d scripts
Petr Michalec10462bb2017-03-23 19:18:08 +01001091
Ales Komarek417e8c52017-08-25 15:10:29 +02001092The profile.d scripts are being sourced during .sh execution and support
1093variable expansion in opposite to /etc/environment global settings in
1094``/etc/environment``.
Petr Michalec10462bb2017-03-23 19:18:08 +01001095
1096.. code-block:: yaml
1097
1098 linux:
1099 system:
1100 profile:
1101 locales: |
1102 export LANG=C
1103 export LC_ALL=C
1104 ...
1105 vi_flavors.sh: |
1106 export PAGER=view
1107 export EDITOR=vim
1108 alias vi=vim
1109 shell_locales.sh: |
1110 export LANG=en_US
1111 export LC_ALL=en_US.UTF-8
1112 shell_proxies.sh: |
1113 export FTP_PROXY=ftp://127.0.3.3:2121
1114 export NO_PROXY='.local'
Filip Pytlounf5383a42015-10-06 16:28:32 +02001115
1116Linux with hosts
1117
Filip Pytloun86506fe2017-01-26 14:36:16 +01001118Parameter purge_hosts will enforce whole /etc/hosts file, removing entries
1119that are not defined in model except defaults for both IPv4 and IPv6 localhost
1120and hostname + fqdn.
Ales Komarek417e8c52017-08-25 15:10:29 +02001121
Filip Pytloun86506fe2017-01-26 14:36:16 +01001122It's good to use this option if you want to ensure /etc/hosts is always in a
1123clean state however it's not enabled by default for safety.
1124
Filip Pytlounf5383a42015-10-06 16:28:32 +02001125.. code-block:: yaml
1126
1127 linux:
1128 network:
Filip Pytloun86506fe2017-01-26 14:36:16 +01001129 purge_hosts: true
Filip Pytlounf5383a42015-10-06 16:28:32 +02001130 host:
Filip Pytloun86506fe2017-01-26 14:36:16 +01001131 # No need to define this one if purge_hosts is true
1132 hostname:
1133 address: 127.0.1.1
1134 names:
1135 - ${linux:network:fqdn}
1136 - ${linux:network:hostname}
Filip Pytlounf5383a42015-10-06 16:28:32 +02001137 node1:
1138 address: 192.168.10.200
1139 names:
1140 - node2.domain.com
1141 - service2.domain.com
1142 node2:
1143 address: 192.168.10.201
1144 names:
1145 - node2.domain.com
1146 - service2.domain.com
1147
Ales Komarek417e8c52017-08-25 15:10:29 +02001148Linux with hosts collected from mine
1149
1150In this case all dns records defined within infrastrucuture will be passed to
1151local hosts records or any DNS server. Only hosts with `grain` parameter to
1152true will be propagated to the mine.
1153
1154.. code-block:: yaml
1155
1156 linux:
1157 network:
1158 purge_hosts: true
1159 mine_dns_records: true
1160 host:
1161 node1:
1162 address: 192.168.10.200
1163 grain: true
1164 names:
1165 - node2.domain.com
1166 - service2.domain.com
Filip Pytloun86506fe2017-01-26 14:36:16 +01001167
Filip Pytlounde9bea52016-01-11 15:39:10 +01001168Setup resolv.conf, nameservers, domain and search domains
1169
1170.. code-block:: yaml
1171
1172 linux:
1173 network:
1174 resolv:
1175 dns:
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001176 - 8.8.4.4
1177 - 8.8.8.8
Filip Pytlounde9bea52016-01-11 15:39:10 +01001178 domain: my.example.com
1179 search:
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001180 - my.example.com
1181 - example.com
Marek Celoudf6cd1922016-12-05 13:39:49 +01001182 options:
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001183 - ndots: 5
1184 - timeout: 2
1185 - attempts: 2
Filip Pytlounde9bea52016-01-11 15:39:10 +01001186
Ales Komarek417e8c52017-08-25 15:10:29 +02001187setting custom TX queue length for tap interfaces
Andrii Petrenko735761d2017-03-21 17:17:35 -07001188
1189.. code-block:: yaml
1190
1191 linux:
1192 network:
1193 tap_custom_txqueuelen: 10000
1194
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001195DPDK OVS interfaces
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001196
1197**DPDK OVS NIC**
1198
1199.. code-block:: yaml
1200
1201 linux:
1202 network:
1203 bridge: openvswitch
1204 dpdk:
1205 enabled: true
Oleg Bondarev9a466792017-05-25 15:55:42 +04001206 driver: uio/vfio
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001207 openvswitch:
1208 pmd_cpu_mask: "0x6"
1209 dpdk_socket_mem: "1024,1024"
1210 dpdk_lcore_mask: "0x400"
1211 memory_channels: 2
1212 interface:
1213 dpkd0:
1214 name: ${_param:dpdk_nic}
1215 pci: 0000:06:00.0
Oleg Bondarev9a466792017-05-25 15:55:42 +04001216 driver: igb_uio/vfio-pci
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001217 enabled: true
1218 type: dpdk_ovs_port
1219 n_rxq: 2
Oleg Bondarev43dbbd32017-05-24 17:06:19 +04001220 pmd_rxq_affinity: "0:1,1:2"
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001221 bridge: br-prv
Jakub Pavlikaa759062017-03-13 15:57:26 +01001222 mtu: 9000
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001223 br-prv:
1224 enabled: true
1225 type: dpdk_ovs_bridge
1226
1227**DPDK OVS Bond**
1228
1229.. code-block:: yaml
1230
1231 linux:
1232 network:
1233 bridge: openvswitch
1234 dpdk:
1235 enabled: true
Oleg Bondarev9a466792017-05-25 15:55:42 +04001236 driver: uio/vfio
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001237 openvswitch:
1238 pmd_cpu_mask: "0x6"
1239 dpdk_socket_mem: "1024,1024"
1240 dpdk_lcore_mask: "0x400"
1241 memory_channels: 2
1242 interface:
1243 dpdk_second_nic:
1244 name: ${_param:primary_second_nic}
1245 pci: 0000:06:00.0
Oleg Bondarev9a466792017-05-25 15:55:42 +04001246 driver: igb_uio/vfio-pci
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001247 bond: dpdkbond0
1248 enabled: true
1249 type: dpdk_ovs_port
1250 n_rxq: 2
Oleg Bondarev43dbbd32017-05-24 17:06:19 +04001251 pmd_rxq_affinity: "0:1,1:2"
Jakub Pavlikaa759062017-03-13 15:57:26 +01001252 mtu: 9000
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001253 dpdk_first_nic:
1254 name: ${_param:primary_first_nic}
1255 pci: 0000:05:00.0
Oleg Bondarev9a466792017-05-25 15:55:42 +04001256 driver: igb_uio/vfio-pci
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001257 bond: dpdkbond0
1258 enabled: true
1259 type: dpdk_ovs_port
1260 n_rxq: 2
Oleg Bondarev43dbbd32017-05-24 17:06:19 +04001261 pmd_rxq_affinity: "0:1,1:2"
Jakub Pavlikaa759062017-03-13 15:57:26 +01001262 mtu: 9000
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001263 dpdkbond0:
1264 enabled: true
1265 bridge: br-prv
1266 type: dpdk_ovs_bond
1267 mode: active-backup
1268 br-prv:
1269 enabled: true
1270 type: dpdk_ovs_bridge
1271
Jakub Pavlikaa759062017-03-13 15:57:26 +01001272**DPDK OVS bridge for VXLAN**
1273
1274If VXLAN is used as tenant segmentation then ip address must be set on br-prv
1275
1276.. code-block:: yaml
1277
1278 linux:
1279 network:
1280 ...
1281 interface:
1282 br-prv:
1283 enabled: true
1284 type: dpdk_ovs_bridge
1285 address: 192.168.50.0
1286 netmask: 255.255.255.0
1287 mtu: 9000
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001288
1289Linux storage
1290-------------
Filip Pytlounf5383a42015-10-06 16:28:32 +02001291
1292Linux with mounted Samba
1293
1294.. code-block:: yaml
1295
1296 linux:
1297 storage:
1298 enabled: true
1299 mount:
1300 samba1:
Simon Pasquier376262a2016-11-16 15:21:51 +01001301 - enabled: true
Filip Pytlounf5383a42015-10-06 16:28:32 +02001302 - path: /media/myuser/public/
1303 - device: //192.168.0.1/storage
1304 - file_system: cifs
1305 - options: guest,uid=myuser,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm
1306
Jiri Broulikb017f932017-03-31 13:55:36 +02001307NFS mount
1308
1309.. code-block:: yaml
1310
1311 linux:
1312 storage:
1313 enabled: true
1314 mount:
1315 nfs_glance:
1316 enabled: true
1317 path: /var/lib/glance/images
1318 device: 172.16.10.110:/var/nfs/glance
1319 file_system: nfs
1320 opts: rw,sync
1321
1322
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001323File swap configuration
Filip Pytlounf5383a42015-10-06 16:28:32 +02001324
1325.. code-block:: yaml
1326
1327 linux:
1328 storage:
1329 enabled: true
1330 swap:
1331 file:
1332 enabled: true
1333 engine: file
1334 device: /swapfile
1335 size: 1024
1336
Jakub Pavlik21ca2152017-02-27 22:21:09 +01001337Partition swap configuration
Lachlan Evenson30676512016-01-22 15:43:28 -08001338
1339.. code-block:: yaml
1340
1341 linux:
1342 storage:
1343 enabled: true
1344 swap:
1345 partition:
1346 enabled: true
1347 engine: partition
1348 device: /dev/vg0/swap
1349
Filip Pytlounc8a001a2015-12-15 14:09:19 +01001350LVM group `vg1` with one device and `data` volume mounted into `/mnt/data`
1351
1352.. code-block:: yaml
1353
1354 parameters:
1355 linux:
1356 storage:
1357 mount:
1358 data:
Simon Pasquier376262a2016-11-16 15:21:51 +01001359 enabled: true
Filip Pytlounc8a001a2015-12-15 14:09:19 +01001360 device: /dev/vg1/data
1361 file_system: ext4
1362 path: /mnt/data
1363 lvm:
1364 vg1:
1365 enabled: true
1366 devices:
1367 - /dev/sdb
1368 volume:
1369 data:
1370 size: 40G
1371 mount: ${linux:storage:mount:data}
1372
Jakub Pavlik4f742142017-08-08 15:05:50 +02001373Create partitions on disk. Specify size in MB. It expects empty
1374disk without any existing partitions.
1375
1376.. code-block:: yaml
1377
1378 linux:
1379 storage:
1380 disk:
1381 first_drive:
1382 name: /dev/loop1
1383 type: gpt
1384 partitions:
1385 - size: 200 #size in MB
1386 type: fat32
1387 - size: 300 #size in MB
Jakub Pavlik8e2140a2017-08-14 23:29:57 +02001388 mkfs: True
1389 type: xfs
Jakub Pavlik4f742142017-08-08 15:05:50 +02001390 /dev/vda1:
1391 partitions:
1392 - size: 5
1393 type: ext2
1394 - size: 10
1395 type: ext4
Ales Komareka634f4b2016-10-02 13:11:04 +02001396
1397Multipath with Fujitsu Eternus DXL
1398
1399.. code-block:: yaml
1400
1401 parameters:
1402 linux:
1403 storage:
1404 multipath:
1405 enabled: true
1406 blacklist_devices:
1407 - /dev/sda
1408 - /dev/sdb
1409 backends:
1410 - fujitsu_eternus_dxl
1411
1412Multipath with Hitachi VSP 1000
1413
1414.. code-block:: yaml
1415
1416 parameters:
1417 linux:
1418 storage:
1419 multipath:
1420 enabled: true
1421 blacklist_devices:
1422 - /dev/sda
1423 - /dev/sdb
1424 backends:
1425 - hitachi_vsp1000
1426
1427Multipath with IBM Storwize
1428
1429.. code-block:: yaml
1430
1431 parameters:
1432 linux:
1433 storage:
1434 multipath:
1435 enabled: true
1436 blacklist_devices:
1437 - /dev/sda
1438 - /dev/sdb
1439 backends:
1440 - ibm_storwize
1441
1442Multipath with multiple backends
1443
1444.. code-block:: yaml
1445
1446 parameters:
1447 linux:
1448 storage:
1449 multipath:
1450 enabled: true
1451 blacklist_devices:
1452 - /dev/sda
1453 - /dev/sdb
1454 - /dev/sdc
1455 - /dev/sdd
1456 backends:
1457 - ibm_storwize
1458 - fujitsu_eternus_dxl
1459 - hitachi_vsp1000
1460
1461Disabled multipath (the default setup)
1462
1463.. code-block:: yaml
1464
1465 parameters:
1466 linux:
1467 storage:
1468 multipath:
1469 enabled: false
1470
Simon Pasquier375001e2017-01-26 13:22:33 +01001471Linux with local loopback device
1472
1473.. code-block:: yaml
1474
1475 linux:
1476 storage:
1477 loopback:
1478 disk1:
1479 file: /srv/disk1
1480 size: 50G
1481
Filip Pytlounb2c8f852016-11-21 17:03:43 +01001482External config generation
1483--------------------------
1484
1485You are able to use config support metadata between formulas and only generate
1486config files for external use, eg. docker, etc.
1487
1488.. code-block:: yaml
1489
1490 parameters:
1491 linux:
1492 system:
1493 config:
1494 pillar:
1495 jenkins:
1496 master:
1497 home: /srv/volumes/jenkins
1498 approved_scripts:
1499 - method java.net.URL openConnection
1500 credentials:
1501 - type: username_password
1502 scope: global
1503 id: test
1504 desc: Testing credentials
1505 username: test
1506 password: test
1507
Vladimir Ereminccf28842017-04-10 23:52:10 +03001508Netconsole Remote Kernel Logging
1509--------------------------------
1510
1511Netconsole logger could be configured for configfs-enabled kernels
1512(`CONFIG_NETCONSOLE_DYNAMIC` should be enabled). Configuration applies both in
1513runtime (if network is already configured), and on-boot after interface
1514initialization. Notes:
1515
1516 * receiver could be located only in same L3 domain
1517 (or you need to configure gateway MAC manually)
1518 * receiver's MAC is detected only on configuration time
1519 * using broadcast MAC is not recommended
1520
1521.. code-block:: yaml
1522
1523 parameters:
1524 linux:
1525 system:
1526 netconsole:
1527 enabled: true
1528 port: 514 (optional)
1529 loglevel: debug (optional)
1530 target:
1531 192.168.0.1:
1532 interface: bond0
1533 mac: "ff:ff:ff:ff:ff:ff" (optional)
Ales Komareka634f4b2016-10-02 13:11:04 +02001534
Filip Pytlounf5383a42015-10-06 16:28:32 +02001535Usage
1536=====
1537
1538Set mtu of network interface eth0 to 1400
1539
1540.. code-block:: bash
1541
1542 ip link set dev eth0 mtu 1400
1543
1544Read more
1545=========
1546
1547* https://www.archlinux.org/
1548* http://askubuntu.com/questions/175172/how-do-i-configure-proxies-in-ubuntu-server-or-minimal-cli-ubuntu
Filip Pytloun018f8712017-02-02 13:02:03 +01001549
1550Documentation and Bugs
1551======================
1552
1553To learn how to install and update salt-formulas, consult the documentation
1554available online at:
1555
1556 http://salt-formulas.readthedocs.io/
1557
1558In the unfortunate event that bugs are discovered, they should be reported to
1559the appropriate issue tracker. Use Github issue tracker for specific salt
1560formula:
1561
1562 https://github.com/salt-formulas/salt-formula-linux/issues
1563
1564For feature requests, bug reports or blueprints affecting entire ecosystem,
1565use Launchpad salt-formulas project:
1566
1567 https://launchpad.net/salt-formulas
1568
1569You can also join salt-formulas-users team and subscribe to mailing list:
1570
1571 https://launchpad.net/~salt-formulas-users
1572
1573Developers wishing to work on the salt-formulas projects should always base
1574their work on master branch and submit pull request against specific formula.
1575
1576 https://github.com/salt-formulas/salt-formula-linux
1577
1578Any questions or feedback is always welcome so feel free to join our IRC
1579channel:
1580
1581 #salt-formulas @ irc.freenode.net