Saltstack Official Linux Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 7 gadiem
pirms 9 gadiem
pirms 7 gadiem
pirms 9 gadiem
pirms 7 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 7 gadiem
pirms 7 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 8 gadiem
pirms 8 gadiem
pirms 8 gadiem
pirms 8 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 7 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686
  1. ============
  2. Linux Fomula
  3. ============
  4. Linux Operating Systems.
  5. * Ubuntu
  6. * CentOS
  7. * RedHat
  8. * Fedora
  9. * Arch
  10. Sample Pillars
  11. ==============
  12. Linux System
  13. ------------
  14. Basic Linux box
  15. .. code-block:: yaml
  16. linux:
  17. system:
  18. enabled: true
  19. name: 'node1'
  20. domain: 'domain.com'
  21. cluster: 'system'
  22. environment: prod
  23. timezone: 'Europe/Prague'
  24. utc: true
  25. Linux with system users, some with password set:
  26. .. WARNING::
  27. If no 'password' variable has been passed - any predifined password
  28. will be removed.
  29. .. code-block:: yaml
  30. linux:
  31. system:
  32. ...
  33. user:
  34. jdoe:
  35. name: 'jdoe'
  36. enabled: true
  37. sudo: true
  38. shell: /bin/bash
  39. full_name: 'Jonh Doe'
  40. home: '/home/jdoe'
  41. email: 'jonh@doe.com'
  42. jsmith:
  43. name: 'jsmith'
  44. enabled: true
  45. full_name: 'With clear password'
  46. home: '/home/jsmith'
  47. hash_password: true
  48. password: "userpassword"
  49. mark:
  50. name: 'mark'
  51. enabled: true
  52. full_name: "unchange password'
  53. home: '/home/mark'
  54. password: false
  55. elizabeth:
  56. name: 'elizabeth'
  57. enabled: true
  58. full_name: 'With hased password'
  59. home: '/home/elizabeth'
  60. password: "$6$nUI7QEz3$dFYjzQqK5cJ6HQ38KqG4gTWA9eJu3aKx6TRVDFh6BVJxJgFWg2akfAA7f1fCxcSUeOJ2arCO6EEI6XXnHXxG10"
  61. Configure sudo for users and groups under ``/etc/sudoers.d/``.
  62. This ways ``linux.system.sudo`` pillar map to actual sudo attributes:
  63. .. code-block:: jinja
  64. # simplified template:
  65. Cmds_Alias {{ alias }}={{ commands }}
  66. {{ user }} {{ hosts }}=({{ runas }}) NOPASSWD: {{ commands }}
  67. %{{ group }} {{ hosts }}=({{ runas }}) NOPASSWD: {{ commands }}
  68. # when rendered:
  69. saltuser1 ALL=(ALL) NOPASSWD: ALL
  70. .. code-block:: yaml
  71. linux:
  72. system:
  73. sudo:
  74. enabled: true
  75. aliases:
  76. host:
  77. LOCAL:
  78. - localhost
  79. PRODUCTION:
  80. - db1
  81. - db2
  82. runas:
  83. DBA:
  84. - postgres
  85. - mysql
  86. SALT:
  87. - root
  88. command:
  89. # Note: This is not 100% safe when ALL keyword is used, user still may modify configs and hide his actions.
  90. # Best practice is to specify full list of commands user is allowed to run.
  91. SUPPORT_RESTRICTED:
  92. - /bin/vi /etc/sudoers*
  93. - /bin/vim /etc/sudoers*
  94. - /bin/nano /etc/sudoers*
  95. - /bin/emacs /etc/sudoers*
  96. - /bin/su - root
  97. - /bin/su -
  98. - /bin/su
  99. - /usr/sbin/visudo
  100. SUPPORT_SHELLS:
  101. - /bin/sh
  102. - /bin/ksh
  103. - /bin/bash
  104. - /bin/rbash
  105. - /bin/dash
  106. - /bin/zsh
  107. - /bin/csh
  108. - /bin/fish
  109. - /bin/tcsh
  110. - /usr/bin/login
  111. - /usr/bin/su
  112. - /usr/su
  113. ALL_SALT_SAFE:
  114. - /usr/bin/salt state*
  115. - /usr/bin/salt service*
  116. - /usr/bin/salt pillar*
  117. - /usr/bin/salt grains*
  118. - /usr/bin/salt saltutil*
  119. - /usr/bin/salt-call state*
  120. - /usr/bin/salt-call service*
  121. - /usr/bin/salt-call pillar*
  122. - /usr/bin/salt-call grains*
  123. - /usr/bin/salt-call saltutil*
  124. SALT_TRUSTED:
  125. - /usr/bin/salt*
  126. users:
  127. # saltuser1 with default values: saltuser1 ALL=(ALL) NOPASSWD: ALL
  128. saltuser1: {}
  129. saltuser2:
  130. hosts:
  131. - LOCAL
  132. # User Alias DBA
  133. DBA:
  134. hosts:
  135. - ALL
  136. commands:
  137. - ALL_SALT_SAFE
  138. groups:
  139. db-ops:
  140. hosts:
  141. - ALL
  142. - '!PRODUCTION'
  143. runas:
  144. - DBA
  145. commands:
  146. - /bin/cat *
  147. - /bin/less *
  148. - /bin/ls *
  149. salt-ops:
  150. hosts:
  151. - 'ALL'
  152. runas:
  153. - SALT
  154. commands:
  155. - SUPPORT_SHELLS
  156. salt-ops-2nd:
  157. name: salt-ops
  158. nopasswd: false
  159. setenv: true # Enable sudo -E option
  160. runas:
  161. - DBA
  162. commands:
  163. - ALL
  164. - '!SUPPORT_SHELLS'
  165. - '!SUPPORT_RESTRICTED'
  166. Linux with package, latest version
  167. .. code-block:: yaml
  168. linux:
  169. system:
  170. ...
  171. package:
  172. package-name:
  173. version: latest
  174. Linux with package from certail repo, version with no upgrades
  175. .. code-block:: yaml
  176. linux:
  177. system:
  178. ...
  179. package:
  180. package-name:
  181. version: 2132.323
  182. repo: 'custom-repo'
  183. hold: true
  184. Linux with package from certail repo, version with no GPG verification
  185. .. code-block:: yaml
  186. linux:
  187. system:
  188. ...
  189. package:
  190. package-name:
  191. version: 2132.323
  192. repo: 'custom-repo'
  193. verify: false
  194. Linux with autoupdates (automatically install security package updates)
  195. .. code-block:: yaml
  196. linux:
  197. system:
  198. ...
  199. autoupdates:
  200. enabled: true
  201. mail: root@localhost
  202. mail_only_on_error: true
  203. remove_unused_dependencies: false
  204. automatic_reboot: true
  205. automatic_reboot_time: "02:00"
  206. Linux with cron jobs
  207. By default it will use name as an identifier, unless identifier key is
  208. explicitly set or False (then it will use Salt's default behavior which is
  209. identifier same as command resulting in not being able to change it)
  210. .. code-block:: yaml
  211. linux:
  212. system:
  213. ...
  214. job:
  215. cmd1:
  216. command: '/cmd/to/run'
  217. identifier: cmd1
  218. enabled: true
  219. user: 'root'
  220. hour: 2
  221. minute: 0
  222. Linux security limits (limit sensu user memory usage to max 1GB):
  223. .. code-block:: yaml
  224. linux:
  225. system:
  226. ...
  227. limit:
  228. sensu:
  229. enabled: true
  230. domain: sensu
  231. limits:
  232. - type: hard
  233. item: as
  234. value: 1000000
  235. Enable autologin on tty1 (may work only for Ubuntu 14.04):
  236. .. code-block:: yaml
  237. linux:
  238. system:
  239. console:
  240. tty1:
  241. autologin: root
  242. # Enable serial console
  243. ttyS0:
  244. autologin: root
  245. rate: 115200
  246. term: xterm
  247. To disable set autologin to `false`.
  248. Set ``policy-rc.d`` on Debian-based systems. Action can be any available
  249. command in ``while true`` loop and ``case`` context.
  250. Following will disallow dpkg to stop/start services for cassandra package automatically:
  251. .. code-block:: yaml
  252. linux:
  253. system:
  254. policyrcd:
  255. - package: cassandra
  256. action: exit 101
  257. - package: '*'
  258. action: switch
  259. Set system locales:
  260. .. code-block:: yaml
  261. linux:
  262. system:
  263. locale:
  264. en_US.UTF-8:
  265. default: true
  266. "cs_CZ.UTF-8 UTF-8":
  267. enabled: true
  268. Systemd settings:
  269. .. code-block:: yaml
  270. linux:
  271. system:
  272. ...
  273. systemd:
  274. system:
  275. Manager:
  276. DefaultLimitNOFILE: 307200
  277. DefaultLimitNPROC: 307200
  278. user:
  279. Manager:
  280. DefaultLimitCPU: 2
  281. DefaultLimitNPROC: 4
  282. Ensure presence of directory:
  283. .. code-block:: yaml
  284. linux:
  285. system:
  286. directory:
  287. /tmp/test:
  288. user: root
  289. group: root
  290. mode: 700
  291. makedirs: true
  292. Kernel
  293. ~~~~~~
  294. Install always up to date LTS kernel and headers from Ubuntu trusty:
  295. .. code-block:: yaml
  296. linux:
  297. system:
  298. kernel:
  299. type: generic
  300. lts: trusty
  301. headers: true
  302. Load kernel modules and add them to `/etc/modules`:
  303. .. code-block:: yaml
  304. linux:
  305. system:
  306. kernel:
  307. modules:
  308. - nf_conntrack
  309. - tp_smapi
  310. - 8021q
  311. Configure or blacklist kernel modules with additional options to `/etc/modprobe.d` following example
  312. will add `/etc/modprobe.d/nf_conntrack.conf` file with line `options nf_conntrack hashsize=262144`:
  313. .. code-block:: yaml
  314. linux:
  315. system:
  316. kernel:
  317. module:
  318. nf_conntrack:
  319. option:
  320. hashsize: 262144
  321. Install specific kernel version and ensure all other kernel packages are
  322. not present. Also install extra modules and headers for this kernel:
  323. .. code-block:: yaml
  324. linux:
  325. system:
  326. kernel:
  327. type: generic
  328. extra: true
  329. headers: true
  330. version: 4.2.0-22
  331. Systcl kernel parameters
  332. .. code-block:: yaml
  333. linux:
  334. system:
  335. kernel:
  336. sysctl:
  337. net.ipv4.tcp_keepalive_intvl: 3
  338. net.ipv4.tcp_keepalive_time: 30
  339. net.ipv4.tcp_keepalive_probes: 8
  340. CPU
  341. ~~~
  342. Enable cpufreq governor for every cpu:
  343. .. code-block:: yaml
  344. linux:
  345. system:
  346. cpu:
  347. governor: performance
  348. Shared Libraries
  349. ~~~~~~~~~~~~~~~~
  350. Set additional shared library to Linux system library path
  351. .. code-block:: yaml
  352. linux:
  353. system:
  354. ld:
  355. library:
  356. java:
  357. - /usr/lib/jvm/jre-openjdk/lib/amd64/server
  358. - /opt/java/jre/lib/amd64/server
  359. Certificates
  360. ~~~~~~~~~~~~
  361. Add certificate authority into system trusted CA bundle
  362. .. code-block:: yaml
  363. linux:
  364. system:
  365. ca_certificates:
  366. mycert: |
  367. -----BEGIN CERTIFICATE-----
  368. MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
  369. A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
  370. cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
  371. MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
  372. BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
  373. YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
  374. ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
  375. BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
  376. I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
  377. CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
  378. lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
  379. AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
  380. -----END CERTIFICATE-----
  381. Sysfs
  382. ~~~~~
  383. Install sysfsutils and set sysfs attributes:
  384. .. code-block:: yaml
  385. linux:
  386. system:
  387. sysfs:
  388. scheduler:
  389. block/sda/queue/scheduler: deadline
  390. power:
  391. mode:
  392. power/state: 0660
  393. owner:
  394. power/state: "root:power"
  395. devices/system/cpu/cpu0/cpufreq/scaling_governor: powersave
  396. Huge Pages
  397. ~~~~~~~~~~~~
  398. Huge Pages give a performance boost to applications that intensively deal
  399. with memory allocation/deallocation by decreasing memory fragmentation.
  400. .. code-block:: yaml
  401. linux:
  402. system:
  403. kernel:
  404. hugepages:
  405. small:
  406. size: 2M
  407. count: 107520
  408. mount_point: /mnt/hugepages_2MB
  409. mount: false/true # default false
  410. large:
  411. default: true # default automatically mounted
  412. size: 1G
  413. count: 210
  414. mount_point: /mnt/hugepages_1GB
  415. Note: not recommended to use both pagesizes in concurrently.
  416. Intel SR-IOV
  417. ~~~~~~~~~~~~
  418. 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.
  419. .. code-block:: yaml
  420. linux:
  421. system:
  422. kernel:
  423. sriov: True
  424. unsafe_interrupts: False # Default is false. for older platforms and AMD we need to add interrupt remapping workaround
  425. rc:
  426. local: |
  427. #!/bin/sh -e
  428. # Enable 7 VF on eth1
  429. echo 7 > /sys/class/net/eth1/device/sriov_numvfs; sleep 2; ifup -a
  430. exit 0
  431. Isolate CPU options
  432. ~~~~~~~~~~~~~~~~~~~
  433. Remove the specified CPUs, as defined by the cpu_number values, from the general kernel
  434. SMP balancing and scheduler algroithms. The only way to move a process onto or off an
  435. "isolated" CPU is via the CPU affinity syscalls. cpu_number begins at 0, so the
  436. maximum value is 1 less than the number of CPUs on the system.
  437. .. code-block:: yaml
  438. linux:
  439. system:
  440. kernel:
  441. isolcpu: 1,2,3,4,5,6,7 # isolate first cpu 0
  442. Repositories
  443. ~~~~~~~~~~~~
  444. RedHat based Linux with additional OpenStack repo
  445. .. code-block:: yaml
  446. linux:
  447. system:
  448. ...
  449. repo:
  450. rdo-icehouse:
  451. enabled: true
  452. source: 'http://repos.fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/'
  453. pgpcheck: 0
  454. Ensure system repository to use czech Debian mirror (``default: true``)
  455. Also pin it's packages with priority 900.
  456. .. code-block:: yaml
  457. linux:
  458. system:
  459. repo:
  460. debian:
  461. default: true
  462. source: "deb http://ftp.cz.debian.org/debian/ jessie main contrib non-free"
  463. # Import signing key from URL if needed
  464. key_url: "http://dummy.com/public.gpg"
  465. pin:
  466. - pin: 'origin "ftp.cz.debian.org"'
  467. priority: 900
  468. package: '*'
  469. Package manager proxy setup globally:
  470. .. code-block:: yaml
  471. linux:
  472. system:
  473. ...
  474. repo:
  475. apt-mk:
  476. source: "deb http://apt-mk.mirantis.com/ stable main salt"
  477. ...
  478. proxy:
  479. pkg:
  480. enabled: true
  481. ftp: ftp://ftp-proxy-for-apt.host.local:2121
  482. ...
  483. # NOTE: Global defaults for any other componet that configure proxy on the system.
  484. # If your environment has just one simple proxy, set it on linux:system:proxy.
  485. #
  486. # fall back system defaults if linux:system:proxy:pkg has no protocol specific entries
  487. # as for https and http
  488. ftp: ftp://proxy.host.local:2121
  489. http: http://proxy.host.local:3142
  490. https: https://proxy.host.local:3143
  491. Package manager proxy setup per repository:
  492. .. code-block:: yaml
  493. linux:
  494. system:
  495. ...
  496. repo:
  497. debian:
  498. source: "deb http://apt-mk.mirantis.com/ stable main salt"
  499. ...
  500. apt-mk:
  501. source: "deb http://apt-mk.mirantis.com/ stable main salt"
  502. # per repository proxy
  503. proxy:
  504. enabled: true
  505. http: http://maas-01:8080
  506. https: http://maas-01:8080
  507. ...
  508. proxy:
  509. # package manager fallback defaults
  510. # used if linux:system:repo:apt-mk:proxy has no protocol specific entries
  511. pkg:
  512. enabled: true
  513. ftp: ftp://proxy.host.local:2121
  514. #http: http://proxy.host.local:3142
  515. #https: https://proxy.host.local:3143
  516. ...
  517. # global system fallback system defaults
  518. ftp: ftp://proxy.host.local:2121
  519. http: http://proxy.host.local:3142
  520. https: https://proxy.host.local:3143
  521. Remove all repositories:
  522. .. code-block:: yaml
  523. linux:
  524. system:
  525. purge_repos: true
  526. Setup custom apt config options:
  527. .. code-block:: yaml
  528. linux:
  529. system:
  530. apt:
  531. config:
  532. compression-workaround:
  533. "Acquire::CompressionTypes::Order": "gz"
  534. docker-clean:
  535. "DPkg::Post-Invoke":
  536. - "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"
  537. "APT::Update::Post-Invoke":
  538. - "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"
  539. RC
  540. ~~
  541. rc.local example
  542. .. code-block:: yaml
  543. linux:
  544. system:
  545. rc:
  546. local: |
  547. #!/bin/sh -e
  548. #
  549. # rc.local
  550. #
  551. # This script is executed at the end of each multiuser runlevel.
  552. # Make sure that the script will "exit 0" on success or any other
  553. # value on error.
  554. #
  555. # In order to enable or disable this script just change the execution
  556. # bits.
  557. #
  558. # By default this script does nothing.
  559. exit 0
  560. Prompt
  561. ~~~~~~
  562. Setting prompt is implemented by creating ``/etc/profile.d/prompt.sh``. Every
  563. user can have different prompt.
  564. .. code-block:: yaml
  565. linux:
  566. system:
  567. prompt:
  568. 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\\]
  569. default: \\n\\D{%y/%m/%d %H:%M:%S} $(hostname -f)\\n[\\u@\\h:\\w]
  570. On Debian systems to set prompt system-wide it's necessary to remove setting
  571. PS1 in ``/etc/bash.bashrc`` and ``~/.bashrc`` (which comes from
  572. ``/etc/skel/.bashrc``). This formula will do this automatically, but will not
  573. touch existing user's ``~/.bashrc`` files except root.
  574. Bash
  575. ~~~~
  576. Fix bash configuration to preserve history across sessions (like ZSH does by
  577. default).
  578. .. code-block:: yaml
  579. linux:
  580. system:
  581. bash:
  582. preserve_history: true
  583. Message of the day
  584. ~~~~~~~~~~~~~~~~~~
  585. ``pam_motd`` from package ``update-motd`` is used for dynamic messages of the
  586. day. Setting custom motd will cleanup existing ones.
  587. .. code-block:: yaml
  588. linux:
  589. system:
  590. motd:
  591. - release: |
  592. #!/bin/sh
  593. [ -r /etc/lsb-release ] && . /etc/lsb-release
  594. if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then
  595. # Fall back to using the very slow lsb_release utility
  596. DISTRIB_DESCRIPTION=$(lsb_release -s -d)
  597. fi
  598. printf "Welcome to %s (%s %s %s)\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" "$(uname -r)" "$(uname -m)"
  599. - warning: |
  600. #!/bin/sh
  601. printf "This is [company name] network.\n"
  602. printf "Unauthorized access strictly prohibited.\n"
  603. Services
  604. ~~~~~~~~
  605. Stop and disable linux service:
  606. .. code-block:: yaml
  607. linux:
  608. system:
  609. service:
  610. apt-daily.timer:
  611. status: dead
  612. Possible status is dead (disable service by default), running (enable service by default), enabled, disabled.
  613. Linux with atop service:
  614. .. code-block:: yaml
  615. linux:
  616. system:
  617. atop:
  618. enabled: true
  619. interval: 20
  620. logpath: "/var/log/atop"
  621. outfile: "/var/log/atop/daily.log"
  622. RHEL / CentOS
  623. ^^^^^^^^^^^^^
  624. Unfortunately ``update-motd`` is currently not available for RHEL so there's
  625. no native support for dynamic motd.
  626. You can still set static one, only pillar structure differs:
  627. .. code-block:: yaml
  628. linux:
  629. system:
  630. motd: |
  631. This is [company name] network.
  632. Unauthorized access strictly prohibited.
  633. Haveged
  634. ~~~~~~~
  635. If you are running headless server and are low on entropy, it may be a good
  636. idea to setup Haveged.
  637. .. code-block:: yaml
  638. linux:
  639. system:
  640. haveged:
  641. enabled: true
  642. Linux network
  643. -------------
  644. Linux with network manager
  645. .. code-block:: yaml
  646. linux:
  647. network:
  648. enabled: true
  649. network_manager: true
  650. Linux with default static network interfaces, default gateway interface and DNS servers
  651. .. code-block:: yaml
  652. linux:
  653. network:
  654. enabled: true
  655. interface:
  656. eth0:
  657. enabled: true
  658. type: eth
  659. address: 192.168.0.102
  660. netmask: 255.255.255.0
  661. gateway: 192.168.0.1
  662. name_servers:
  663. - 8.8.8.8
  664. - 8.8.4.4
  665. mtu: 1500
  666. Linux with bonded interfaces and disabled NetworkManager
  667. .. code-block:: yaml
  668. linux:
  669. network:
  670. enabled: true
  671. interface:
  672. eth0:
  673. type: eth
  674. ...
  675. eth1:
  676. type: eth
  677. ...
  678. bond0:
  679. enabled: true
  680. type: bond
  681. address: 192.168.0.102
  682. netmask: 255.255.255.0
  683. mtu: 1500
  684. use_in:
  685. - interface: ${linux:interface:eth0}
  686. - interface: ${linux:interface:eth0}
  687. network_manager:
  688. disable: true
  689. Linux with vlan interface_params
  690. .. code-block:: yaml
  691. linux:
  692. network:
  693. enabled: true
  694. interface:
  695. vlan69:
  696. type: vlan
  697. use_interfaces:
  698. - interface: ${linux:interface:bond0}
  699. Linux with wireless interface parameters
  700. .. code-block:: yaml
  701. linux:
  702. network:
  703. enabled: true
  704. gateway: 10.0.0.1
  705. default_interface: eth0
  706. interface:
  707. wlan0:
  708. type: eth
  709. wireless:
  710. essid: example
  711. key: example_key
  712. security: wpa
  713. priority: 1
  714. Linux networks with routes defined
  715. .. code-block:: yaml
  716. linux:
  717. network:
  718. enabled: true
  719. gateway: 10.0.0.1
  720. default_interface: eth0
  721. interface:
  722. eth0:
  723. type: eth
  724. route:
  725. default:
  726. address: 192.168.0.123
  727. netmask: 255.255.255.0
  728. gateway: 192.168.0.1
  729. Native Linux Bridges
  730. .. code-block:: yaml
  731. linux:
  732. network:
  733. interface:
  734. eth1:
  735. enabled: true
  736. type: eth
  737. proto: manual
  738. up_cmds:
  739. - ip address add 0/0 dev $IFACE
  740. - ip link set $IFACE up
  741. down_cmds:
  742. - ip link set $IFACE down
  743. br-ex:
  744. enabled: true
  745. type: bridge
  746. address: ${linux:network:host:public_local:address}
  747. netmask: 255.255.255.0
  748. use_interfaces:
  749. - eth1
  750. OpenVswitch Bridges
  751. .. code-block:: yaml
  752. linux:
  753. network:
  754. bridge: openvswitch
  755. interface:
  756. eth1:
  757. enabled: true
  758. type: eth
  759. proto: manual
  760. up_cmds:
  761. - ip address add 0/0 dev $IFACE
  762. - ip link set $IFACE up
  763. down_cmds:
  764. - ip link set $IFACE down
  765. br-ex:
  766. enabled: true
  767. type: bridge
  768. address: ${linux:network:host:public_local:address}
  769. netmask: 255.255.255.0
  770. use_interfaces:
  771. - eth1
  772. br-prv:
  773. enabled: true
  774. type: ovs_bridge
  775. mtu: 65000
  776. br-ens7:
  777. enabled: true
  778. name: br-ens7
  779. type: ovs_bridge
  780. proto: manual
  781. mtu: 9000
  782. use_interfaces:
  783. - ens7
  784. patch-br-ens7-br-prv:
  785. enabled: true
  786. name: ens7-prv
  787. ovs_type: ovs_port
  788. type: ovs_port
  789. bridge: br-ens7
  790. port_type: patch
  791. peer: prv-ens7
  792. mtu: 65000
  793. patch-br-prv-br-ens7:
  794. enabled: true
  795. name: prv-ens7
  796. bridge: br-prv
  797. ovs_type: ovs_port
  798. type: ovs_port
  799. port_type: patch
  800. peer: ens7-prv
  801. mtu: 65000
  802. ens7:
  803. enabled: true
  804. name: ens7
  805. proto: manual
  806. ovs_port_type: OVSPort
  807. type: ovs_port
  808. ovs_bridge: br-ens7
  809. bridge: br-ens7
  810. Debian manual proto interfaces
  811. When you are changing interface proto from static in up state to manual, you
  812. may need to flush ip addresses. For example, if you want to use the interface
  813. and the ip on the bridge. This can be done by setting the ``ipflush_onchange``
  814. to true.
  815. .. code-block:: yaml
  816. linux:
  817. network:
  818. interface:
  819. eth1:
  820. enabled: true
  821. type: eth
  822. proto: manual
  823. mtu: 9100
  824. ipflush_onchange: true
  825. Debian static proto interfaces
  826. When you are changing interface proto from dhcp in up state to static, you
  827. may need to flush ip addresses and restart interface to assign ip address from a managed file.
  828. For example, if you want to use the interface and the ip on the bridge.
  829. This can be done by setting the ``ipflush_onchange`` with combination
  830. ``restart_on_ipflush`` param set to to true.
  831. .. code-block:: yaml
  832. linux:
  833. network:
  834. interface:
  835. eth1:
  836. enabled: true
  837. type: eth
  838. proto: static
  839. address: 10.1.0.22
  840. netmask: 255.255.255.0
  841. ipflush_onchange: true
  842. restart_on_ipflush: true
  843. Concatinating and removing interface files
  844. Debian based distributions have `/etc/network/interfaces.d/` directory, where
  845. you can store configuration of network interfaces in separate files. You can
  846. concatinate the files to the defined destination when needed, this operation
  847. removes the file from the `/etc/network/interfaces.d/`. If you just need to
  848. remove iface files, you can use the `remove_iface_files` key.
  849. .. code-block:: yaml
  850. linux:
  851. network:
  852. concat_iface_files:
  853. - src: '/etc/network/interfaces.d/50-cloud-init.cfg'
  854. dst: '/etc/network/interfaces'
  855. remove_iface_files:
  856. - '/etc/network/interfaces.d/90-custom.cfg'
  857. DHCP client configuration
  858. None of the keys is mandatory, include only those you really need. For full list
  859. of available options under send, supersede, prepend, append refer to dhcp-options(5)
  860. .. code-block:: yaml
  861. linux:
  862. network:
  863. dhclient:
  864. enabled: true
  865. backoff_cutoff: 15
  866. initial_interval: 10
  867. reboot: 10
  868. retry: 60
  869. select_timeout: 0
  870. timeout: 120
  871. send:
  872. - option: host-name
  873. declaration: "= gethostname()"
  874. supersede:
  875. - option: host-name
  876. declaration: "spaceship"
  877. - option: domain-name
  878. declaration: "domain.home"
  879. #- option: arp-cache-timeout
  880. # declaration: 20
  881. prepend:
  882. - option: domain-name-servers
  883. declaration:
  884. - 8.8.8.8
  885. - 8.8.4.4
  886. - option: domain-search
  887. declaration:
  888. - example.com
  889. - eng.example.com
  890. #append:
  891. #- option: domain-name-servers
  892. # declaration: 127.0.0.1
  893. # ip or subnet to reject dhcp offer from
  894. reject:
  895. - 192.33.137.209
  896. - 10.0.2.0/24
  897. request:
  898. - subnet-mask
  899. - broadcast-address
  900. - time-offset
  901. - routers
  902. - domain-name
  903. - domain-name-servers
  904. - domain-search
  905. - host-name
  906. - dhcp6.name-servers
  907. - dhcp6.domain-search
  908. - dhcp6.fqdn
  909. - dhcp6.sntp-servers
  910. - netbios-name-servers
  911. - netbios-scope
  912. - interface-mtu
  913. - rfc3442-classless-static-routes
  914. - ntp-servers
  915. require:
  916. - subnet-mask
  917. - domain-name-servers
  918. # if per interface configuration required add below
  919. interface:
  920. ens2:
  921. initial_interval: 11
  922. reject:
  923. - 192.33.137.210
  924. ens3:
  925. initial_interval: 12
  926. reject:
  927. - 192.33.137.211
  928. Linux network systemd settings:
  929. .. code-block:: yaml
  930. linux:
  931. network:
  932. ...
  933. systemd:
  934. link:
  935. 10-iface-dmz:
  936. Match:
  937. MACAddress: c8:5b:67:fa:1a:af
  938. OriginalName: eth0
  939. Link:
  940. Name: dmz0
  941. netdev:
  942. 20-bridge-dmz:
  943. match:
  944. name: dmz0
  945. network:
  946. mescription: bridge
  947. bridge: br-dmz0
  948. network:
  949. # works with lowercase, keys are by default capitalized
  950. 40-dhcp:
  951. match:
  952. name: '*'
  953. network:
  954. DHCP: yes
  955. Configure global environment variables
  956. Use ``/etc/environment`` for static system wide variable assignment after
  957. boot. Variable expansion is frequently not supported.
  958. .. code-block:: yaml
  959. linux:
  960. system:
  961. env:
  962. BOB_VARIABLE: Alice
  963. ...
  964. BOB_PATH:
  965. - /srv/alice/bin
  966. - /srv/bob/bin
  967. ...
  968. ftp_proxy: none
  969. http_proxy: http://global-http-proxy.host.local:8080
  970. https_proxy: ${linux:system:proxy:https}
  971. no_proxy:
  972. - 192.168.0.80
  973. - 192.168.1.80
  974. - .domain.com
  975. - .local
  976. ...
  977. # NOTE: global defaults proxy configuration.
  978. proxy:
  979. ftp: ftp://proxy.host.local:2121
  980. http: http://proxy.host.local:3142
  981. https: https://proxy.host.local:3143
  982. noproxy:
  983. - .domain.com
  984. - .local
  985. Configure profile.d scripts
  986. The profile.d scripts are being sourced during .sh execution and support
  987. variable expansion in opposite to /etc/environment global settings in
  988. ``/etc/environment``.
  989. .. code-block:: yaml
  990. linux:
  991. system:
  992. profile:
  993. locales: |
  994. export LANG=C
  995. export LC_ALL=C
  996. ...
  997. vi_flavors.sh: |
  998. export PAGER=view
  999. export EDITOR=vim
  1000. alias vi=vim
  1001. shell_locales.sh: |
  1002. export LANG=en_US
  1003. export LC_ALL=en_US.UTF-8
  1004. shell_proxies.sh: |
  1005. export FTP_PROXY=ftp://127.0.3.3:2121
  1006. export NO_PROXY='.local'
  1007. Linux with hosts
  1008. Parameter purge_hosts will enforce whole /etc/hosts file, removing entries
  1009. that are not defined in model except defaults for both IPv4 and IPv6 localhost
  1010. and hostname + fqdn.
  1011. It's good to use this option if you want to ensure /etc/hosts is always in a
  1012. clean state however it's not enabled by default for safety.
  1013. .. code-block:: yaml
  1014. linux:
  1015. network:
  1016. purge_hosts: true
  1017. host:
  1018. # No need to define this one if purge_hosts is true
  1019. hostname:
  1020. address: 127.0.1.1
  1021. names:
  1022. - ${linux:network:fqdn}
  1023. - ${linux:network:hostname}
  1024. node1:
  1025. address: 192.168.10.200
  1026. names:
  1027. - node2.domain.com
  1028. - service2.domain.com
  1029. node2:
  1030. address: 192.168.10.201
  1031. names:
  1032. - node2.domain.com
  1033. - service2.domain.com
  1034. Linux with hosts collected from mine
  1035. In this case all dns records defined within infrastrucuture will be passed to
  1036. local hosts records or any DNS server. Only hosts with `grain` parameter to
  1037. true will be propagated to the mine.
  1038. .. code-block:: yaml
  1039. linux:
  1040. network:
  1041. purge_hosts: true
  1042. mine_dns_records: true
  1043. host:
  1044. node1:
  1045. address: 192.168.10.200
  1046. grain: true
  1047. names:
  1048. - node2.domain.com
  1049. - service2.domain.com
  1050. Setup resolv.conf, nameservers, domain and search domains
  1051. .. code-block:: yaml
  1052. linux:
  1053. network:
  1054. resolv:
  1055. dns:
  1056. - 8.8.4.4
  1057. - 8.8.8.8
  1058. domain: my.example.com
  1059. search:
  1060. - my.example.com
  1061. - example.com
  1062. options:
  1063. - ndots: 5
  1064. - timeout: 2
  1065. - attempts: 2
  1066. setting custom TX queue length for tap interfaces
  1067. .. code-block:: yaml
  1068. linux:
  1069. network:
  1070. tap_custom_txqueuelen: 10000
  1071. DPDK OVS interfaces
  1072. **DPDK OVS NIC**
  1073. .. code-block:: yaml
  1074. linux:
  1075. network:
  1076. bridge: openvswitch
  1077. dpdk:
  1078. enabled: true
  1079. driver: uio/vfio
  1080. openvswitch:
  1081. pmd_cpu_mask: "0x6"
  1082. dpdk_socket_mem: "1024,1024"
  1083. dpdk_lcore_mask: "0x400"
  1084. memory_channels: 2
  1085. interface:
  1086. dpkd0:
  1087. name: ${_param:dpdk_nic}
  1088. pci: 0000:06:00.0
  1089. driver: igb_uio/vfio-pci
  1090. enabled: true
  1091. type: dpdk_ovs_port
  1092. n_rxq: 2
  1093. pmd_rxq_affinity: "0:1,1:2"
  1094. bridge: br-prv
  1095. mtu: 9000
  1096. br-prv:
  1097. enabled: true
  1098. type: dpdk_ovs_bridge
  1099. **DPDK OVS Bond**
  1100. .. code-block:: yaml
  1101. linux:
  1102. network:
  1103. bridge: openvswitch
  1104. dpdk:
  1105. enabled: true
  1106. driver: uio/vfio
  1107. openvswitch:
  1108. pmd_cpu_mask: "0x6"
  1109. dpdk_socket_mem: "1024,1024"
  1110. dpdk_lcore_mask: "0x400"
  1111. memory_channels: 2
  1112. interface:
  1113. dpdk_second_nic:
  1114. name: ${_param:primary_second_nic}
  1115. pci: 0000:06:00.0
  1116. driver: igb_uio/vfio-pci
  1117. bond: dpdkbond0
  1118. enabled: true
  1119. type: dpdk_ovs_port
  1120. n_rxq: 2
  1121. pmd_rxq_affinity: "0:1,1:2"
  1122. mtu: 9000
  1123. dpdk_first_nic:
  1124. name: ${_param:primary_first_nic}
  1125. pci: 0000:05:00.0
  1126. driver: igb_uio/vfio-pci
  1127. bond: dpdkbond0
  1128. enabled: true
  1129. type: dpdk_ovs_port
  1130. n_rxq: 2
  1131. pmd_rxq_affinity: "0:1,1:2"
  1132. mtu: 9000
  1133. dpdkbond0:
  1134. enabled: true
  1135. bridge: br-prv
  1136. type: dpdk_ovs_bond
  1137. mode: active-backup
  1138. br-prv:
  1139. enabled: true
  1140. type: dpdk_ovs_bridge
  1141. **DPDK OVS bridge for VXLAN**
  1142. If VXLAN is used as tenant segmentation then ip address must be set on br-prv
  1143. .. code-block:: yaml
  1144. linux:
  1145. network:
  1146. ...
  1147. interface:
  1148. br-prv:
  1149. enabled: true
  1150. type: dpdk_ovs_bridge
  1151. address: 192.168.50.0
  1152. netmask: 255.255.255.0
  1153. mtu: 9000
  1154. Linux storage
  1155. -------------
  1156. Linux with mounted Samba
  1157. .. code-block:: yaml
  1158. linux:
  1159. storage:
  1160. enabled: true
  1161. mount:
  1162. samba1:
  1163. - enabled: true
  1164. - path: /media/myuser/public/
  1165. - device: //192.168.0.1/storage
  1166. - file_system: cifs
  1167. - options: guest,uid=myuser,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm
  1168. NFS mount
  1169. .. code-block:: yaml
  1170. linux:
  1171. storage:
  1172. enabled: true
  1173. mount:
  1174. nfs_glance:
  1175. enabled: true
  1176. path: /var/lib/glance/images
  1177. device: 172.16.10.110:/var/nfs/glance
  1178. file_system: nfs
  1179. opts: rw,sync
  1180. File swap configuration
  1181. .. code-block:: yaml
  1182. linux:
  1183. storage:
  1184. enabled: true
  1185. swap:
  1186. file:
  1187. enabled: true
  1188. engine: file
  1189. device: /swapfile
  1190. size: 1024
  1191. Partition swap configuration
  1192. .. code-block:: yaml
  1193. linux:
  1194. storage:
  1195. enabled: true
  1196. swap:
  1197. partition:
  1198. enabled: true
  1199. engine: partition
  1200. device: /dev/vg0/swap
  1201. LVM group `vg1` with one device and `data` volume mounted into `/mnt/data`
  1202. .. code-block:: yaml
  1203. parameters:
  1204. linux:
  1205. storage:
  1206. mount:
  1207. data:
  1208. enabled: true
  1209. device: /dev/vg1/data
  1210. file_system: ext4
  1211. path: /mnt/data
  1212. lvm:
  1213. vg1:
  1214. enabled: true
  1215. devices:
  1216. - /dev/sdb
  1217. volume:
  1218. data:
  1219. size: 40G
  1220. mount: ${linux:storage:mount:data}
  1221. Create partitions on disk. Specify size in MB. It expects empty
  1222. disk without any existing partitions. (set startsector=1, if you want to start partitions from 2048)
  1223. .. code-block:: yaml
  1224. linux:
  1225. storage:
  1226. disk:
  1227. first_drive:
  1228. startsector: 1
  1229. name: /dev/loop1
  1230. type: gpt
  1231. partitions:
  1232. - size: 200 #size in MB
  1233. type: fat32
  1234. - size: 300 #size in MB
  1235. mkfs: True
  1236. type: xfs
  1237. /dev/vda1:
  1238. partitions:
  1239. - size: 5
  1240. type: ext2
  1241. - size: 10
  1242. type: ext4
  1243. Multipath with Fujitsu Eternus DXL
  1244. .. code-block:: yaml
  1245. parameters:
  1246. linux:
  1247. storage:
  1248. multipath:
  1249. enabled: true
  1250. blacklist_devices:
  1251. - /dev/sda
  1252. - /dev/sdb
  1253. backends:
  1254. - fujitsu_eternus_dxl
  1255. Multipath with Hitachi VSP 1000
  1256. .. code-block:: yaml
  1257. parameters:
  1258. linux:
  1259. storage:
  1260. multipath:
  1261. enabled: true
  1262. blacklist_devices:
  1263. - /dev/sda
  1264. - /dev/sdb
  1265. backends:
  1266. - hitachi_vsp1000
  1267. Multipath with IBM Storwize
  1268. .. code-block:: yaml
  1269. parameters:
  1270. linux:
  1271. storage:
  1272. multipath:
  1273. enabled: true
  1274. blacklist_devices:
  1275. - /dev/sda
  1276. - /dev/sdb
  1277. backends:
  1278. - ibm_storwize
  1279. Multipath with multiple backends
  1280. .. code-block:: yaml
  1281. parameters:
  1282. linux:
  1283. storage:
  1284. multipath:
  1285. enabled: true
  1286. blacklist_devices:
  1287. - /dev/sda
  1288. - /dev/sdb
  1289. - /dev/sdc
  1290. - /dev/sdd
  1291. backends:
  1292. - ibm_storwize
  1293. - fujitsu_eternus_dxl
  1294. - hitachi_vsp1000
  1295. Disabled multipath (the default setup)
  1296. .. code-block:: yaml
  1297. parameters:
  1298. linux:
  1299. storage:
  1300. multipath:
  1301. enabled: false
  1302. Linux with local loopback device
  1303. .. code-block:: yaml
  1304. linux:
  1305. storage:
  1306. loopback:
  1307. disk1:
  1308. file: /srv/disk1
  1309. size: 50G
  1310. External config generation
  1311. --------------------------
  1312. You are able to use config support metadata between formulas and only generate
  1313. config files for external use, eg. docker, etc.
  1314. .. code-block:: yaml
  1315. parameters:
  1316. linux:
  1317. system:
  1318. config:
  1319. pillar:
  1320. jenkins:
  1321. master:
  1322. home: /srv/volumes/jenkins
  1323. approved_scripts:
  1324. - method java.net.URL openConnection
  1325. credentials:
  1326. - type: username_password
  1327. scope: global
  1328. id: test
  1329. desc: Testing credentials
  1330. username: test
  1331. password: test
  1332. Netconsole Remote Kernel Logging
  1333. --------------------------------
  1334. Netconsole logger could be configured for configfs-enabled kernels
  1335. (`CONFIG_NETCONSOLE_DYNAMIC` should be enabled). Configuration applies both in
  1336. runtime (if network is already configured), and on-boot after interface
  1337. initialization. Notes:
  1338. * receiver could be located only in same L3 domain
  1339. (or you need to configure gateway MAC manually)
  1340. * receiver's MAC is detected only on configuration time
  1341. * using broadcast MAC is not recommended
  1342. .. code-block:: yaml
  1343. parameters:
  1344. linux:
  1345. system:
  1346. netconsole:
  1347. enabled: true
  1348. port: 514 (optional)
  1349. loglevel: debug (optional)
  1350. target:
  1351. 192.168.0.1:
  1352. interface: bond0
  1353. mac: "ff:ff:ff:ff:ff:ff" (optional)
  1354. Usage
  1355. =====
  1356. Set mtu of network interface eth0 to 1400
  1357. .. code-block:: bash
  1358. ip link set dev eth0 mtu 1400
  1359. Read more
  1360. =========
  1361. * https://www.archlinux.org/
  1362. * http://askubuntu.com/questions/175172/how-do-i-configure-proxies-in-ubuntu-server-or-minimal-cli-ubuntu
  1363. Documentation and Bugs
  1364. ======================
  1365. To learn how to install and update salt-formulas, consult the documentation
  1366. available online at:
  1367. http://salt-formulas.readthedocs.io/
  1368. In the unfortunate event that bugs are discovered, they should be reported to
  1369. the appropriate issue tracker. Use Github issue tracker for specific salt
  1370. formula:
  1371. https://github.com/salt-formulas/salt-formula-linux/issues
  1372. For feature requests, bug reports or blueprints affecting entire ecosystem,
  1373. use Launchpad salt-formulas project:
  1374. https://launchpad.net/salt-formulas
  1375. You can also join salt-formulas-users team and subscribe to mailing list:
  1376. https://launchpad.net/~salt-formulas-users
  1377. Developers wishing to work on the salt-formulas projects should always base
  1378. their work on master branch and submit pull request against specific formula.
  1379. https://github.com/salt-formulas/salt-formula-linux
  1380. Any questions or feedback is always welcome so feel free to join our IRC
  1381. channel:
  1382. #salt-formulas @ irc.freenode.net