diff --git a/cli_reference/osdk/cli-osdk-install.adoc b/cli_reference/osdk/cli-osdk-install.adoc index 155218d738..085ad64eb1 100644 --- a/cli_reference/osdk/cli-osdk-install.adoc +++ b/cli_reference/osdk/cli-osdk-install.adoc @@ -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] \ No newline at end of file diff --git a/modules/osdk-installing-cli-linux-macos.adoc b/modules/osdk-installing-cli-linux-macos.adoc index de58f78d5f..38794f95b9 100644 --- a/modules/osdk-installing-cli-linux-macos.adoc +++ b/modules/osdk-installing-cli-linux-macos.adoc @@ -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. diff --git a/modules/osdk-installing-cli-macos.adoc b/modules/osdk-installing-cli-macos.adoc new file mode 100644 index 0000000000..06071c44b5 --- /dev/null +++ b/modules/osdk-installing-cli-macos.adoc @@ -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", ... +---- diff --git a/operators/operator_sdk/osdk-installing-cli.adoc b/operators/operator_sdk/osdk-installing-cli.adoc index 34627d3d88..65dbf0cc79 100644 --- a/operators/operator_sdk/osdk-installing-cli.adoc +++ b/operators/operator_sdk/osdk-installing-cli.adoc @@ -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]