forked from nishanthvasudevan/kubernetes-distro-packages
-
Notifications
You must be signed in to change notification settings - Fork 3
/
upstart_kubernetes.sh
executable file
·166 lines (154 loc) · 6.05 KB
/
upstart_kubernetes.sh
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#!/bin/bash
set -ex
K8S_VERSION=${K8S_VERSION:-1.1.2}
rm -f kubernetes/builds/kubernetes-*_${K8S_VERSION}_amd64.deb
pushd kubernetes/source/kubernetes/v$K8S_VERSION
tar xfvz kubernetes-server-linux-amd64.tar.gz
popd
fpm -s dir -n "kubernetes-common" \
-p kubernetes/builds \
-C ./kubernetes/common -v $K8S_VERSION \
-t deb \
-a amd64 \
-d "dpkg (>= 1.17)" \
--before-install kubernetes/common/scripts/deb/before-install.sh \
--license "Apache Software License 2.0" \
--maintainer "Helion Stackato <[email protected]>" \
--vendor "Hewlett Packard Enterprise" \
--description "Kubernetes Common" \
--url "http://www.stackato.com" \
etc/kubernetes/manifests
fpm -s dir -n "kubernetes-apiserver" \
-p kubernetes/builds \
-C ./kubernetes/apiserver -v $K8S_VERSION \
-t deb \
-a amd64 \
-d "dpkg (>= 1.17)" \
-d "kubernetes-common (= $K8S_VERSION)" \
--license "Apache Software License 2.0" \
--maintainer "Helion Stackato <[email protected]>" \
--vendor "Hewlett Packard Enterprise" \
--description "Kubernetes API Server" \
--url "http://www.stackato.com" \
--after-install kubernetes/apiserver/scripts/deb/after-install.sh \
--before-remove kubernetes/apiserver/scripts/deb/before-remove.sh \
--deb-upstart kubernetes/apiserver/services/upstart/kube-apiserver \
--deb-default kubernetes/apiserver/initd_config/kube-apiserver \
../source/kubernetes/v$K8S_VERSION/kubernetes/server/bin/kube-apiserver=/usr/bin/kube-apiserver
fpm -s dir -n "kubernetes-controller-manager" \
-p kubernetes/builds \
-C ./kubernetes/controller-manager -v $K8S_VERSION \
-t deb \
-a amd64 \
-d "dpkg (>= 1.17)" \
-d "kubernetes-common (= $K8S_VERSION)" \
--license "Apache Software License 2.0" \
--maintainer "Helion Stackato <[email protected]>" \
--vendor "Hewlett Packard Enterprise" \
--description "Kubernetes Controller Manager" \
--url "http://www.stackato.com" \
--after-install kubernetes/controller-manager/scripts/deb/after-install.sh \
--before-remove kubernetes/controller-manager/scripts/deb/before-remove.sh \
--deb-upstart kubernetes/controller-manager/services/upstart/kube-controller-manager \
--deb-default kubernetes/controller-manager/initd_config/kube-controller-manager \
../source/kubernetes/v$K8S_VERSION/kubernetes/server/bin/kube-controller-manager=/usr/bin/kube-controller-manager
fpm -s dir -n "kubernetes-proxy" \
-p kubernetes/builds \
-C ./kubernetes/proxy -v $K8S_VERSION \
-t deb \
-a amd64 \
-d "dpkg (>= 1.17)" \
-d "kubernetes-common (= $K8S_VERSION)" \
--license "Apache Software License 2.0" \
--maintainer "Helion Stackato <[email protected]>" \
--vendor "Hewlett Packard Enterprise" \
--description "Kubernetes Proxy" \
--url "http://www.stackato.com" \
--after-install kubernetes/proxy/scripts/deb/after-install.sh \
--before-remove kubernetes/proxy/scripts/deb/before-remove.sh \
--deb-upstart kubernetes/proxy/services/upstart/kube-proxy \
--deb-default kubernetes/proxy/initd_config/kube-proxy \
../source/kubernetes/v$K8S_VERSION/kubernetes/server/bin/kube-proxy=/usr/bin/kube-proxy
fpm -s dir -n "kubernetes-scheduler" \
-p kubernetes/builds \
-C ./kubernetes/scheduler -v $K8S_VERSION \
-t deb \
-a amd64 \
-d "dpkg (>= 1.17)" \
-d "kubernetes-common (= $K8S_VERSION)" \
--license "Apache Software License 2.0" \
--maintainer "Helion Stackato <[email protected]>" \
--vendor "Hewlett Packard Enterprise" \
--description "Kubernetes Scheduler" \
--url "http://www.stackato.com" \
--after-install kubernetes/scheduler/scripts/deb/after-install.sh \
--before-remove kubernetes/scheduler/scripts/deb/before-remove.sh \
--deb-upstart kubernetes/scheduler/services/upstart/kube-scheduler \
--deb-default kubernetes/scheduler/initd_config/kube-scheduler \
../source/kubernetes/v$K8S_VERSION/kubernetes/server/bin/kube-scheduler=/usr/bin/kube-scheduler
fpm -s dir -n "kubernetes-kubectl" \
-p kubernetes/builds \
-C ./kubernetes/kubectl -v $K8S_VERSION \
-t deb \
-a amd64 \
-d "dpkg (>= 1.17)" \
-d "kubernetes-common (= $K8S_VERSION)" \
--license "Apache Software License 2.0" \
--maintainer "Helion Stackato <[email protected]>" \
--vendor "Hewlett Packard Enterprise" \
--description "Kubernetes Kubectl" \
--url "http://www.stackato.com" \
../source/kubernetes/v$K8S_VERSION/kubernetes/server/bin/kubectl=/usr/bin/kubectl
fpm -s dir -n "kubernetes-kubelet" \
-p kubernetes/builds \
-C ./kubernetes/kubelet -v $K8S_VERSION \
-t deb \
-a amd64 \
-d "dpkg (>= 1.17)" \
-d "kubernetes-common (= $K8S_VERSION)" \
--deb-pre-depends "openssl" \
--license "Apache Software License 2.0" \
--maintainer "Helion Stackato <[email protected]>" \
--vendor "Hewlett Packard Enterprise" \
--description "Kubernetes Kubelet" \
--url "http://www.stackato.com" \
--after-install kubernetes/kubelet/scripts/deb/after-install.sh \
--before-remove kubernetes/kubelet/scripts/deb/before-remove.sh \
--deb-upstart kubernetes/kubelet/services/upstart/kubelet \
--deb-default kubernetes/kubelet/initd_config/kubelet \
../source/kubernetes/v$K8S_VERSION/kubernetes/server/bin/kubelet=/usr/bin/kubelet
## Meta packages for backwards compat
fpm -s dir -n "kubernetes-master" \
-p kubernetes/builds \
-v $K8S_VERSION \
-t deb \
-a amd64 \
-d "dpkg (>= 1.17)" \
-d "kubernetes-common (= $K8S_VERSION)" \
-d "kubernetes-apiserver (= $K8S_VERSION)" \
-d "kubernetes-controller-manager (= $K8S_VERSION)" \
-d "kubernetes-scheduler (= $K8S_VERSION)" \
-d "kubernetes-kubectl (= $K8S_VERSION)" \
-d "kubernetes-kubelet (= $K8S_VERSION)" \
--license "Apache Software License 2.0" \
--maintainer "Helion Stackato <[email protected]>" \
--vendor "Hewlett Packard Enterprise" \
--description "Kubernetes Master Metapackage" \
--url "http://www.stackato.com" \
-s empty
fpm -s dir -n "kubernetes-node" \
-p kubernetes/builds \
-v $K8S_VERSION \
-t deb \
-a amd64 \
-d "dpkg (>= 1.17)" \
-d "kubernetes-common (= $K8S_VERSION)" \
-d "kubernetes-proxy (= $K8S_VERSION)" \
-d "kubernetes-kubectl (= $K8S_VERSION)" \
-d "kubernetes-kubelet (= $K8S_VERSION)" \
--license "Apache Software License 2.0" \
--maintainer "Helion Stackato <[email protected]>" \
--vendor "Hewlett Packard Enterprise" \
--description "Kubernetes Node Metapackage" \
--url "http://www.stackato.com" \
-s empty