1
1
---
2
- title : " Installation"
3
- linkTitle : " Installation"
4
- date : 2020-03-25
2
+ title : Installation
3
+ linkTitle : Installation
5
4
weight : 2
6
5
description : Install the Operator SDK CLI
7
6
---
@@ -24,87 +23,60 @@ description: Install the Operator SDK CLI
24
23
If you are using [ Homebrew] [ homebrew_tool ] , you can install the SDK CLI tool with the following command:
25
24
26
25
``` sh
27
- $ brew install operator-sdk
26
+ brew install operator-sdk
28
27
```
29
28
30
29
## Install from GitHub release
31
30
32
31
### Download the release binaries
33
32
34
33
``` sh
35
- # Set the release version variable
36
- $ RELEASE_VERSION=v1.1.0
37
34
# Linux
38
- $ curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION} /operator-sdk-${RELEASE_VERSION} -x86_64-linux-gnu
39
- $ curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION} /ansible-operator-${RELEASE_VERSION} -x86_64-linux-gnu
40
- $ curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION} /helm-operator-${RELEASE_VERSION} -x86_64-linux-gnu
35
+ curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/latest/download/operator-sdk_" $( uname -m) " _linux
41
36
# macOS
42
- $ curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION} /operator-sdk-${RELEASE_VERSION} -x86_64-apple-darwin
43
- $ curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION} /ansible-operator-${RELEASE_VERSION} -x86_64-apple-darwin
44
- $ curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION} /helm-operator-${RELEASE_VERSION} -x86_64-apple-darwin
37
+ curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/latest/download/operator-sdk_" $( uname -m) " _darwin
45
38
```
46
39
47
40
#### Verify the downloaded release binaries
48
41
49
42
``` sh
50
- # Linux
51
- $ curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION} /operator-sdk-${RELEASE_VERSION} -x86_64-linux-gnu.asc
52
- $ curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION} /ansible-operator-${RELEASE_VERSION} -x86_64-linux-gnu.asc
53
- $ curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION} /helm-operator-${RELEASE_VERSION} -x86_64-linux-gnu.asc
54
- # macOS
55
- $ curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION} /operator-sdk-${RELEASE_VERSION} -x86_64-apple-darwin.asc
56
- $ curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION} /ansible-operator-${RELEASE_VERSION} -x86_64-apple-darwin.asc
57
- $ curl -LO https://github.com/operator-framework/operator-sdk/releases/download/${RELEASE_VERSION} /helm-operator-${RELEASE_VERSION} -x86_64-apple-darwin.asc
43
+ curl -LO https://github.com/operator-framework/operator-sdk/releases/latest/download/checksums.txt
58
44
```
59
45
60
46
To verify a release binary using the provided asc files, place the binary and corresponding asc file into the same directory and use the corresponding command:
61
47
62
48
``` sh
63
- # Linux
64
- $ gpg --verify operator-sdk-${RELEASE_VERSION} -x86_64-linux-gnu.asc
65
- $ gpg --verify ansible-operator-${RELEASE_VERSION} -x86_64-linux-gnu.asc
66
- $ gpg --verify helm-operator-${RELEASE_VERSION} -x86_64-linux-gnu.asc
67
- # macOS
68
- $ gpg --verify operator-sdk-${RELEASE_VERSION} -x86_64-apple-darwin.asc
69
- $ gpg --verify ansible-operator-${RELEASE_VERSION} -x86_64-apple-darwin.asc
70
- $ gpg --verify helm-operator-${RELEASE_VERSION} -x86_64-apple-darwin.asc
49
+ gpg --verify ./operator-sdk
71
50
```
72
51
73
52
If you do not have the maintainers public key on your machine, you will get an error message similar to this:
74
53
75
- ``` sh
76
- $ gpg --verify operator-sdk- ${RELEASE_VERSION} -x86_64-apple-darwin.asc
77
- $ gpg: assuming signed data in ' operator-sdk-${RELEASE_VERSION}-x86_64-apple-darwin '
78
- $ gpg: Signature made Fri Apr 5 20:03:22 2019 CEST
79
- $ gpg: using RSA key < KEY_ID>
80
- $ gpg: Can' t check signature: No public key
54
+ ``` console
55
+ $ gpg --verify operator-sdk
56
+ gpg: assuming signed data in './ operator-sdk.asc '
57
+ gpg: Signature made Fri Apr 5 20:03:22 2019 CEST
58
+ gpg: using RSA key <KEY_ID>
59
+ gpg: Can\ 't check signature: No public key
81
60
```
82
61
83
- To download the key, use the following command, replacing `$KEY_ID` with the RSA key string provided in the output of the previous command:
62
+ To download the key, use the following command, replacing ` $KEY_ID ` with the " RSA key" string provided in the output of the previous command:
84
63
85
64
``` sh
86
- $ gpg --recv-key "$KEY_ID"
65
+ gpg --recv-key " $KEY_ID "
87
66
```
88
67
89
68
You'll need to specify a key server if one hasn't been configured. For example:
90
69
91
70
``` sh
92
- $ gpg --keyserver keyserver.ubuntu.com --recv-key "$KEY_ID"
71
+ gpg --keyserver keyserver.ubuntu.com --recv-key " $KEY_ID "
93
72
```
94
73
95
74
Now you should be able to verify the binary.
96
75
97
76
### Install the release binary in your PATH
98
77
99
78
``` sh
100
- # Linux
101
- $ chmod +x operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu && sudo mkdir -p /usr/local/bin/ && sudo cp operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu /usr/local/bin/operator-sdk && rm operator-sdk-${RELEASE_VERSION}-x86_64-linux-gnu
102
- $ chmod +x ansible-operator-${RELEASE_VERSION}-x86_64-linux-gnu && sudo mkdir -p /usr/local/bin/ && sudo cp ansible-operator-${RELEASE_VERSION}-x86_64-linux-gnu /usr/local/bin/ansible-operator && rm ansible-operator-${RELEASE_VERSION}-x86_64-linux-gnu
103
- $ chmod +x helm-operator-${RELEASE_VERSION}-x86_64-linux-gnu && sudo mkdir -p /usr/local/bin/ && sudo cp helm-operator-${RELEASE_VERSION}-x86_64-linux-gnu /usr/local/bin/helm-operator && rm helm-operator-${RELEASE_VERSION}-x86_64-linux-gnu
104
- # macOS
105
- $ chmod +x operator-sdk-${RELEASE_VERSION}-x86_64-apple-darwin && sudo mkdir -p /usr/local/bin/ && sudo cp operator-sdk-${RELEASE_VERSION}-x86_64-apple-darwin /usr/local/bin/operator-sdk && rm operator-sdk-${RELEASE_VERSION}-x86_64-apple-darwin
106
- $ chmod +x ansible-operator-${RELEASE_VERSION}-x86_64-apple-darwin && sudo mkdir -p /usr/local/bin/ && sudo cp ansible-operator-${RELEASE_VERSION}-x86_64-apple-darwin /usr/local/bin/ansible-operator && rm ansible-operator-${RELEASE_VERSION}-x86_64-apple-darwin
107
- $ chmod +x helm-operator-${RELEASE_VERSION}-x86_64-apple-darwin && sudo mkdir -p /usr/local/bin/ && sudo cp helm-operator-${RELEASE_VERSION}-x86_64-apple-darwin /usr/local/bin/helm-operator && rm helm-operator-${RELEASE_VERSION}-x86_64-apple-darwin
79
+ chmod +x operator-sdk && sudo mv operator-sdk /usr/local/bin/
108
80
```
109
81
110
82
## Compile and install from master
@@ -117,11 +89,11 @@ $ chmod +x helm-operator-${RELEASE_VERSION}-x86_64-apple-darwin && sudo mkdir -p
117
89
- [ go] [ go_tool ] version v1.15+.
118
90
119
91
``` sh
120
- $ git clone https://github.com/operator-framework/operator-sdk
121
- $ cd operator-sdk
122
- $ git checkout master
123
- $ make tidy
124
- $ make install
92
+ git clone https://github.com/operator-framework/operator-sdk
93
+ cd operator-sdk
94
+ git checkout master
95
+ make tidy
96
+ make install
125
97
```
126
98
127
99
** Note:** Ensure that your ` GOPROXY ` is set with its default value for Go
0 commit comments