os-config.tpl.yml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. rancher:
  2. defaults:
  3. hostname: {{.HOSTNAME_DEFAULT}}
  4. network:
  5. dns:
  6. nameservers: [8.8.8.8, 8.8.4.4]
  7. bootstrap:
  8. state-script:
  9. image: {{.OS_REPO}}/os-statescript:{{.VERSION}}{{.SUFFIX}}
  10. labels:
  11. io.rancher.os.detach: "false"
  12. io.rancher.os.scope: system
  13. io.rancher.os.after: udev-bootstrap
  14. log_driver: json-file
  15. net: host
  16. uts: host
  17. privileged: true
  18. volumes:
  19. - /dev:/host/dev
  20. - /lib/modules:/lib/modules
  21. - /lib/firmware:/lib/firmware
  22. - /usr/bin/ros:/usr/bin/ros:ro
  23. - /usr/share/ros:/usr/share/ros:ro
  24. udev-bootstrap:
  25. image: {{.OS_REPO}}/os-udev:{{.VERSION}}{{.SUFFIX}}
  26. environment:
  27. - BOOTSTRAP=true
  28. labels:
  29. io.rancher.os.detach: "false"
  30. io.rancher.os.scope: system
  31. log_driver: json-file
  32. net: host
  33. uts: host
  34. privileged: true
  35. volumes:
  36. - /dev:/host/dev
  37. - /lib/modules:/lib/modules
  38. - /lib/firmware:/lib/firmware
  39. autoformat:
  40. autoformat:
  41. image: {{.OS_REPO}}/os-autoformat:{{.VERSION}}{{.SUFFIX}}
  42. labels:
  43. io.rancher.os.detach: "false"
  44. io.rancher.os.scope: system
  45. log_driver: json-file
  46. net: none
  47. privileged: true
  48. udev-autoformat:
  49. image: {{.OS_REPO}}/os-udev:{{.VERSION}}{{.SUFFIX}}
  50. labels:
  51. io.rancher.os.detach: "false"
  52. io.rancher.os.scope: system
  53. io.rancher.os.after: autoformat
  54. log_driver: json-file
  55. net: host
  56. uts: host
  57. privileged: true
  58. volumes:
  59. - /dev:/host/dev
  60. - /lib/modules:/lib/modules
  61. - /lib/firmware:/lib/firmware
  62. bootstrap_docker:
  63. args: [daemon, -s, overlay, -b, none, --restart=false, -g, /var/lib/system-docker,
  64. -G, root, -H, 'unix:///var/run/system-docker.sock', --userland-proxy=false]
  65. console: default
  66. cloud_init:
  67. datasources:
  68. - configdrive:/media/config-2
  69. repositories:
  70. core:
  71. url: {{.OS_SERVICES_REPO}}/{{.REPO_VERSION}}{{.SUFFIX}}
  72. state:
  73. fstype: auto
  74. dev: LABEL=RANCHER_STATE
  75. oem_fstype: auto
  76. oem_dev: LABEL=RANCHER_OEM
  77. services:
  78. {{if eq "amd64" .ARCH -}}
  79. acpid:
  80. image: {{.OS_REPO}}/os-acpid:{{.VERSION}}{{.SUFFIX}}
  81. labels:
  82. io.rancher.os.scope: system
  83. net: host
  84. uts: host
  85. privileged: true
  86. volumes_from:
  87. - command-volumes
  88. - system-volumes
  89. {{end -}}
  90. all-volumes:
  91. image: {{.OS_REPO}}/os-state:{{.VERSION}}{{.SUFFIX}}
  92. labels:
  93. io.rancher.os.createonly: "true"
  94. io.rancher.os.scope: system
  95. log_driver: json-file
  96. net: none
  97. privileged: true
  98. read_only: true
  99. volumes_from:
  100. - container-data-volumes
  101. - command-volumes
  102. - user-volumes
  103. - system-volumes
  104. cloud-init:
  105. image: {{.OS_REPO}}/os-cloudinit:{{.VERSION}}{{.SUFFIX}}
  106. labels:
  107. io.rancher.os.detach: "false"
  108. io.rancher.os.reloadconfig: "true"
  109. io.rancher.os.scope: system
  110. io.rancher.os.after: ntp
  111. net: host
  112. uts: host
  113. privileged: true
  114. volumes_from:
  115. - command-volumes
  116. - system-volumes
  117. cloud-init-pre:
  118. image: {{.OS_REPO}}/os-cloudinit:{{.VERSION}}{{.SUFFIX}}
  119. environment:
  120. - CLOUD_INIT_NETWORK=false
  121. labels:
  122. io.rancher.os.detach: "false"
  123. io.rancher.os.reloadconfig: "true"
  124. io.rancher.os.scope: system
  125. io.rancher.os.after: preload-system-images
  126. net: host
  127. uts: host
  128. privileged: true
  129. volumes_from:
  130. - command-volumes
  131. - system-volumes
  132. command-volumes:
  133. image: {{.OS_REPO}}/os-state:{{.VERSION}}{{.SUFFIX}}
  134. labels:
  135. io.rancher.os.createonly: "true"
  136. io.rancher.os.scope: system
  137. log_driver: json-file
  138. net: none
  139. privileged: true
  140. read_only: true
  141. volumes:
  142. - /usr/bin/docker-containerd:/usr/bin/docker-containerd.dist:ro
  143. - /usr/bin/docker-containerd-shim:/usr/bin/docker-containerd-shim.dist:ro
  144. - /usr/bin/docker-runc:/usr/bin/docker-runc.dist:ro
  145. - /usr/bin/docker:/usr/bin/docker.dist:ro
  146. - /usr/bin/ros:/usr/bin/dockerlaunch:ro
  147. - /usr/bin/ros:/usr/bin/user-docker:ro
  148. - /usr/bin/ros:/usr/bin/system-docker:ro
  149. - /usr/bin/ros:/sbin/poweroff:ro
  150. - /usr/bin/ros:/sbin/reboot:ro
  151. - /usr/bin/ros:/sbin/halt:ro
  152. - /usr/bin/ros:/sbin/shutdown:ro
  153. - /usr/bin/ros:/usr/bin/respawn:ro
  154. - /usr/bin/ros:/usr/bin/ros:ro
  155. - /usr/bin/ros:/usr/bin/cloud-init:ro
  156. - /usr/bin/ros:/usr/sbin/netconf:ro
  157. - /usr/bin/ros:/usr/sbin/wait-for-docker:ro
  158. - /usr/bin/ros:/usr/bin/switch-console:ro
  159. console:
  160. image: {{.OS_REPO}}/os-console:{{.VERSION}}{{.SUFFIX}}
  161. labels:
  162. io.rancher.os.scope: system
  163. io.rancher.os.after: network
  164. io.docker.compose.rebuild: always
  165. io.rancher.os.console: default
  166. net: host
  167. uts: host
  168. pid: host
  169. ipc: host
  170. privileged: true
  171. restart: always
  172. volumes_from:
  173. - all-volumes
  174. volumes:
  175. - /usr/bin/iptables:/sbin/iptables:ro
  176. container-data-volumes:
  177. image: {{.OS_REPO}}/os-state:{{.VERSION}}{{.SUFFIX}}
  178. labels:
  179. io.rancher.os.createonly: "true"
  180. io.rancher.os.scope: system
  181. log_driver: json-file
  182. net: none
  183. privileged: true
  184. read_only: true
  185. volumes:
  186. - /var/lib/docker:/var/lib/docker
  187. - /var/lib/system-docker:/var/lib/system-docker
  188. - /var/lib/rkt:/var/lib/rkt
  189. network-pre:
  190. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  191. command: netconf
  192. labels:
  193. io.rancher.os.scope: system
  194. io.rancher.os.after: cloud-init-pre
  195. net: host
  196. uts: host
  197. pid: host
  198. privileged: true
  199. volumes_from:
  200. - command-volumes
  201. - system-volumes
  202. network:
  203. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  204. command: netconf --stop-network-pre
  205. labels:
  206. io.rancher.os.scope: system
  207. io.rancher.os.after: cloud-init
  208. net: host
  209. uts: host
  210. pid: host
  211. privileged: true
  212. volumes_from:
  213. - command-volumes
  214. - system-volumes
  215. ntp:
  216. image: {{.OS_REPO}}/os-ntp:{{.VERSION}}{{.SUFFIX}}
  217. labels:
  218. io.rancher.os.scope: system
  219. io.rancher.os.after: network-pre
  220. net: host
  221. uts: host
  222. privileged: true
  223. restart: always
  224. preload-system-images:
  225. image: {{.OS_REPO}}/os-preload:{{.VERSION}}{{.SUFFIX}}
  226. labels:
  227. io.rancher.os.detach: "false"
  228. io.rancher.os.scope: system
  229. privileged: true
  230. volumes:
  231. - /var/run/system-docker.sock:/var/run/docker.sock
  232. - /var/lib/system-docker/preload:/mnt/preload
  233. volumes_from:
  234. - command-volumes
  235. - system-volumes
  236. preload-user-images:
  237. image: {{.OS_REPO}}/os-preload:{{.VERSION}}{{.SUFFIX}}
  238. labels:
  239. io.rancher.os.detach: "false"
  240. io.rancher.os.scope: system
  241. io.rancher.os.after: console
  242. privileged: true
  243. volumes:
  244. - /var/run/docker.sock:/var/run/docker.sock
  245. - /var/lib/docker/preload:/mnt/preload
  246. volumes_from:
  247. - command-volumes
  248. - system-volumes
  249. syslog:
  250. image: {{.OS_REPO}}/os-syslog:{{.VERSION}}{{.SUFFIX}}
  251. labels:
  252. io.rancher.os.scope: system
  253. log_driver: json-file
  254. net: host
  255. uts: host
  256. privileged: true
  257. restart: always
  258. volumes_from:
  259. - system-volumes
  260. system-volumes:
  261. image: {{.OS_REPO}}/os-state:{{.VERSION}}{{.SUFFIX}}
  262. labels:
  263. io.rancher.os.createonly: "true"
  264. io.rancher.os.scope: system
  265. log_driver: json-file
  266. net: none
  267. privileged: true
  268. read_only: true
  269. volumes:
  270. - /dev:/host/dev
  271. - /etc/docker:/etc/docker
  272. - /etc/hosts:/etc/hosts
  273. - /etc/resolv.conf:/etc/resolv.conf
  274. - /etc/rkt:/etc/rkt
  275. - /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt.rancher
  276. - /etc/selinux:/etc/selinux
  277. - /lib/firmware:/lib/firmware
  278. - /lib/modules:/lib/modules
  279. - /run:/run
  280. - /usr/share/ros:/usr/share/ros
  281. - /var/lib/rancher/cache:/var/lib/rancher/cache
  282. - /var/lib/rancher/conf:/var/lib/rancher/conf
  283. - /var/lib/rancher:/var/lib/rancher
  284. - /var/log:/var/log
  285. - /var/run:/var/run
  286. udev-cold:
  287. image: {{.OS_REPO}}/os-udev:{{.VERSION}}{{.SUFFIX}}
  288. labels:
  289. io.rancher.os.scope: system
  290. io.rancher.os.before: udev
  291. net: host
  292. uts: host
  293. privileged: true
  294. volumes_from:
  295. - system-volumes
  296. udev:
  297. image: {{.OS_REPO}}/os-udev:{{.VERSION}}{{.SUFFIX}}
  298. environment:
  299. - DAEMON=true
  300. labels:
  301. io.rancher.os.detach: "true"
  302. io.rancher.os.scope: system
  303. net: host
  304. uts: host
  305. privileged: true
  306. restart: always
  307. volumes_from:
  308. - system-volumes
  309. user-volumes:
  310. image: {{.OS_REPO}}/os-state:{{.VERSION}}{{.SUFFIX}}
  311. labels:
  312. io.rancher.os.createonly: "true"
  313. io.rancher.os.scope: system
  314. log_driver: json-file
  315. net: none
  316. privileged: true
  317. read_only: true
  318. volumes:
  319. - /home:/home
  320. - /opt:/opt
  321. docker:
  322. image: {{.OS_REPO}}/os-docker:{{.VERSION}}{{.SUFFIX}}
  323. labels:
  324. io.rancher.os.scope: system
  325. io.rancher.os.after: console
  326. net: host
  327. pid: host
  328. ipc: host
  329. uts: host
  330. privileged: true
  331. restart: always
  332. volumes_from:
  333. - all-volumes
  334. volumes:
  335. - /sys/fs/cgroup:/host/sys/fs/cgroup
  336. system_docker:
  337. exec: true
  338. args: [daemon, --log-opt, max-size=25m, --log-opt, max-file=2, -s, overlay, -b, docker-sys,
  339. --fixed-cidr, 172.18.42.1/16, --restart=false, -g, /var/lib/system-docker, -G, root,
  340. -H, 'unix:///var/run/system-docker.sock', --userland-proxy=false]
  341. upgrade:
  342. url: {{.OS_RELEASES_YML}}
  343. image: {{.OS_REPO}}/os
  344. docker:
  345. tls_args: [--tlsverify, --tlscacert=/etc/docker/tls/ca.pem, --tlscert=/etc/docker/tls/server-cert.pem, --tlskey=/etc/docker/tls/server-key.pem,
  346. '-H=0.0.0.0:2376']
  347. args: [daemon, --log-opt, max-size=25m, --log-opt, max-file=2, -s, overlay, -G, docker, -H, 'unix:///var/run/docker.sock']