1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00

OCPBUGS#11575: Document Operator SDK installation for macOS

This commit is contained in:
Servesha Dudhgaonkar
2023-04-18 13:24:29 +05:30
committed by openshift-cherrypick-robot
parent d1b6564883
commit 6db3df0c8d
4 changed files with 86 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ toc::[]
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.
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.
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.
See xref:../../operators/operator_sdk/osdk-about.adoc#osdk-about[Developing Operators] for full documentation on the Operator SDK.
@@ -18,3 +18,5 @@ See xref:../../operators/operator_sdk/osdk-about.adoc#osdk-about[Developing Oper
====
include::modules/osdk-installing-cli-linux-macos.adoc[leveloffset=+1]
include::modules/osdk-installing-cli-macos.adoc[leveloffset=+1]

View File

@@ -5,7 +5,7 @@
:_content-type: PROCEDURE
[id="osdk-installing-cli-linux-macos_{context}"]
= Installing the Operator SDK CLI
= Installing the Operator SDK CLI on Linux
You can install the OpenShift SDK CLI tool on Linux.

View File

@@ -0,0 +1,79 @@
// Module included in the following assemblies:
//
// * cli_reference/osdk/cli-osdk-install.adoc
// * operators/operator_sdk/osdk-installing-cli.adoc
:_content-type: PROCEDURE
[id="osdk-installing-cli-macos_{context}"]
= Installing the Operator SDK CLI on macOS
You can install the OpenShift SDK CLI tool on macOS.
.Prerequisites
* link:https://golang.org/dl/[Go] v1.19+
ifdef::openshift-origin[]
* 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+
endif::[]
ifndef::openshift-origin[]
* `docker` v17.03+, `podman` v1.9.3+, or `buildah` v1.7+
endif::[]
.Procedure
. 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.
. From the latest {product-version} directory, download the latest version of the tarball for macOS.
. Unpack the Operator SDK archive for `amd64` architecture by running the following command:
+
[source,terminal,subs="attributes+"]
----
$ tar xvf operator-sdk-v{osdk_ver}-ocp-darwin-x86_64.tar.gz
----
. Unpack the Operator SDK archive for `arm64` architecture by running the following command:
+
[source,terminal,subs="attributes+"]
----
$ tar xvf operator-sdk-v{osdk_ver}-ocp-darwin-aarch64.tar.gz
----
. Make the file executable by running the following command:
+
[source,terminal]
----
$ chmod +x operator-sdk
----
. Move the extracted `operator-sdk` binary to a directory that is on your `PATH` by running the following command:
+
[TIP]
====
Check your `PATH` by running the following command:
[source,terminal]
----
$ echo $PATH
----
====
+
[source,terminal]
----
$ sudo mv ./operator-sdk /usr/local/bin/operator-sdk
----
.Verification
* After you install the Operator SDK CLI, verify that it is available by running the following command::
+
[source,terminal]
----
$ operator-sdk version
----
+
.Example output
[source,terminal,subs="attributes+"]
----
operator-sdk version: "v{osdk_ver}-ocp", ...
----

View File

@@ -8,7 +8,7 @@ toc::[]
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.
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.
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.
[NOTE]
====
@@ -16,3 +16,5 @@ Operator authors with cluster administrator access to a Kubernetes-based cluster
====
include::modules/osdk-installing-cli-linux-macos.adoc[leveloffset=+1]
include::modules/osdk-installing-cli-macos.adoc[leveloffset=+1]