os-config.tpl.yml 9.3 KB

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