Skip to content

Commit 3236da1

Browse files
committed
OCPBUGS#11575: Document Operator SDK installation for macOS
1 parent 53aa633 commit 3236da1

File tree

4 files changed

+86
-3
lines changed

4 files changed

+86
-3
lines changed

cli_reference/osdk/cli-osdk-install.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ toc::[]
88

99
The Operator SDK provides a command-line interface (CLI) tool that Operator developers can use to build, test, and deploy an Operator. You can install the Operator SDK CLI on your workstation so that you are prepared to start authoring your own Operators.
1010

11-
Operator authors with cluster administrator access to a Kubernetes-based cluster, such as {product-title}, can use the Operator SDK CLI to develop their own Operators based on Go, Ansible, or Helm. link:https://kubebuilder.io/[Kubebuilder] is embedded into the Operator SDK as the scaffolding solution for Go-based Operators, which means existing Kubebuilder projects can be used as is with the Operator SDK and continue to work.
11+
Operator authors with cluster administrator access to a Kubernetes-based cluster, such as {product-title}, can use the Operator SDK CLI to develop their own Operators based on Go, Ansible, Java, or Helm. link:https://kubebuilder.io/[Kubebuilder] is embedded into the Operator SDK as the scaffolding solution for Go-based Operators, which means existing Kubebuilder projects can be used as is with the Operator SDK and continue to work.
1212

1313
See xref:../../operators/operator_sdk/osdk-about.adoc#osdk-about[Developing Operators] for full documentation on the Operator SDK.
1414

@@ -18,3 +18,5 @@ See xref:../../operators/operator_sdk/osdk-about.adoc#osdk-about[Developing Oper
1818
====
1919

2020
include::modules/osdk-installing-cli-linux-macos.adoc[leveloffset=+1]
21+
22+
include::modules/osdk-installing-cli-macos.adoc[leveloffset=+1]

modules/osdk-installing-cli-linux-macos.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
:_content-type: PROCEDURE
77
[id="osdk-installing-cli-linux-macos_{context}"]
8-
= Installing the Operator SDK CLI
8+
= Installing the Operator SDK CLI on Linux
99

1010
You can install the OpenShift SDK CLI tool on Linux.
1111

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * cli_reference/osdk/cli-osdk-install.adoc
4+
// * operators/operator_sdk/osdk-installing-cli.adoc
5+
6+
:_content-type: PROCEDURE
7+
[id="osdk-installing-cli-macos_{context}"]
8+
= Installing the Operator SDK CLI on macOS
9+
10+
You can install the OpenShift SDK CLI tool on macOS.
11+
12+
.Prerequisites
13+
14+
* link:https://golang.org/dl/[Go] v1.19+
15+
ifdef::openshift-origin[]
16+
* link:https://docs.docker.com/install/[`docker`] v17.03+, link:https://github.com/containers/libpod/blob/master/install.md[`podman`] v1.2.0+, or link:https://github.com/containers/buildah/blob/master/install.md[`buildah`] v1.7+
17+
endif::[]
18+
ifndef::openshift-origin[]
19+
* `docker` v17.03+, `podman` v1.9.3+, or `buildah` v1.7+
20+
endif::[]
21+
22+
.Procedure
23+
24+
. For the `amd64` and `arm64` architectures, navigate to the link:https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/operator-sdk/[OpenShift mirror site for the `amd64` architecture] and link:https://mirror.openshift.com/pub/openshift-v4/arm64/clients/operator-sdk/[OpenShift mirror site for the `arm64` architecture] respectively.
25+
26+
. From the latest {product-version} directory, download the latest version of the tarball for macOS.
27+
28+
. Unpack the Operator SDK archive for `amd64` architecture by running the following command:
29+
+
30+
[source,terminal,subs="attributes+"]
31+
----
32+
$ tar xvf operator-sdk-v{osdk_ver}-ocp-darwin-x86_64.tar.gz
33+
----
34+
35+
. Unpack the Operator SDK archive for `arm64` architecture by running the following command:
36+
+
37+
[source,terminal,subs="attributes+"]
38+
----
39+
$ tar xvf operator-sdk-v{osdk_ver}-ocp-darwin-aarch64.tar.gz
40+
----
41+
42+
. Make the file executable by running the following command:
43+
+
44+
[source,terminal]
45+
----
46+
$ chmod +x operator-sdk
47+
----
48+
49+
. Move the extracted `operator-sdk` binary to a directory that is on your `PATH` by running the following command:
50+
+
51+
[TIP]
52+
====
53+
Check your `PATH` by running the following command:
54+
55+
[source,terminal]
56+
----
57+
$ echo $PATH
58+
----
59+
====
60+
+
61+
[source,terminal]
62+
----
63+
$ sudo mv ./operator-sdk /usr/local/bin/operator-sdk
64+
----
65+
66+
.Verification
67+
68+
* After you install the Operator SDK CLI, verify that it is available by running the following command::
69+
+
70+
[source,terminal]
71+
----
72+
$ operator-sdk version
73+
----
74+
+
75+
.Example output
76+
[source,terminal,subs="attributes+"]
77+
----
78+
operator-sdk version: "v{osdk_ver}-ocp", ...
79+
----

operators/operator_sdk/osdk-installing-cli.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ toc::[]
88

99
The Operator SDK provides a command-line interface (CLI) tool that Operator developers can use to build, test, and deploy an Operator. You can install the Operator SDK CLI on your workstation so that you are prepared to start authoring your own Operators.
1010

11-
Operator authors with cluster administrator access to a Kubernetes-based cluster, such as {product-title}, can use the Operator SDK CLI to develop their own Operators based on Go, Ansible, or Helm. link:https://kubebuilder.io/[Kubebuilder] is embedded into the Operator SDK as the scaffolding solution for Go-based Operators, which means existing Kubebuilder projects can be used as is with the Operator SDK and continue to work.
11+
Operator authors with cluster administrator access to a Kubernetes-based cluster, such as {product-title}, can use the Operator SDK CLI to develop their own Operators based on Go, Ansible, java, or Helm. link:https://kubebuilder.io/[Kubebuilder] is embedded into the Operator SDK as the scaffolding solution for Go-based Operators, which means existing Kubebuilder projects can be used as is with the Operator SDK and continue to work.
1212

1313
[NOTE]
1414
====
1515
{product-title} {product-version} supports Operator SDK {osdk_ver}.
1616
====
1717

1818
include::modules/osdk-installing-cli-linux-macos.adoc[leveloffset=+1]
19+
20+
include::modules/osdk-installing-cli-macos.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)