os-config.tpl.yml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  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.6
  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. ntp:
  192. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  193. command: ntpd --nofork -g
  194. labels:
  195. io.rancher.os.scope: system
  196. io.rancher.os.after: network
  197. net: host
  198. uts: host
  199. privileged: true
  200. restart: always
  201. volumes_from:
  202. - command-volumes
  203. - system-volumes
  204. preload-user-images:
  205. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  206. command: ros preload-images
  207. labels:
  208. io.rancher.os.detach: "false"
  209. io.rancher.os.scope: system
  210. io.rancher.os.after: console
  211. privileged: true
  212. volumes_from:
  213. - command-volumes
  214. - system-volumes
  215. syslog:
  216. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  217. command: rsyslogd -n
  218. labels:
  219. io.rancher.os.scope: system
  220. log_driver: json-file
  221. net: host
  222. uts: host
  223. privileged: true
  224. restart: always
  225. volumes_from:
  226. - command-volumes
  227. - system-volumes
  228. system-volumes:
  229. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  230. command: echo
  231. labels:
  232. io.rancher.os.createonly: "true"
  233. io.rancher.os.scope: system
  234. log_driver: json-file
  235. net: none
  236. privileged: true
  237. read_only: true
  238. volumes:
  239. - /dev:/host/dev
  240. - /etc/docker:/etc/docker
  241. - /etc/hosts:/etc/hosts
  242. - /etc/resolv.conf:/etc/resolv.conf
  243. - /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt.rancher
  244. - /etc/selinux:/etc/selinux
  245. - /lib/firmware:/lib/firmware
  246. - /lib/modules:/lib/modules
  247. - /run:/run
  248. - /usr/share/ros:/usr/share/ros
  249. - /var/lib/rancher/cache:/var/lib/rancher/cache
  250. - /var/lib/rancher/conf:/var/lib/rancher/conf
  251. - /var/lib/rancher:/var/lib/rancher
  252. - /var/log:/var/log
  253. - /var/run:/var/run
  254. udev-cold:
  255. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  256. command: ros udev-settle
  257. labels:
  258. io.rancher.os.detach: "false"
  259. io.rancher.os.scope: system
  260. net: host
  261. uts: host
  262. privileged: true
  263. volumes_from:
  264. - command-volumes
  265. - system-volumes
  266. udev:
  267. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  268. command: udevd
  269. labels:
  270. io.rancher.os.detach: "true"
  271. io.rancher.os.scope: system
  272. io.rancher.os.after: udev-cold
  273. net: host
  274. uts: host
  275. privileged: true
  276. restart: always
  277. volumes_from:
  278. - command-volumes
  279. - system-volumes
  280. user-volumes:
  281. image: {{.OS_REPO}}/os-base:{{.VERSION}}{{.SUFFIX}}
  282. command: echo
  283. labels:
  284. io.rancher.os.createonly: "true"
  285. io.rancher.os.scope: system
  286. log_driver: json-file
  287. net: none
  288. privileged: true
  289. read_only: true
  290. volumes:
  291. - /home:/home
  292. - /opt:/opt
  293. docker:
  294. {{if eq "amd64" .ARCH -}}
  295. image: {{.OS_REPO}}/os-docker:1.12.6{{.SUFFIX}}
  296. {{else -}}
  297. image: {{.OS_REPO}}/os-docker:1.11.2{{.SUFFIX}}
  298. {{end -}}
  299. command: ros user-docker
  300. environment:
  301. - HTTP_PROXY
  302. - HTTPS_PROXY
  303. - NO_PROXY
  304. labels:
  305. io.rancher.os.scope: system
  306. io.rancher.os.after: console
  307. net: host
  308. pid: host
  309. ipc: host
  310. uts: host
  311. privileged: true
  312. restart: always
  313. volumes_from:
  314. - all-volumes
  315. volumes:
  316. - /sys:/host/sys
  317. - /var/lib/system-docker:/var/lib/system-docker:shared
  318. system_docker:
  319. exec: true
  320. storage_driver: overlay
  321. restart: false
  322. graph: /var/lib/system-docker
  323. group: root
  324. host: ["unix:///var/run/system-docker.sock"]
  325. pid_file: /var/run/system-docker.pid
  326. exec_root: /var/run/system-docker
  327. config_file: /etc/docker/system-docker.json
  328. userland_proxy: false
  329. log_opts:
  330. max-size: 25m
  331. max-file: 2
  332. upgrade:
  333. url: {{.OS_RELEASES_YML}}/releases{{.SUFFIX}}.yml
  334. image: {{.OS_REPO}}/os
  335. docker:
  336. {{if eq "amd64" .ARCH -}}
  337. engine: docker-1.12.6
  338. {{else -}}
  339. engine: docker-1.11.2
  340. {{end -}}
  341. storage_driver: overlay
  342. group: docker
  343. host: ["unix:///var/run/docker.sock"]
  344. log_opts:
  345. max-size: 25m
  346. max-file: 2
  347. tls_args: [--tlsverify, --tlscacert=/etc/docker/tls/ca.pem, --tlscert=/etc/docker/tls/server-cert.pem, --tlskey=/etc/docker/tls/server-key.pem,
  348. '-H=0.0.0.0:2376']