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 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 7 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
pirms 9 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815
  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. Ensure presence of file by specifying it's source:
  293. .. code-block:: yaml
  294. linux:
  295. system:
  296. file:
  297. /tmp/test.txt:
  298. source: http://example.com/test.txt
  299. user: root #optional
  300. group: root #optional
  301. mode: 700 #optional
  302. dir_mode: 700 #optional
  303. encoding: utf-8 #optional
  304. hash: <<hash>> or <<URI to hash>> #optional
  305. makedirs: true #optional
  306. linux:
  307. system:
  308. file:
  309. test.txt:
  310. name: /tmp/test.txt
  311. source: http://example.com/test.txt
  312. Ensure presence of file by specifying it's contents:
  313. .. code-block:: yaml
  314. linux:
  315. system:
  316. file:
  317. /tmp/test.txt:
  318. contents: |
  319. line1
  320. line2
  321. linux:
  322. system:
  323. file:
  324. /tmp/test.txt:
  325. contents_pillar: linux:network:hostname
  326. linux:
  327. system:
  328. file:
  329. /tmp/test.txt:
  330. contents_grains: motd
  331. Kernel
  332. ~~~~~~
  333. Install always up to date LTS kernel and headers from Ubuntu trusty:
  334. .. code-block:: yaml
  335. linux:
  336. system:
  337. kernel:
  338. type: generic
  339. lts: trusty
  340. headers: true
  341. Load kernel modules and add them to `/etc/modules`:
  342. .. code-block:: yaml
  343. linux:
  344. system:
  345. kernel:
  346. modules:
  347. - nf_conntrack
  348. - tp_smapi
  349. - 8021q
  350. Configure or blacklist kernel modules with additional options to `/etc/modprobe.d` following example
  351. will add `/etc/modprobe.d/nf_conntrack.conf` file with line `options nf_conntrack hashsize=262144`:
  352. .. code-block:: yaml
  353. linux:
  354. system:
  355. kernel:
  356. module:
  357. nf_conntrack:
  358. option:
  359. hashsize: 262144
  360. Install specific kernel version and ensure all other kernel packages are
  361. not present. Also install extra modules and headers for this kernel:
  362. .. code-block:: yaml
  363. linux:
  364. system:
  365. kernel:
  366. type: generic
  367. extra: true
  368. headers: true
  369. version: 4.2.0-22
  370. Systcl kernel parameters
  371. .. code-block:: yaml
  372. linux:
  373. system:
  374. kernel:
  375. sysctl:
  376. net.ipv4.tcp_keepalive_intvl: 3
  377. net.ipv4.tcp_keepalive_time: 30
  378. net.ipv4.tcp_keepalive_probes: 8
  379. Configure kernel boot options:
  380. .. code-block:: yaml
  381. linux:
  382. system:
  383. kernel:
  384. boot_options:
  385. - elevator=deadline
  386. - spectre_v2=off
  387. - nopti
  388. CPU
  389. ~~~
  390. Enable cpufreq governor for every cpu:
  391. .. code-block:: yaml
  392. linux:
  393. system:
  394. cpu:
  395. governor: performance
  396. CGROUPS
  397. ~~~~~~~
  398. Setup linux cgroups:
  399. .. code-block:: yaml
  400. linux:
  401. system:
  402. cgroup:
  403. enabled: true
  404. group:
  405. ceph_group_1:
  406. controller:
  407. cpu:
  408. shares:
  409. value: 250
  410. cpuacct:
  411. usage:
  412. value: 0
  413. cpuset:
  414. cpus:
  415. value: 1,2,3
  416. memory:
  417. limit_in_bytes:
  418. value: 2G
  419. memsw.limit_in_bytes:
  420. value: 3G
  421. mapping:
  422. subjects:
  423. - '@ceph'
  424. generic_group_1:
  425. controller:
  426. cpu:
  427. shares:
  428. value: 250
  429. cpuacct:
  430. usage:
  431. value: 0
  432. mapping:
  433. subjects:
  434. - '*:firefox'
  435. - 'student:cp'
  436. Shared Libraries
  437. ~~~~~~~~~~~~~~~~
  438. Set additional shared library to Linux system library path
  439. .. code-block:: yaml
  440. linux:
  441. system:
  442. ld:
  443. library:
  444. java:
  445. - /usr/lib/jvm/jre-openjdk/lib/amd64/server
  446. - /opt/java/jre/lib/amd64/server
  447. Certificates
  448. ~~~~~~~~~~~~
  449. Add certificate authority into system trusted CA bundle
  450. .. code-block:: yaml
  451. linux:
  452. system:
  453. ca_certificates:
  454. mycert: |
  455. -----BEGIN CERTIFICATE-----
  456. MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkG
  457. A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
  458. cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
  459. MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNV
  460. BAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmlt
  461. YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GN
  462. ADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhE
  463. BarsAx94f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/is
  464. I19wKTakyYbnsZogy1Olhec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0G
  465. CSqGSIb3DQEBAgUAA4GBALtMEivPLCYATxQT3ab7/AoRhIzzKBxnki98tsX63/Do
  466. lbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59AhWM1pF+NEHJwZRDmJXNyc
  467. AA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2OmufTqj/ZA1k
  468. -----END CERTIFICATE-----
  469. Sysfs
  470. ~~~~~
  471. Install sysfsutils and set sysfs attributes:
  472. .. code-block:: yaml
  473. linux:
  474. system:
  475. sysfs:
  476. scheduler:
  477. block/sda/queue/scheduler: deadline
  478. power:
  479. mode:
  480. power/state: 0660
  481. owner:
  482. power/state: "root:power"
  483. devices/system/cpu/cpu0/cpufreq/scaling_governor: powersave
  484. Huge Pages
  485. ~~~~~~~~~~~~
  486. Huge Pages give a performance boost to applications that intensively deal
  487. with memory allocation/deallocation by decreasing memory fragmentation.
  488. .. code-block:: yaml
  489. linux:
  490. system:
  491. kernel:
  492. hugepages:
  493. small:
  494. size: 2M
  495. count: 107520
  496. mount_point: /mnt/hugepages_2MB
  497. mount: false/true # default false
  498. large:
  499. default: true # default automatically mounted
  500. size: 1G
  501. count: 210
  502. mount_point: /mnt/hugepages_1GB
  503. Note: not recommended to use both pagesizes in concurrently.
  504. Intel SR-IOV
  505. ~~~~~~~~~~~~
  506. 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.
  507. .. code-block:: yaml
  508. linux:
  509. system:
  510. kernel:
  511. sriov: True
  512. unsafe_interrupts: False # Default is false. for older platforms and AMD we need to add interrupt remapping workaround
  513. rc:
  514. local: |
  515. #!/bin/sh -e
  516. # Enable 7 VF on eth1
  517. echo 7 > /sys/class/net/eth1/device/sriov_numvfs; sleep 2; ifup -a
  518. exit 0
  519. Isolate CPU options
  520. ~~~~~~~~~~~~~~~~~~~
  521. Remove the specified CPUs, as defined by the cpu_number values, from the general kernel
  522. SMP balancing and scheduler algroithms. The only way to move a process onto or off an
  523. "isolated" CPU is via the CPU affinity syscalls. cpu_number begins at 0, so the
  524. maximum value is 1 less than the number of CPUs on the system.
  525. .. code-block:: yaml
  526. linux:
  527. system:
  528. kernel:
  529. isolcpu: 1,2,3,4,5,6,7 # isolate first cpu 0
  530. Repositories
  531. ~~~~~~~~~~~~
  532. RedHat based Linux with additional OpenStack repo
  533. .. code-block:: yaml
  534. linux:
  535. system:
  536. ...
  537. repo:
  538. rdo-icehouse:
  539. enabled: true
  540. source: 'http://repos.fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/'
  541. pgpcheck: 0
  542. Ensure system repository to use czech Debian mirror (``default: true``)
  543. Also pin it's packages with priority 900.
  544. .. code-block:: yaml
  545. linux:
  546. system:
  547. repo:
  548. debian:
  549. default: true
  550. source: "deb http://ftp.cz.debian.org/debian/ jessie main contrib non-free"
  551. # Import signing key from URL if needed
  552. key_url: "http://dummy.com/public.gpg"
  553. pin:
  554. - pin: 'origin "ftp.cz.debian.org"'
  555. priority: 900
  556. package: '*'
  557. Package manager proxy setup globally:
  558. .. code-block:: yaml
  559. linux:
  560. system:
  561. ...
  562. repo:
  563. apt-mk:
  564. source: "deb http://apt-mk.mirantis.com/ stable main salt"
  565. ...
  566. proxy:
  567. pkg:
  568. enabled: true
  569. ftp: ftp://ftp-proxy-for-apt.host.local:2121
  570. ...
  571. # NOTE: Global defaults for any other componet that configure proxy on the system.
  572. # If your environment has just one simple proxy, set it on linux:system:proxy.
  573. #
  574. # fall back system defaults if linux:system:proxy:pkg has no protocol specific entries
  575. # as for https and http
  576. ftp: ftp://proxy.host.local:2121
  577. http: http://proxy.host.local:3142
  578. https: https://proxy.host.local:3143
  579. Package manager proxy setup per repository:
  580. .. code-block:: yaml
  581. linux:
  582. system:
  583. ...
  584. repo:
  585. debian:
  586. source: "deb http://apt-mk.mirantis.com/ stable main salt"
  587. ...
  588. apt-mk:
  589. source: "deb http://apt-mk.mirantis.com/ stable main salt"
  590. # per repository proxy
  591. proxy:
  592. enabled: true
  593. http: http://maas-01:8080
  594. https: http://maas-01:8080
  595. ...
  596. proxy:
  597. # package manager fallback defaults
  598. # used if linux:system:repo:apt-mk:proxy has no protocol specific entries
  599. pkg:
  600. enabled: true
  601. ftp: ftp://proxy.host.local:2121
  602. #http: http://proxy.host.local:3142
  603. #https: https://proxy.host.local:3143
  604. ...
  605. # global system fallback system defaults
  606. ftp: ftp://proxy.host.local:2121
  607. http: http://proxy.host.local:3142
  608. https: https://proxy.host.local:3143
  609. Remove all repositories:
  610. .. code-block:: yaml
  611. linux:
  612. system:
  613. purge_repos: true
  614. Setup custom apt config options:
  615. .. code-block:: yaml
  616. linux:
  617. system:
  618. apt:
  619. config:
  620. compression-workaround:
  621. "Acquire::CompressionTypes::Order": "gz"
  622. docker-clean:
  623. "DPkg::Post-Invoke":
  624. - "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"
  625. "APT::Update::Post-Invoke":
  626. - "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"
  627. RC
  628. ~~
  629. rc.local example
  630. .. code-block:: yaml
  631. linux:
  632. system:
  633. rc:
  634. local: |
  635. #!/bin/sh -e
  636. #
  637. # rc.local
  638. #
  639. # This script is executed at the end of each multiuser runlevel.
  640. # Make sure that the script will "exit 0" on success or any other
  641. # value on error.
  642. #
  643. # In order to enable or disable this script just change the execution
  644. # bits.
  645. #
  646. # By default this script does nothing.
  647. exit 0
  648. Prompt
  649. ~~~~~~
  650. Setting prompt is implemented by creating ``/etc/profile.d/prompt.sh``. Every
  651. user can have different prompt.
  652. .. code-block:: yaml
  653. linux:
  654. system:
  655. prompt:
  656. 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\\]
  657. default: \\n\\D{%y/%m/%d %H:%M:%S} $(hostname -f)\\n[\\u@\\h:\\w]
  658. On Debian systems to set prompt system-wide it's necessary to remove setting
  659. PS1 in ``/etc/bash.bashrc`` and ``~/.bashrc`` (which comes from
  660. ``/etc/skel/.bashrc``). This formula will do this automatically, but will not
  661. touch existing user's ``~/.bashrc`` files except root.
  662. Bash
  663. ~~~~
  664. Fix bash configuration to preserve history across sessions (like ZSH does by
  665. default).
  666. .. code-block:: yaml
  667. linux:
  668. system:
  669. bash:
  670. preserve_history: true
  671. Message of the day
  672. ~~~~~~~~~~~~~~~~~~
  673. ``pam_motd`` from package ``update-motd`` is used for dynamic messages of the
  674. day. Setting custom motd will cleanup existing ones.
  675. .. code-block:: yaml
  676. linux:
  677. system:
  678. motd:
  679. - release: |
  680. #!/bin/sh
  681. [ -r /etc/lsb-release ] && . /etc/lsb-release
  682. if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then
  683. # Fall back to using the very slow lsb_release utility
  684. DISTRIB_DESCRIPTION=$(lsb_release -s -d)
  685. fi
  686. printf "Welcome to %s (%s %s %s)\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" "$(uname -r)" "$(uname -m)"
  687. - warning: |
  688. #!/bin/sh
  689. printf "This is [company name] network.\n"
  690. printf "Unauthorized access strictly prohibited.\n"
  691. Services
  692. ~~~~~~~~
  693. Stop and disable linux service:
  694. .. code-block:: yaml
  695. linux:
  696. system:
  697. service:
  698. apt-daily.timer:
  699. status: dead
  700. Possible status is dead (disable service by default), running (enable service by default), enabled, disabled.
  701. Linux with atop service:
  702. .. code-block:: yaml
  703. linux:
  704. system:
  705. atop:
  706. enabled: true
  707. interval: 20
  708. logpath: "/var/log/atop"
  709. outfile: "/var/log/atop/daily.log"
  710. RHEL / CentOS
  711. ^^^^^^^^^^^^^
  712. Unfortunately ``update-motd`` is currently not available for RHEL so there's
  713. no native support for dynamic motd.
  714. You can still set static one, only pillar structure differs:
  715. .. code-block:: yaml
  716. linux:
  717. system:
  718. motd: |
  719. This is [company name] network.
  720. Unauthorized access strictly prohibited.
  721. Haveged
  722. ~~~~~~~
  723. If you are running headless server and are low on entropy, it may be a good
  724. idea to setup Haveged.
  725. .. code-block:: yaml
  726. linux:
  727. system:
  728. haveged:
  729. enabled: true
  730. Linux network
  731. -------------
  732. Linux with network manager
  733. .. code-block:: yaml
  734. linux:
  735. network:
  736. enabled: true
  737. network_manager: true
  738. Linux with default static network interfaces, default gateway interface and DNS servers
  739. .. code-block:: yaml
  740. linux:
  741. network:
  742. enabled: true
  743. interface:
  744. eth0:
  745. enabled: true
  746. type: eth
  747. address: 192.168.0.102
  748. netmask: 255.255.255.0
  749. gateway: 192.168.0.1
  750. name_servers:
  751. - 8.8.8.8
  752. - 8.8.4.4
  753. mtu: 1500
  754. Linux with bonded interfaces and disabled NetworkManager
  755. .. code-block:: yaml
  756. linux:
  757. network:
  758. enabled: true
  759. interface:
  760. eth0:
  761. type: eth
  762. ...
  763. eth1:
  764. type: eth
  765. ...
  766. bond0:
  767. enabled: true
  768. type: bond
  769. address: 192.168.0.102
  770. netmask: 255.255.255.0
  771. mtu: 1500
  772. use_in:
  773. - interface: ${linux:interface:eth0}
  774. - interface: ${linux:interface:eth0}
  775. network_manager:
  776. disable: true
  777. Linux with vlan interface_params
  778. .. code-block:: yaml
  779. linux:
  780. network:
  781. enabled: true
  782. interface:
  783. vlan69:
  784. type: vlan
  785. use_interfaces:
  786. - interface: ${linux:interface:bond0}
  787. Linux with wireless interface parameters
  788. .. code-block:: yaml
  789. linux:
  790. network:
  791. enabled: true
  792. gateway: 10.0.0.1
  793. default_interface: eth0
  794. interface:
  795. wlan0:
  796. type: eth
  797. wireless:
  798. essid: example
  799. key: example_key
  800. security: wpa
  801. priority: 1
  802. Linux networks with routes defined
  803. .. code-block:: yaml
  804. linux:
  805. network:
  806. enabled: true
  807. gateway: 10.0.0.1
  808. default_interface: eth0
  809. interface:
  810. eth0:
  811. type: eth
  812. route:
  813. default:
  814. address: 192.168.0.123
  815. netmask: 255.255.255.0
  816. gateway: 192.168.0.1
  817. Native Linux Bridges
  818. .. code-block:: yaml
  819. linux:
  820. network:
  821. interface:
  822. eth1:
  823. enabled: true
  824. type: eth
  825. proto: manual
  826. up_cmds:
  827. - ip address add 0/0 dev $IFACE
  828. - ip link set $IFACE up
  829. down_cmds:
  830. - ip link set $IFACE down
  831. br-ex:
  832. enabled: true
  833. type: bridge
  834. address: ${linux:network:host:public_local:address}
  835. netmask: 255.255.255.0
  836. use_interfaces:
  837. - eth1
  838. OpenVswitch Bridges
  839. .. code-block:: yaml
  840. linux:
  841. network:
  842. bridge: openvswitch
  843. interface:
  844. eth1:
  845. enabled: true
  846. type: eth
  847. proto: manual
  848. up_cmds:
  849. - ip address add 0/0 dev $IFACE
  850. - ip link set $IFACE up
  851. down_cmds:
  852. - ip link set $IFACE down
  853. br-ex:
  854. enabled: true
  855. type: bridge
  856. address: ${linux:network:host:public_local:address}
  857. netmask: 255.255.255.0
  858. use_interfaces:
  859. - eth1
  860. br-prv:
  861. enabled: true
  862. type: ovs_bridge
  863. mtu: 65000
  864. br-ens7:
  865. enabled: true
  866. name: br-ens7
  867. type: ovs_bridge
  868. proto: manual
  869. mtu: 9000
  870. use_interfaces:
  871. - ens7
  872. patch-br-ens7-br-prv:
  873. enabled: true
  874. name: ens7-prv
  875. ovs_type: ovs_port
  876. type: ovs_port
  877. bridge: br-ens7
  878. port_type: patch
  879. peer: prv-ens7
  880. mtu: 65000
  881. patch-br-prv-br-ens7:
  882. enabled: true
  883. name: prv-ens7
  884. bridge: br-prv
  885. ovs_type: ovs_port
  886. type: ovs_port
  887. port_type: patch
  888. peer: ens7-prv
  889. mtu: 65000
  890. ens7:
  891. enabled: true
  892. name: ens7
  893. proto: manual
  894. ovs_port_type: OVSPort
  895. type: ovs_port
  896. ovs_bridge: br-ens7
  897. bridge: br-ens7
  898. Debian manual proto interfaces
  899. When you are changing interface proto from static in up state to manual, you
  900. may need to flush ip addresses. For example, if you want to use the interface
  901. and the ip on the bridge. This can be done by setting the ``ipflush_onchange``
  902. to true.
  903. .. code-block:: yaml
  904. linux:
  905. network:
  906. interface:
  907. eth1:
  908. enabled: true
  909. type: eth
  910. proto: manual
  911. mtu: 9100
  912. ipflush_onchange: true
  913. Debian static proto interfaces
  914. When you are changing interface proto from dhcp in up state to static, you
  915. may need to flush ip addresses and restart interface to assign ip address from a managed file.
  916. For example, if you want to use the interface and the ip on the bridge.
  917. This can be done by setting the ``ipflush_onchange`` with combination
  918. ``restart_on_ipflush`` param set to to true.
  919. .. code-block:: yaml
  920. linux:
  921. network:
  922. interface:
  923. eth1:
  924. enabled: true
  925. type: eth
  926. proto: static
  927. address: 10.1.0.22
  928. netmask: 255.255.255.0
  929. ipflush_onchange: true
  930. restart_on_ipflush: true
  931. Concatinating and removing interface files
  932. Debian based distributions have `/etc/network/interfaces.d/` directory, where
  933. you can store configuration of network interfaces in separate files. You can
  934. concatinate the files to the defined destination when needed, this operation
  935. removes the file from the `/etc/network/interfaces.d/`. If you just need to
  936. remove iface files, you can use the `remove_iface_files` key.
  937. .. code-block:: yaml
  938. linux:
  939. network:
  940. concat_iface_files:
  941. - src: '/etc/network/interfaces.d/50-cloud-init.cfg'
  942. dst: '/etc/network/interfaces'
  943. remove_iface_files:
  944. - '/etc/network/interfaces.d/90-custom.cfg'
  945. DHCP client configuration
  946. None of the keys is mandatory, include only those you really need. For full list
  947. of available options under send, supersede, prepend, append refer to dhcp-options(5)
  948. .. code-block:: yaml
  949. linux:
  950. network:
  951. dhclient:
  952. enabled: true
  953. backoff_cutoff: 15
  954. initial_interval: 10
  955. reboot: 10
  956. retry: 60
  957. select_timeout: 0
  958. timeout: 120
  959. send:
  960. - option: host-name
  961. declaration: "= gethostname()"
  962. supersede:
  963. - option: host-name
  964. declaration: "spaceship"
  965. - option: domain-name
  966. declaration: "domain.home"
  967. #- option: arp-cache-timeout
  968. # declaration: 20
  969. prepend:
  970. - option: domain-name-servers
  971. declaration:
  972. - 8.8.8.8
  973. - 8.8.4.4
  974. - option: domain-search
  975. declaration:
  976. - example.com
  977. - eng.example.com
  978. #append:
  979. #- option: domain-name-servers
  980. # declaration: 127.0.0.1
  981. # ip or subnet to reject dhcp offer from
  982. reject:
  983. - 192.33.137.209
  984. - 10.0.2.0/24
  985. request:
  986. - subnet-mask
  987. - broadcast-address
  988. - time-offset
  989. - routers
  990. - domain-name
  991. - domain-name-servers
  992. - domain-search
  993. - host-name
  994. - dhcp6.name-servers
  995. - dhcp6.domain-search
  996. - dhcp6.fqdn
  997. - dhcp6.sntp-servers
  998. - netbios-name-servers
  999. - netbios-scope
  1000. - interface-mtu
  1001. - rfc3442-classless-static-routes
  1002. - ntp-servers
  1003. require:
  1004. - subnet-mask
  1005. - domain-name-servers
  1006. # if per interface configuration required add below
  1007. interface:
  1008. ens2:
  1009. initial_interval: 11
  1010. reject:
  1011. - 192.33.137.210
  1012. ens3:
  1013. initial_interval: 12
  1014. reject:
  1015. - 192.33.137.211
  1016. Linux network systemd settings:
  1017. .. code-block:: yaml
  1018. linux:
  1019. network:
  1020. ...
  1021. systemd:
  1022. link:
  1023. 10-iface-dmz:
  1024. Match:
  1025. MACAddress: c8:5b:67:fa:1a:af
  1026. OriginalName: eth0
  1027. Link:
  1028. Name: dmz0
  1029. netdev:
  1030. 20-bridge-dmz:
  1031. match:
  1032. name: dmz0
  1033. network:
  1034. mescription: bridge
  1035. bridge: br-dmz0
  1036. network:
  1037. # works with lowercase, keys are by default capitalized
  1038. 40-dhcp:
  1039. match:
  1040. name: '*'
  1041. network:
  1042. DHCP: yes
  1043. Configure global environment variables
  1044. Use ``/etc/environment`` for static system wide variable assignment after
  1045. boot. Variable expansion is frequently not supported.
  1046. .. code-block:: yaml
  1047. linux:
  1048. system:
  1049. env:
  1050. BOB_VARIABLE: Alice
  1051. ...
  1052. BOB_PATH:
  1053. - /srv/alice/bin
  1054. - /srv/bob/bin
  1055. ...
  1056. ftp_proxy: none
  1057. http_proxy: http://global-http-proxy.host.local:8080
  1058. https_proxy: ${linux:system:proxy:https}
  1059. no_proxy:
  1060. - 192.168.0.80
  1061. - 192.168.1.80
  1062. - .domain.com
  1063. - .local
  1064. ...
  1065. # NOTE: global defaults proxy configuration.
  1066. proxy:
  1067. ftp: ftp://proxy.host.local:2121
  1068. http: http://proxy.host.local:3142
  1069. https: https://proxy.host.local:3143
  1070. noproxy:
  1071. - .domain.com
  1072. - .local
  1073. Configure profile.d scripts
  1074. The profile.d scripts are being sourced during .sh execution and support
  1075. variable expansion in opposite to /etc/environment global settings in
  1076. ``/etc/environment``.
  1077. .. code-block:: yaml
  1078. linux:
  1079. system:
  1080. profile:
  1081. locales: |
  1082. export LANG=C
  1083. export LC_ALL=C
  1084. ...
  1085. vi_flavors.sh: |
  1086. export PAGER=view
  1087. export EDITOR=vim
  1088. alias vi=vim
  1089. shell_locales.sh: |
  1090. export LANG=en_US
  1091. export LC_ALL=en_US.UTF-8
  1092. shell_proxies.sh: |
  1093. export FTP_PROXY=ftp://127.0.3.3:2121
  1094. export NO_PROXY='.local'
  1095. Linux with hosts
  1096. Parameter purge_hosts will enforce whole /etc/hosts file, removing entries
  1097. that are not defined in model except defaults for both IPv4 and IPv6 localhost
  1098. and hostname + fqdn.
  1099. It's good to use this option if you want to ensure /etc/hosts is always in a
  1100. clean state however it's not enabled by default for safety.
  1101. .. code-block:: yaml
  1102. linux:
  1103. network:
  1104. purge_hosts: true
  1105. host:
  1106. # No need to define this one if purge_hosts is true
  1107. hostname:
  1108. address: 127.0.1.1
  1109. names:
  1110. - ${linux:network:fqdn}
  1111. - ${linux:network:hostname}
  1112. node1:
  1113. address: 192.168.10.200
  1114. names:
  1115. - node2.domain.com
  1116. - service2.domain.com
  1117. node2:
  1118. address: 192.168.10.201
  1119. names:
  1120. - node2.domain.com
  1121. - service2.domain.com
  1122. Linux with hosts collected from mine
  1123. In this case all dns records defined within infrastrucuture will be passed to
  1124. local hosts records or any DNS server. Only hosts with `grain` parameter to
  1125. true will be propagated to the mine.
  1126. .. code-block:: yaml
  1127. linux:
  1128. network:
  1129. purge_hosts: true
  1130. mine_dns_records: true
  1131. host:
  1132. node1:
  1133. address: 192.168.10.200
  1134. grain: true
  1135. names:
  1136. - node2.domain.com
  1137. - service2.domain.com
  1138. Setup resolv.conf, nameservers, domain and search domains
  1139. .. code-block:: yaml
  1140. linux:
  1141. network:
  1142. resolv:
  1143. dns:
  1144. - 8.8.4.4
  1145. - 8.8.8.8
  1146. domain: my.example.com
  1147. search:
  1148. - my.example.com
  1149. - example.com
  1150. options:
  1151. - ndots: 5
  1152. - timeout: 2
  1153. - attempts: 2
  1154. setting custom TX queue length for tap interfaces
  1155. .. code-block:: yaml
  1156. linux:
  1157. network:
  1158. tap_custom_txqueuelen: 10000
  1159. DPDK OVS interfaces
  1160. **DPDK OVS NIC**
  1161. .. code-block:: yaml
  1162. linux:
  1163. network:
  1164. bridge: openvswitch
  1165. dpdk:
  1166. enabled: true
  1167. driver: uio/vfio
  1168. openvswitch:
  1169. pmd_cpu_mask: "0x6"
  1170. dpdk_socket_mem: "1024,1024"
  1171. dpdk_lcore_mask: "0x400"
  1172. memory_channels: 2
  1173. interface:
  1174. dpkd0:
  1175. name: ${_param:dpdk_nic}
  1176. pci: 0000:06:00.0
  1177. driver: igb_uio/vfio-pci
  1178. enabled: true
  1179. type: dpdk_ovs_port
  1180. n_rxq: 2
  1181. pmd_rxq_affinity: "0:1,1:2"
  1182. bridge: br-prv
  1183. mtu: 9000
  1184. br-prv:
  1185. enabled: true
  1186. type: dpdk_ovs_bridge
  1187. **DPDK OVS Bond**
  1188. .. code-block:: yaml
  1189. linux:
  1190. network:
  1191. bridge: openvswitch
  1192. dpdk:
  1193. enabled: true
  1194. driver: uio/vfio
  1195. openvswitch:
  1196. pmd_cpu_mask: "0x6"
  1197. dpdk_socket_mem: "1024,1024"
  1198. dpdk_lcore_mask: "0x400"
  1199. memory_channels: 2
  1200. interface:
  1201. dpdk_second_nic:
  1202. name: ${_param:primary_second_nic}
  1203. pci: 0000:06:00.0
  1204. driver: igb_uio/vfio-pci
  1205. bond: dpdkbond0
  1206. enabled: true
  1207. type: dpdk_ovs_port
  1208. n_rxq: 2
  1209. pmd_rxq_affinity: "0:1,1:2"
  1210. mtu: 9000
  1211. dpdk_first_nic:
  1212. name: ${_param:primary_first_nic}
  1213. pci: 0000:05:00.0
  1214. driver: igb_uio/vfio-pci
  1215. bond: dpdkbond0
  1216. enabled: true
  1217. type: dpdk_ovs_port
  1218. n_rxq: 2
  1219. pmd_rxq_affinity: "0:1,1:2"
  1220. mtu: 9000
  1221. dpdkbond0:
  1222. enabled: true
  1223. bridge: br-prv
  1224. type: dpdk_ovs_bond
  1225. mode: active-backup
  1226. br-prv:
  1227. enabled: true
  1228. type: dpdk_ovs_bridge
  1229. **DPDK OVS bridge for VXLAN**
  1230. If VXLAN is used as tenant segmentation then ip address must be set on br-prv
  1231. .. code-block:: yaml
  1232. linux:
  1233. network:
  1234. ...
  1235. interface:
  1236. br-prv:
  1237. enabled: true
  1238. type: dpdk_ovs_bridge
  1239. address: 192.168.50.0
  1240. netmask: 255.255.255.0
  1241. tag: 101
  1242. mtu: 9000
  1243. Linux storage
  1244. -------------
  1245. Linux with mounted Samba
  1246. .. code-block:: yaml
  1247. linux:
  1248. storage:
  1249. enabled: true
  1250. mount:
  1251. samba1:
  1252. - enabled: true
  1253. - path: /media/myuser/public/
  1254. - device: //192.168.0.1/storage
  1255. - file_system: cifs
  1256. - options: guest,uid=myuser,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm
  1257. NFS mount
  1258. .. code-block:: yaml
  1259. linux:
  1260. storage:
  1261. enabled: true
  1262. mount:
  1263. nfs_glance:
  1264. enabled: true
  1265. path: /var/lib/glance/images
  1266. device: 172.16.10.110:/var/nfs/glance
  1267. file_system: nfs
  1268. opts: rw,sync
  1269. File swap configuration
  1270. .. code-block:: yaml
  1271. linux:
  1272. storage:
  1273. enabled: true
  1274. swap:
  1275. file:
  1276. enabled: true
  1277. engine: file
  1278. device: /swapfile
  1279. size: 1024
  1280. Partition swap configuration
  1281. .. code-block:: yaml
  1282. linux:
  1283. storage:
  1284. enabled: true
  1285. swap:
  1286. partition:
  1287. enabled: true
  1288. engine: partition
  1289. device: /dev/vg0/swap
  1290. LVM group `vg1` with one device and `data` volume mounted into `/mnt/data`
  1291. .. code-block:: yaml
  1292. parameters:
  1293. linux:
  1294. storage:
  1295. mount:
  1296. data:
  1297. enabled: true
  1298. device: /dev/vg1/data
  1299. file_system: ext4
  1300. path: /mnt/data
  1301. lvm:
  1302. vg1:
  1303. enabled: true
  1304. devices:
  1305. - /dev/sdb
  1306. volume:
  1307. data:
  1308. size: 40G
  1309. mount: ${linux:storage:mount:data}
  1310. Create partitions on disk. Specify size in MB. It expects empty
  1311. disk without any existing partitions. (set startsector=1, if you want to start partitions from 2048)
  1312. .. code-block:: yaml
  1313. linux:
  1314. storage:
  1315. disk:
  1316. first_drive:
  1317. startsector: 1
  1318. name: /dev/loop1
  1319. type: gpt
  1320. partitions:
  1321. - size: 200 #size in MB
  1322. type: fat32
  1323. - size: 300 #size in MB
  1324. mkfs: True
  1325. type: xfs
  1326. /dev/vda1:
  1327. partitions:
  1328. - size: 5
  1329. type: ext2
  1330. - size: 10
  1331. type: ext4
  1332. Multipath with Fujitsu Eternus DXL
  1333. .. code-block:: yaml
  1334. parameters:
  1335. linux:
  1336. storage:
  1337. multipath:
  1338. enabled: true
  1339. blacklist_devices:
  1340. - /dev/sda
  1341. - /dev/sdb
  1342. backends:
  1343. - fujitsu_eternus_dxl
  1344. Multipath with Hitachi VSP 1000
  1345. .. code-block:: yaml
  1346. parameters:
  1347. linux:
  1348. storage:
  1349. multipath:
  1350. enabled: true
  1351. blacklist_devices:
  1352. - /dev/sda
  1353. - /dev/sdb
  1354. backends:
  1355. - hitachi_vsp1000
  1356. Multipath with IBM Storwize
  1357. .. code-block:: yaml
  1358. parameters:
  1359. linux:
  1360. storage:
  1361. multipath:
  1362. enabled: true
  1363. blacklist_devices:
  1364. - /dev/sda
  1365. - /dev/sdb
  1366. backends:
  1367. - ibm_storwize
  1368. Multipath with multiple backends
  1369. .. code-block:: yaml
  1370. parameters:
  1371. linux:
  1372. storage:
  1373. multipath:
  1374. enabled: true
  1375. blacklist_devices:
  1376. - /dev/sda
  1377. - /dev/sdb
  1378. - /dev/sdc
  1379. - /dev/sdd
  1380. backends:
  1381. - ibm_storwize
  1382. - fujitsu_eternus_dxl
  1383. - hitachi_vsp1000
  1384. PAM LDAP integration
  1385. .. code-block:: yaml
  1386. parameters:
  1387. linux:
  1388. system:
  1389. auth:
  1390. enabled: true
  1391. ldap:
  1392. enabled: true
  1393. binddn: cn=bind,ou=service_users,dc=example,dc=com
  1394. bindpw: secret
  1395. uri: ldap://127.0.0.1
  1396. base: ou=users,dc=example,dc=com
  1397. ldap_version: 3
  1398. pagesize: 65536
  1399. referrals: off
  1400. filter:
  1401. passwd: (&(&(objectClass=person)(uidNumber=*))(unixHomeDirectory=*))
  1402. shadow: (&(&(objectClass=person)(uidNumber=*))(unixHomeDirectory=*))
  1403. group: (&(objectClass=group)(gidNumber=*))
  1404. Disabled multipath (the default setup)
  1405. .. code-block:: yaml
  1406. parameters:
  1407. linux:
  1408. storage:
  1409. multipath:
  1410. enabled: false
  1411. Linux with local loopback device
  1412. .. code-block:: yaml
  1413. linux:
  1414. storage:
  1415. loopback:
  1416. disk1:
  1417. file: /srv/disk1
  1418. size: 50G
  1419. External config generation
  1420. --------------------------
  1421. You are able to use config support metadata between formulas and only generate
  1422. config files for external use, eg. docker, etc.
  1423. .. code-block:: yaml
  1424. parameters:
  1425. linux:
  1426. system:
  1427. config:
  1428. pillar:
  1429. jenkins:
  1430. master:
  1431. home: /srv/volumes/jenkins
  1432. approved_scripts:
  1433. - method java.net.URL openConnection
  1434. credentials:
  1435. - type: username_password
  1436. scope: global
  1437. id: test
  1438. desc: Testing credentials
  1439. username: test
  1440. password: test
  1441. Netconsole Remote Kernel Logging
  1442. --------------------------------
  1443. Netconsole logger could be configured for configfs-enabled kernels
  1444. (`CONFIG_NETCONSOLE_DYNAMIC` should be enabled). Configuration applies both in
  1445. runtime (if network is already configured), and on-boot after interface
  1446. initialization. Notes:
  1447. * receiver could be located only in same L3 domain
  1448. (or you need to configure gateway MAC manually)
  1449. * receiver's MAC is detected only on configuration time
  1450. * using broadcast MAC is not recommended
  1451. .. code-block:: yaml
  1452. parameters:
  1453. linux:
  1454. system:
  1455. netconsole:
  1456. enabled: true
  1457. port: 514 (optional)
  1458. loglevel: debug (optional)
  1459. target:
  1460. 192.168.0.1:
  1461. interface: bond0
  1462. mac: "ff:ff:ff:ff:ff:ff" (optional)
  1463. Usage
  1464. =====
  1465. Set mtu of network interface eth0 to 1400
  1466. .. code-block:: bash
  1467. ip link set dev eth0 mtu 1400
  1468. Read more
  1469. =========
  1470. * https://www.archlinux.org/
  1471. * http://askubuntu.com/questions/175172/how-do-i-configure-proxies-in-ubuntu-server-or-minimal-cli-ubuntu
  1472. Documentation and Bugs
  1473. ======================
  1474. To learn how to install and update salt-formulas, consult the documentation
  1475. available online at:
  1476. http://salt-formulas.readthedocs.io/
  1477. In the unfortunate event that bugs are discovered, they should be reported to
  1478. the appropriate issue tracker. Use Github issue tracker for specific salt
  1479. formula:
  1480. https://github.com/salt-formulas/salt-formula-linux/issues
  1481. For feature requests, bug reports or blueprints affecting entire ecosystem,
  1482. use Launchpad salt-formulas project:
  1483. https://launchpad.net/salt-formulas
  1484. You can also join salt-formulas-users team and subscribe to mailing list:
  1485. https://launchpad.net/~salt-formulas-users
  1486. Developers wishing to work on the salt-formulas projects should always base
  1487. their work on master branch and submit pull request against specific formula.
  1488. https://github.com/salt-formulas/salt-formula-linux
  1489. Any questions or feedback is always welcome so feel free to join our IRC
  1490. channel:
  1491. #salt-formulas @ irc.freenode.net