forked from nishanthvasudevan/kubernetes-distro-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_kubernetes.sh
executable file
·135 lines (121 loc) · 5.23 KB
/
build_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
#!/bin/bash
#build_deb_master
# deb
# /etc/init.d/
# --deb-init FILEPATH (deb only) Add FILEPATH as an init script
# --deb-default FILEPATH (deb only) Add FILEPATH as /etc/default configuration
# --deb-upstart FILEPATH (deb only) Add FILEPATH as an upstart script
fpm -s dir -n "kubernetes-master" \
-p kubernetes/builds \
-C ./kubernetes/master -v 0.17.0 \
-t deb \
-a amd64 \
-d "dpkg (>= 1.17)" \
--after-install kubernetes/master/scripts/deb/after-install.sh \
--before-install kubernetes/master/scripts/deb/before-install.sh \
--after-remove kubernetes/master/scripts/deb/after-remove.sh \
--before-remove kubernetes/master/scripts/deb/before-remove.sh \
--deb-init kubernetes/master/services/initd/kube-apiserver \
--deb-init kubernetes/master/services/initd/kube-controller-manager \
--deb-init kubernetes/master/services/initd/kube-scheduler \
--deb-init kubernetes/master/services/initd/kubelet \
--deb-default kubernetes/master/initd_config/kube-apiserver \
--deb-default kubernetes/master/initd_config/kube-controller-manager \
--deb-default kubernetes/master/initd_config/kube-scheduler \
--deb-default kubernetes/master/initd_config/kubelet \
--license "Apache Software License 2.0" \
--maintainer "Kismatic, Inc. <[email protected]>" \
--vendor "Kismatic, Inc." \
--description "Kubernetes master binaries and services" \
--url "https://www.kismatic.com" \
../source/kubernetes/server/bin=/usr \
etc/kubernetes/manifests
# post launch script for addons
# skydns enable
# Kubernetes installs do not configure the nodes' resolv.conf files to use the cluster DNS by default, because that process is inherently environment-specific.
# This should probably be implemented eventually.
#build_deb_node
# services
# deps etcd, docker (etcd.service, docker.service)
# kube-proxy.service
# kube-kubelet.service
# cadvisor.service?
# TODO later
# /var/lib/kubelet/kubernetes_auth
# {"BearerToken": "SF839TwEqeyO2mwbOtQMZFJ8nQIu7asb", "Insecure": true }
fpm -s dir -n "kubernetes-node" \
-p kubernetes/builds \
-C ./kubernetes/node -v 0.17.0 \
-t deb \
-a amd64 \
-d "dpkg (>= 1.17)" \
--after-install kubernetes/node/scripts/deb/after-install.sh \
--before-install kubernetes/node/scripts/deb/before-install.sh \
--after-remove kubernetes/node/scripts/deb/after-remove.sh \
--before-remove kubernetes/node/scripts/deb/before-remove.sh \
--deb-default kubernetes/node/initd_config/kubelet \
--deb-default kubernetes/node/initd_config/kube-proxy \
--deb-init kubernetes/node/services/initd/kubelet \
--deb-init kubernetes/node/services/initd/kube-proxy \
--license "Apache Software License 2.0" \
--maintainer "Kismatic, Inc. <[email protected]>" \
--vendor "Kismatic, Inc." \
--description "Kubernetes node binaries and services" \
--url "https://www.kismatic.com" \
../source/kubernetes/server/bin/kubelet=/usr/bin/kubelet \
../source/kubernetes/server/bin/kube-proxy=/usr/bin/kube-proxy \
etc/kubernetes/manifests
# build_rpm_master
# rpm
# /lib/systemd/system
fpm -s dir -n "kubernetes-master" \
-p kubernetes/builds \
-C ./kubernetes/master -v 0.17.0 \
-d 'docker >= 1.3.0' \
-t rpm --rpm-os linux \
-a x86_64 \
--after-install kubernetes/master/scripts/rpm/after-install.sh \
--before-install kubernetes/master/scripts/rpm/before-install.sh \
--after-remove kubernetes/master/scripts/rpm/after-remove.sh \
--before-remove kubernetes/master/scripts/rpm/before-remove.sh \
--config-files etc/kubernetes/master \
--license "Apache Software License 2.0" \
--maintainer "Kismatic, Inc. <[email protected]>" \
--vendor "Kismatic, Inc." \
--description "Kubernetes master binaries and services" \
--url "https://www.kismatic.com" \
../source/kubernetes/server/bin=/usr \
services/systemd/kube-apiserver.service=/lib/systemd/system/kube-apiserver.service \
services/systemd/kube-controller-manager.service=/lib/systemd/system/kube-controller-manager.service \
services/systemd/kube-scheduler.service=/lib/systemd/system/kube-scheduler.service \
services/systemd/kubelet.service=/lib/systemd/system/kubelet.service \
etc/kubernetes/master/kubelet.conf \
etc/kubernetes/master/apiserver.conf \
etc/kubernetes/master/config.conf \
etc/kubernetes/master/controller-manager.conf \
etc/kubernetes/master/scheduler.conf \
etc/kubernetes/manifests
fpm -s dir -n "kubernetes-node" \
-p kubernetes/builds \
-C ./kubernetes/node -v 0.17.0 \
-d 'docker >= 1.3.0' \
-a x86_64 \
-t rpm --rpm-os linux \
--after-install kubernetes/node/scripts/rpm/after-install.sh \
--before-install kubernetes/node/scripts/rpm/before-install.sh \
--after-remove kubernetes/node/scripts/rpm/after-remove.sh \
--before-remove kubernetes/node/scripts/rpm/before-remove.sh \
--config-files etc/kubernetes/node \
--license "Apache Software License 2.0" \
--maintainer "Kismatic, Inc. <[email protected]>" \
--vendor "Kismatic, Inc." \
--description "Kubernetes node binaries and services" \
--url "https://www.kismatic.com" \
etc/kubernetes/node/config.conf \
etc/kubernetes/node/kubelet.conf \
etc/kubernetes/node/kube-proxy.conf \
services/systemd/kubelet.service=/lib/systemd/system/kubelet.service \
services/systemd/kube-proxy.service=/lib/systemd/system/kube-proxy.service \
../source/kubernetes/server/bin/kubelet=/usr/bin/kubelet \
../source/kubernetes/server/bin/kube-proxy=/usr/bin/kube-proxy \
etc/kubernetes/manifests