-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoperator_sdk_install.sh
executable file
·66 lines (29 loc) · 1.45 KB
/
operator_sdk_install.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
#!/bin/sh
export ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac)
export OS=$(uname | awk '{print tolower($0)}')
export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/v1.26.0
curl -LO ${OPERATOR_SDK_DL_URL}/operator-sdk_${OS}_${ARCH}
gpg --keyserver keyserver.ubuntu.com --recv-keys 052996E2A20B5C7E
curl -LO ${OPERATOR_SDK_DL_URL}/checksums.txt
curl -LO ${OPERATOR_SDK_DL_URL}/checksums.txt.asc
gpg -u "Operator SDK (release) <cncf-operator-sdk@cncf.io>" --verify checksums.txt.asc
grep operator-sdk_${OS}_${ARCH} checksums.txt | sha256sum -c -
chmod +x operator-sdk_${OS}_${ARCH} && sudo mv operator-sdk_${OS}_${ARCH} /usr/local/bin/operator-sdk
mkdir -p go_package
pushd go_package
wget https://go.dev/dl/go1.19.4.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.4.linux-amd64.tar.gz
popd
mkdir -p docker_package
pushd docker_package
wget https://download.docker.com/linux/static/stable/x86_64/docker-20.10.22.tgz
tar -xvzf docker-20.10.22.tgz
sudo cp docker/* /usr/bin/
wget https://raw.githubusercontent.com/moby/moby/master/contrib/init/systemd/docker.service
sudo cp docker.service /etc/systemd/system/
wget https://raw.githubusercontent.com/moby/moby/master/contrib/init/systemd/docker.socket
sudo cp docker.socket /etc/systemd/system/
popd
groupadd docker
usermod -aG docker netest
systemctl enable --now docker