os-config.tpl.yml 11 KB

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