os-config.tpl.yml 11 KB

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