os-config.tpl.yml 10 KB

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