os-config.tpl.yml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  1. rancher:
  2. environment:
  3. VERSION: {{.VERSION}}
  4. SUFFIX: {{.SUFFIX}}
  5. defaults:
  6. hostname: {{.HOSTNAME_DEFAULT}}
  7. {{if eq "amd64" .ARCH -}}
  8. docker:
  9. engine: docker-1.12.3
  10. {{else -}}
  11. docker:
  12. engine: docker-1.11.2
  13. {{end -}}
  14. network:
  15. dns:
  16. nameservers: [8.8.8.8, 8.8.4.4]
  17. bootstrap:
  18. state-script:
  19. image: {{.OS_REPO}}/os-statescript:{{.VERSION}}{{.SUFFIX}}
  20. labels:
  21. io.rancher.os.detach: "false"
  22. io.rancher.os.scope: system
  23. io.rancher.os.after: udev-bootstrap
  24. log_driver: json-file
  25. net: host
  26. uts: host
  27. privileged: true
  28. volumes:
  29. - /dev:/host/dev
  30. - /lib/modules:/lib/modules
  31. - /lib/firmware:/lib/firmware
  32. - /usr/bin/ros:/usr/bin/ros:ro
  33. - /usr/share/ros:/usr/share/ros:ro
  34. udev-bootstrap:
  35. image: {{.OS_REPO}}/os-udev:{{.VERSION}}{{.SUFFIX}}
  36. environment:
  37. - BOOTSTRAP=true
  38. labels:
  39. io.rancher.os.detach: "false"
  40. io.rancher.os.scope: system
  41. log_driver: json-file
  42. net: host
  43. uts: host
  44. privileged: true
  45. volumes:
  46. - /dev:/host/dev
  47. - /lib/modules:/lib/modules
  48. - /lib/firmware:/lib/firmware
  49. - /usr/bin/ros:/usr/bin/ros:ro
  50. autoformat:
  51. autoformat:
  52. image: {{.OS_REPO}}/os-autoformat:{{.VERSION}}{{.SUFFIX}}
  53. labels:
  54. io.rancher.os.detach: "false"
  55. io.rancher.os.scope: system
  56. log_driver: json-file
  57. net: none
  58. privileged: true
  59. udev-autoformat:
  60. image: {{.OS_REPO}}/os-udev:{{.VERSION}}{{.SUFFIX}}
  61. labels:
  62. io.rancher.os.detach: "false"
  63. io.rancher.os.scope: system
  64. io.rancher.os.after: autoformat
  65. log_driver: json-file
  66. net: host
  67. uts: host
  68. privileged: true
  69. volumes:
  70. - /dev:/host/dev
  71. - /lib/modules:/lib/modules
  72. - /lib/firmware:/lib/firmware
  73. - /usr/bin/ros:/usr/bin/ros:ro
  74. bootstrap_docker:
  75. bridge: none
  76. storage_driver: overlay
  77. restart: false
  78. graph: /var/lib/system-docker
  79. group: root
  80. host: "unix:///var/run/system-docker.sock"
  81. userland_proxy: false
  82. console: default
  83. cloud_init:
  84. datasources:
  85. - configdrive:/media/config-2
  86. repositories:
  87. core:
  88. url: {{.OS_SERVICES_REPO}}/{{.REPO_VERSION}}
  89. state:
  90. fstype: auto
  91. oem_fstype: auto
  92. oem_dev: LABEL=RANCHER_OEM
  93. sysctl:
  94. fs.file-max: 1000000000
  95. services:
  96. {{if eq "amd64" .ARCH -}}
  97. acpid:
  98. image: {{.OS_REPO}}/os-acpid:{{.VERSION}}{{.SUFFIX}}
  99. command: /usr/sbin/acpid -f
  100. labels:
  101. io.rancher.os.scope: system
  102. net: host
  103. uts: host
  104. privileged: true
  105. volumes_from:
  106. - command-volumes
  107. - system-volumes
  108. {{end -}}
  109. all-volumes:
  110. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  111. command: echo
  112. labels:
  113. io.rancher.os.createonly: "true"
  114. io.rancher.os.scope: system
  115. log_driver: json-file
  116. net: none
  117. privileged: true
  118. read_only: true
  119. volumes_from:
  120. - container-data-volumes
  121. - command-volumes
  122. - user-volumes
  123. - system-volumes
  124. cloud-init:
  125. image: {{.OS_REPO}}/os-cloudinit:{{.VERSION}}{{.SUFFIX}}
  126. labels:
  127. io.rancher.os.detach: "false"
  128. io.rancher.os.reloadconfig: "true"
  129. io.rancher.os.scope: system
  130. io.rancher.os.after: ntp
  131. net: host
  132. uts: host
  133. privileged: true
  134. volumes_from:
  135. - command-volumes
  136. - system-volumes
  137. cloud-init-execute:
  138. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  139. command: cloud-init-execute -pre-console
  140. labels:
  141. io.rancher.os.detach: "false"
  142. io.rancher.os.scope: system
  143. io.rancher.os.after: cloud-init
  144. net: host
  145. uts: host
  146. privileged: true
  147. volumes_from:
  148. - system-volumes
  149. volumes:
  150. - /usr/bin/ros:/usr/bin/ros
  151. - /usr/bin/ros:/usr/bin/cloud-init-execute
  152. cloud-init-pre:
  153. image: {{.OS_REPO}}/os-cloudinit:{{.VERSION}}{{.SUFFIX}}
  154. environment:
  155. - CLOUD_INIT_NETWORK=false
  156. labels:
  157. io.rancher.os.detach: "false"
  158. io.rancher.os.reloadconfig: "true"
  159. io.rancher.os.scope: system
  160. io.rancher.os.after: udev,preload-system-images
  161. net: host
  162. uts: host
  163. privileged: true
  164. volumes_from:
  165. - command-volumes
  166. - system-volumes
  167. command-volumes:
  168. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  169. command: echo
  170. labels:
  171. io.rancher.os.createonly: "true"
  172. io.rancher.os.scope: system
  173. log_driver: json-file
  174. net: none
  175. privileged: true
  176. read_only: true
  177. volumes:
  178. - /usr/bin/ros:/usr/bin/dockerlaunch:ro
  179. - /usr/bin/ros:/usr/bin/user-docker:ro
  180. - /usr/bin/ros:/usr/bin/system-docker:ro
  181. - /usr/bin/ros:/sbin/poweroff:ro
  182. - /usr/bin/ros:/sbin/reboot:ro
  183. - /usr/bin/ros:/sbin/halt:ro
  184. - /usr/bin/ros:/sbin/shutdown:ro
  185. - /usr/bin/ros:/usr/bin/respawn:ro
  186. - /usr/bin/ros:/usr/bin/ros:ro
  187. - /usr/bin/ros:/usr/bin/cloud-init-execute:ro
  188. - /usr/bin/ros:/usr/bin/cloud-init-save:ro
  189. - /usr/bin/ros:/usr/sbin/netconf:ro
  190. - /usr/bin/ros:/usr/sbin/wait-for-docker:ro
  191. - /usr/bin/ros:/usr/bin/switch-console:ro
  192. - /usr/bin/ros:/usr/bin/console:ro
  193. - /usr/bin/ros:/usr/sbin/console.sh:ro
  194. - /usr/bin/ros:/usr/sbin/docker-init:ro
  195. console:
  196. image: {{.OS_REPO}}/os-console:{{.VERSION}}{{.SUFFIX}}
  197. command: console
  198. labels:
  199. io.rancher.os.scope: system
  200. io.rancher.os.after: network
  201. io.docker.compose.rebuild: always
  202. io.rancher.os.console: default
  203. net: host
  204. uts: host
  205. pid: host
  206. ipc: host
  207. privileged: true
  208. restart: always
  209. volumes_from:
  210. - all-volumes
  211. volumes:
  212. - /usr/bin/iptables:/sbin/iptables:ro
  213. - /media:/media:shared
  214. - /mnt:/mnt:shared
  215. container-data-volumes:
  216. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  217. command: echo
  218. labels:
  219. io.rancher.os.createonly: "true"
  220. io.rancher.os.scope: system
  221. log_driver: json-file
  222. net: none
  223. privileged: true
  224. read_only: true
  225. volumes:
  226. - /var/lib/docker:/var/lib/docker
  227. network-pre:
  228. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  229. command: netconf
  230. labels:
  231. io.rancher.os.scope: system
  232. io.rancher.os.after: cloud-init-pre
  233. net: host
  234. uts: host
  235. pid: host
  236. privileged: true
  237. volumes_from:
  238. - command-volumes
  239. - system-volumes
  240. network:
  241. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  242. command: netconf --stop-network-pre
  243. labels:
  244. io.rancher.os.scope: system
  245. io.rancher.os.after: cloud-init-execute
  246. net: host
  247. uts: host
  248. pid: host
  249. privileged: true
  250. volumes_from:
  251. - command-volumes
  252. - system-volumes
  253. ntp:
  254. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  255. command: ntpd --nofork -g
  256. labels:
  257. io.rancher.os.scope: system
  258. io.rancher.os.after: network-pre
  259. net: host
  260. uts: host
  261. privileged: true
  262. restart: always
  263. volumes_from:
  264. - command-volumes
  265. - system-volumes
  266. preload-system-images:
  267. image: {{.OS_REPO}}/os-preload:{{.VERSION}}{{.SUFFIX}}
  268. environment:
  269. - SYSTEM_IMAGES=true
  270. labels:
  271. io.rancher.os.detach: "false"
  272. io.rancher.os.scope: system
  273. net: host
  274. privileged: true
  275. volumes:
  276. - /var/run/system-docker.sock:/var/run/docker.sock
  277. - /var/lib/rancher/preload/system-docker:/mnt/preload
  278. - /usr/bin/ros:/usr/sbin/wait-for-docker:ro
  279. volumes_from:
  280. - command-volumes
  281. - system-volumes
  282. preload-user-images:
  283. image: {{.OS_REPO}}/os-preload:{{.VERSION}}{{.SUFFIX}}
  284. labels:
  285. io.rancher.os.detach: "false"
  286. io.rancher.os.scope: system
  287. io.rancher.os.after: console
  288. net: host
  289. privileged: true
  290. volumes:
  291. - /var/run/:/var/run/
  292. - /var/lib/rancher/preload/docker:/mnt/preload
  293. - /usr/bin/ros:/usr/sbin/wait-for-docker:ro
  294. volumes_from:
  295. - command-volumes
  296. - system-volumes
  297. syslog:
  298. image: {{.OS_REPO}}/os-syslog:{{.VERSION}}{{.SUFFIX}}
  299. labels:
  300. io.rancher.os.scope: system
  301. log_driver: json-file
  302. net: host
  303. uts: host
  304. privileged: true
  305. restart: always
  306. volumes_from:
  307. - command-volumes
  308. - system-volumes
  309. system-volumes:
  310. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  311. command: echo
  312. labels:
  313. io.rancher.os.createonly: "true"
  314. io.rancher.os.scope: system
  315. log_driver: json-file
  316. net: none
  317. privileged: true
  318. read_only: true
  319. volumes:
  320. - /dev:/host/dev
  321. - /etc/docker:/etc/docker
  322. - /etc/hosts:/etc/hosts
  323. - /etc/resolv.conf:/etc/resolv.conf
  324. - /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt.rancher
  325. - /etc/selinux:/etc/selinux
  326. - /lib/firmware:/lib/firmware
  327. - /lib/modules:/lib/modules
  328. - /run:/run
  329. - /usr/share/ros:/usr/share/ros
  330. - /var/lib/rancher/cache:/var/lib/rancher/cache
  331. - /var/lib/rancher/conf:/var/lib/rancher/conf
  332. - /var/lib/rancher:/var/lib/rancher
  333. - /var/log:/var/log
  334. - /var/run:/var/run
  335. udev-cold:
  336. image: {{.OS_REPO}}/os-udev:{{.VERSION}}{{.SUFFIX}}
  337. labels:
  338. io.rancher.os.detach: "false"
  339. io.rancher.os.scope: system
  340. net: host
  341. uts: host
  342. privileged: true
  343. volumes_from:
  344. - command-volumes
  345. - system-volumes
  346. udev:
  347. image: {{.OS_REPO}}/os-udev:{{.VERSION}}{{.SUFFIX}}
  348. environment:
  349. - DAEMON=true
  350. labels:
  351. io.rancher.os.detach: "true"
  352. io.rancher.os.scope: system
  353. io.rancher.os.after: udev-cold
  354. net: host
  355. uts: host
  356. privileged: true
  357. restart: always
  358. volumes_from:
  359. - command-volumes
  360. - system-volumes
  361. user-volumes:
  362. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  363. command: echo
  364. labels:
  365. io.rancher.os.createonly: "true"
  366. io.rancher.os.scope: system
  367. log_driver: json-file
  368. net: none
  369. privileged: true
  370. read_only: true
  371. volumes:
  372. - /home:/home
  373. - /opt:/opt
  374. docker:
  375. {{if eq "amd64" .ARCH -}}
  376. image: {{.OS_REPO}}/os-docker:1.12.3{{.SUFFIX}}
  377. {{else -}}
  378. image: {{.OS_REPO}}/os-docker:1.11.2{{.SUFFIX}}
  379. {{end -}}
  380. command: /usr/bin/user-docker
  381. environment:
  382. - HTTP_PROXY
  383. - HTTPS_PROXY
  384. - NO_PROXY
  385. labels:
  386. io.rancher.os.scope: system
  387. io.rancher.os.after: console
  388. net: host
  389. pid: host
  390. ipc: host
  391. uts: host
  392. privileged: true
  393. restart: always
  394. volumes_from:
  395. - all-volumes
  396. volumes:
  397. - /sys:/host/sys
  398. - /var/lib/system-docker:/var/lib/system-docker:shared
  399. system_docker:
  400. exec: true
  401. storage_driver: overlay
  402. restart: false
  403. graph: /var/lib/system-docker
  404. group: root
  405. host: "unix:///var/run/system-docker.sock"
  406. pid_file: /var/run/system-docker.pid
  407. exec_root: /var/run/system-docker
  408. config_file: /etc/docker/system-docker.json
  409. userland_proxy: false
  410. log_opts:
  411. max-size: 25m
  412. max-file: 2
  413. upgrade:
  414. url: {{.OS_RELEASES_YML}}/releases{{.SUFFIX}}.yml
  415. image: {{.OS_REPO}}/os
  416. docker:
  417. {{if eq "amd64" .ARCH -}}
  418. engine: docker-1.12.3
  419. {{else -}}
  420. engine: docker-1.11.2
  421. {{end -}}
  422. storage_driver: overlay
  423. group: docker
  424. host: "unix:///var/run/docker.sock"
  425. log_opts:
  426. max-size: 25m
  427. max-file: 2
  428. tls_args: [--tlsverify, --tlscacert=/etc/docker/tls/ca.pem, --tlscert=/etc/docker/tls/server-cert.pem, --tlskey=/etc/docker/tls/server-key.pem,
  429. '-H=0.0.0.0:2376']