-
Notifications
You must be signed in to change notification settings - Fork 12
/
minion1.sls
94 lines (83 loc) · 1.74 KB
/
minion1.sls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#Pull down docker config file
/etc/sysconfig/docker:
file.managed:
- source: salt://minion1/docker
- user: root
- group: root
- mode: 755
#Install docker, enable it, and run it
docker:
pkg:
- installed
service:
- running
- watch:
- file: /etc/sysconfig/docker
- enable: true
#Make the kubernetes binary directory
/opt/kubernetes:
file.directory:
- user: root
- group: root
- dir_mode: 755
- file_mode: 755
#Setup and copy down the manifests
/etc/kubernetes:
file.directory:
- user: root
- group: root
- dir_mode: 755
- file_mode: 755
/etc/kubernetes/manifests:
file.directory:
- user: root
- group: root
- dir_mode: 755
- file_mode: 755
/etc/kubernetes/manifests/fluentd.yaml:
file.managed:
- source: salt://manifests/fluentd.yaml
- user: root
- group: root
- mode: 755
#Pull down kubernetes binaries
/opt/kubernetes/kube-proxy:
file:
- managed
- source: salt://kube_binaries/kube-proxy
- user: root
- group: root
- mode: 755
/opt/kubernetes/kubelet:
file:
- managed
- source: salt://kube_binaries/kubelet
- user: root
- group: root
- mode: 755
#Pull down systemd service definitions
/usr/lib/systemd/system/kube-proxy.service:
file:
- managed
- source: salt://systemd/kube-proxy.service
- user: root
- group: root
- mode: 755
/usr/lib/systemd/system/kube-kubelet.service:
file:
- managed
- source: salt://minion1/kube-kubelet.service
- user: root
- group: root
- mode: 755
#Start Kubernetes services
kube-proxy:
service:
- running
- enable: true
kube-kubelet:
service:
- running
- enable: true
- watch:
- file: /etc/kubernetes/manifests/*