-
Notifications
You must be signed in to change notification settings - Fork 12
/
masterinstall.sls
118 lines (102 loc) · 2.36 KB
/
masterinstall.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#Download etcd
etcd-install:
archive.extracted:
- name: /opt/
- source: https://github.com/coreos/etcd/releases/download/v2.0.5/etcd-v2.0.5-linux-amd64.tar.gz
- source_hash: md5=4d8ccff28c383980b52397a7664b3342
- archive_format: tar
- user: root
- group: root
- if_missing: /opt/etcd-v2.0.5-linux-amd64/
#Make symlink for etcdctl
/usr/local/bin/etcdctl:
file.symlink:
- target: /opt/etcd-v2.0.5-linux-amd64/etcdctl
/usr/lib/systemd/system/etcd.service:
file:
- managed
- source: salt://systemd/etcd.service
- user: root
- group: root
- mode: 755
etcd:
service:
- running
- enable: true
#Make the kubernetes binary directory
/opt/kubernetes:
file.directory:
- user: root
- group: root
- dir_mode: 755
- file_mode: 755
#Pull down Kubernetes Binaries
/opt/kubernetes/kubectl:
file:
- managed
- source: salt://kube_binaries/kubectl
- user: root
- group: root
- mode: 755
/opt/kubernetes/kube-apiserver:
file:
- managed
- source: salt://kube_binaries/kube-apiserver
- user: root
- group: root
- mode: 755
/opt/kubernetes/kube-controller-manager:
file:
- managed
- source: salt://kube_binaries/kube-controller-manager
- user: root
- group: root
- mode: 755
/opt/kubernetes/kube-scheduler:
file:
- managed
- source: salt://kube_binaries/kube-scheduler
- user: root
- group: root
- mode: 755
#Pull down Systemd Service definitions
/usr/lib/systemd/system/kube-apiserver.service:
file:
- managed
- source: salt://systemd/kube-apiserver.service
- user: root
- group: root
- mode: 755
/usr/lib/systemd/system/kube-controller.service:
file:
- managed
- source: salt://systemd/kube-controller.service
- user: root
- group: root
- mode: 755
/usr/lib/systemd/system/kube-scheduler.service:
file:
- managed
- source: salt://systemd/kube-scheduler.service
- user: root
- group: root
- mode: 755
#Start Kubernetes services
kube-apiserver:
service:
- running
- enable: true
- watch:
- file: /usr/lib/systemd/system/kube-apiserver.service
kube-controller:
service:
- running
- enable: true
kube-scheduler:
service:
- running
- enable: true
#Make symlink for kubectl
/usr/local/bin/kubectl:
file.symlink:
- target: /opt/kubernetes/kubectl