os-config.tpl.yml 10 KB

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