os-config.tpl.yml 12 KB

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