// Module included in the following assemblies:
//
// deploying/assembly_deploy-alternatives.adoc

[id='deploy-openshift-{context}']
= Installing a local OpenShift cluster

The easiest way to get started with OpenShift is using Minishift or `oc cluster up`.
This section provides basic guidance on how to use them.
For more information on the tools, refer to the documentation available online.

== oc cluster up

The https://github.com/openshift/origin/releases[`oc`] utility is one of the main tools for interacting with OpenShift.
It provides a simple way of starting a local cluster using the command:

[source,shell]
oc cluster up

This command requires Docker to be installed.
You can find more inforation on
https://github.com/openshift/origin/blob/release-3.11/docs/cluster_up_down.md[here].

== Minishift

Minishift is an OpenShift installation within a VM.
It can be downloaded and installed from the https://docs.openshift.org/latest/minishift/index.html[Minishift website].
Depending on the number of brokers you want to deploy inside the cluster, and if you need Kafka Connect running as well, try running Minishift
with at least 4 GB of RAM instead of the default 2 GB.

Once installed, start Minishift using:

[source,shell]
minishift start --memory 4GB

If you want to use `kubectl` with either an `oc cluster up` or `minishift` cluster,
you will need to https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/[configure it], as unlike with Minikube this won't be done automatically.

== `oc` and `kubectl` commands

The `oc` command functions as an alternative to `kubectl`.
In almost all cases the example `kubectl` commands given in this guide can be done using `oc` simply by replacing the command name (options and arguments remain the same).

In other words, instead of using:

[source,shell,subs=+quotes]
kubectl apply -f _your-file_

when using OpenShift you can use

[source,shell,subs=+quotes]
oc apply -f _your-file_

NOTE: As an exception to this general rule, `oc` uses `oc adm` subcommands for _cluster management_,
while `kubectl` does not make such a distinction.
For example, the `oc` equivalent of `kubectl taint` is `oc adm taint`.
