os-config.tpl.yml 9.3 KB

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