1
0
mirror of https://github.com/minio/docs.git synced 2025-07-28 19:42:10 +03:00

Adding OpenShift Platform (#577)

# Summary

This pull adds back the OpenShift docs as a full dedicated platform

The main changes are:

- Adding the conditionals for OpenShift
- Modifying the Makefile for the new platform
- Adding the tutorials back in
- Fixing up the navigation headers

This was not too much trouble, which bodes well for the future.
This commit is contained in:
Ravind Kumar
2022-09-29 10:37:08 -04:00
committed by GitHub
parent 51da56df3c
commit 32366b2a15
20 changed files with 851 additions and 323 deletions

View File

@ -0,0 +1,196 @@
.. _deploy-operator-openshift:
=========================================
Deploy MinIO Operator on RedHat OpenShift
=========================================
.. default-domain:: minio
.. contents:: Table of Contents
:local:
:depth: 1
Overview
--------
Red Hat® OpenShift® is an enterprise-ready Kubernetes container platform with full-stack automated operations to manage hybrid cloud, multi-cloud, and edge deployments.
OpenShift includes an enterprise-grade Linux operating system, container runtime, networking, monitoring, registry, and authentication and authorization solutions.
You can deploy the MinIO Kubernetes Operator through the :openshift-docs:`Red Hat® OpenShift® Container Platform 4.7+ <welcome/index.html>`.
You can deploy and manage MinIO Tenants through OpenShift after deploying the MinIO Operator.
This procedure includes instructions for the following deployment paths:
- Purchase and Deploy MinIO through the `RedHat Marketplace <https://marketplace.redhat.com/en-us/products/minio-hybrid-cloud-object-storage>`__.
- Deploy MinIO through the OpenShift `OperatorHub <https://operatorhub.io/operator/minio-operator>`__
After deploying the MinIO Operator into your OpenShift cluster, you can create and manage MinIO Tenants through the :openshift-docs:`OperatorHub <operators/understanding/olm-understanding-operatorhub.html>` user interface.
This documentation assumes familiarity with all referenced Kubernetes and OpenShift concepts, utilities, and procedures.
While this documentation *may* provide guidance for configuring or deploying Kubernetes-related or OpenShift-related resources on a best-effort basis, it is not a replacement for the official :kube-docs:`Kubernetes Documentation <>` and :openshift-docs:`OpenShift Container Platform 4.7+ Documentation <welcome/index.html>`.
Prerequisites
-------------
RedHat OpenShift 4.7+
~~~~~~~~~~~~~~~~~~~~~
The MinIO Kubernetes Operator is available starting with `OpenShift 4.7+ <https://docs.openshift.com/container-platform/4.7/welcome/index.html>`__.
Red Hat Marketplace installation requires registration of the OpenShift cluster with the Marketplace for the necessary namespaces.
See `Register OpenShift cluster with Red Hat Marketplace <https://marketplace.redhat.com/en-us/documentation/clusters>`__ for complete instructions.
For older versions of OpenShift, use the generic :ref:`deploy-operator-kubernetes` procedure.
Administrator Access
~~~~~~~~~~~~~~~~~~~~
Installation of operators through the Red Hat Marketplace and the Operator Hub is restricted to OpenShift cluster administrators (``cluster-admin`` privileges).
This procedure requires logging into the Marketplace and/or OpenShift with an account that has those privileges.
OpenShift ``oc`` CLI
~~~~~~~~~~~~~~~~~~~~
:openshift-docs:`Download and Install <cli_reference/openshift_cli/getting-started-cli.html>` the OpenShift :abbr:`CLI (command-line interface)` ``oc`` for use in this procedure.
MinIO ``kubectl`` Plugin
~~~~~~~~~~~~~~~~~~~~~~~~
The MinIO Kubernetes Plugin provides a command line interface for the MinIO Operator.
This procedure uses the ``oc minio`` plugin as part of the installation.
.. include:: /includes/openshift/install-minio-kubectl-plugin.rst
Procedure
---------
1) Access the MinIO Operator Installation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Select the tab that corresponds to your preferred installation method:
.. tab-set::
.. tab-item:: Red Hat Marketplace
Open the `MinIO Red Hat Marketplace listing <https://marketplace.redhat.com/en-us/products/minio-hybrid-cloud-object-storage>`__ in your browser.
Click :guilabel:`Login` to log in with your Red Hat Marketplace account.
After logging in, click :guilabel:`Purchase` to purchase the MinIO Operator for your account.
After completing the purchase, click :guilabel:`Workplace` from the top navigation and select :guilabel:`My Software`.
.. image:: /images/openshift/minio-openshift-marketplace-my-software.png
:align: center
:width: 90%
:class: no-scaled-link
:alt: From the Red Hat Marketplace, select Workplace, then My Software
Click :guilabel:`MinIO Hybrid Cloud Object Storage` and select :guilabel:`Install Operator` to start the Operator Installation procedure in OpenShift.
.. tab-item:: Red Hat OperatorHub
Log into the OpenShift Web Console as a user with ``cluster-admin`` privileges.
From the :guilabel:`Administrator` panel, select :guilabel:`Operators`, then :guilabel:`OperatorHub`.
From the :guilabel:`OperatorHub` page, type "MinIO" into the :guilabel:`Filter` text entry. Select the :guilabel:`MinIO Operator` tile from the search list.
.. image:: /images/openshift/minio-openshift-select-minio.png
:align: center
:width: 90%
:class: no-scaled-link
:alt: From the OperatorHub, search for MinIO, then select the MinIO Tile.
Select the :guilabel:`MinIO Operator` tile, then click
:guilabel:`Install` to begin the installation.
2) Configure and Deploy the Operator
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The :guilabel:`Install Operator` page provides a walkthrough for configuring the MinIO Operator installation.
.. image:: /images/openshift/minio-openshift-operator-installation.png
:align: center
:width: 90%
:class: no-scaled-link
:alt: Complete the Operator Installation Walkthrough
- For :guilabel:`Update channel`, select any of the available options.
- For :guilabel:`Installation Mode`, select :guilabel:`All namespaces on the cluster`
- For :guilabel:`Installed Namespace`, select :guilabel:`openshift-operators`
- For :guilabel:`Approval Strategy`, select the approval strategy of your choice.
See the :openshift-docs:`Operator Installation Documentation <operators/admin/olm-adding-operators-to-cluster.html#olm-installing-from-operatorhub-using-web-console_olm-adding-operators-to-a-cluster>` :guilabel:`Step 5` for complete descriptions of each displayed option.
Click :guilabel:`Install` to start the installation procedure.
The web console displays a widget for tracking the installation progress.
.. image:: /images/openshift/minio-openshift-operator-installation-progress.png
:align: center
:width: 70%
:class: no-scaled-link
:alt: Wait for Installation to Complete.
Once installation completes, click :guilabel:`View Operator` to view the MinIO Operator page.
3) Open the MinIO Operator Interface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can find the MinIO Operator Interface from the :guilabel:`Operators` left-hand navigation header.
1. Go to :guilabel:`Operators`, then :guilabel:`Installed Operators`.
2. For the :guilabel:`Project` dropdown, select :guilabel:`openshift-operators`.
3. Select :guilabel:`MinIO Operators` from the list of installed operators.
The :guilabel:`Status` column must read :guilabel:`Success` to access the Operator interface.
4) Access the Operator Console
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The MinIO Operator includes the Operator Console, a browser-based management interface for managed MinIO tenants.
You can temporarily port-forward the Operator Console to your local host machine using the ``oc minio port-forward`` command:
.. code-block:: shell
:class: copyable
oc minio port-forward
The command returns a JWT token and a URL you can open in your browser.
.. image:: /images/k8s/operator-dashboard.png
:align: center
:width: 70%
:class: no-scaled-link
:alt: Operator Dashboard
You can create a permanent routing rule by creating a :openshift-docs:`Route or Ingress <networking/understanding-networking.html#nw-ne-comparing-ingress-route_understanding-networking>` to allow access from external clients, such as your local computer browser.
The following steps provides a summary of actions necessary to create a Route.
#. From :guilabel:`Networking`, go to :guilabel:`Routes`
#. Create a new Route in the MinIO Operator project.
Select a recognizable route name, such as ``operator-console-route``.
#. Set the :guilabel:`Hostname` as per your organizations networking and hostname topology.
Omit the hostname to allow OpenShift to generate it automatically
#. Set the :guilabel:`Service` to :guilabel:`console`
#. Set the :Guilabel:`Target Port` to ``9090``
You can then access the Operator Console using the configured Route.
The Operator Console still requires using the generated JWT token for access, which you can generate at any time using ``oc minio port-forward``.
6) Next Steps
~~~~~~~~~~~~~
After deploying the MinIO Operator, you can create a new MinIO Tenant.
To deploy a MinIO Tenant using OpenShift, see :ref:`deploy-minio-tenant-redhat-openshift`.
.. toctree::
:titlesonly:
:hidden:
/operations/install-deploy-manage/upgrade-minio-operator

View File

@ -0,0 +1,53 @@
You can install the MinIO Kubernetes plugin by downloading and installing the plugin binary to your local host:
.. tab-set::
.. tab-item:: Linux, MacOS
You can download the MinIO ``kubectl`` plugin to your local system path.
The ``oc`` CLI automatically discovers and runs compatible plugins.
The following code downloads the latest stable version |operator-version-stable| of the MinIO Kubernetes plugin and installs it to the system path:
.. code-block:: shell
:substitutions:
:class: copyable
curl https://github.com/minio/operator/releases/download/v|operator-version-stable|/kubectl-minio_|operator-version-stable|_linux_amd64 -o kubectl-minio
chmod +x kubectl-minio
mv kubectl-minio /usr/local/bin/
The ``mv`` command above may require ``sudo`` escalation depending on the permissions of the authenticated user.
Run the following command to verify installation of the plugin:
.. code-block:: shell
:class: copyable
oc minio version
The output should display the Operator version as |operator-version-stable|.
.. tab-item:: Windows
You can download the MinIO ``kubectl`` plugin to your local system path.
The ``oc`` CLI automatically discovers and runs compatible plugins.
The following PowerShell command downloads the latest stable version |operator-version-stable| of the MinIO Kubernetes plugin and installs it to the system path:
.. code-block:: powershell
:substitutions:
:class: copyable
Invoke-WebRequest -Uri "https://github.com/minio/operator/releases/download/v|operator-version-stable|/kubectl-minio_|operator-version-stable|_windows_amd64.exe" -OutFile "C:\kubectl-plugins\kubectl-minio.exe"
Ensure the path to the plugin folder is included in the Windows PATH.
Run the following command to verify installation of the plugin:
.. code-block:: shell
:class: copyable
oc minio version
The output should display the Operator version as |operator-version-stable|.

View File

@ -0,0 +1,117 @@
.. _deploy-minio-tenant-redhat-openshift:
Deploy a Tenant using the OpenShift Web Console
-----------------------------------------------
1) Access the MinIO Operator Interface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can find the MinIO Operator Interface from the :guilabel:`Operators` left-hand navigation header.
1. Go to :guilabel:`Operators`, then :guilabel:`Installed Operators`.
2. For the :guilabel:`Project` dropdown, select :guilabel:`openshift-operators`.
3. Select :guilabel:`MinIO Operators` from the list of installed operators.
Click :guilabel:`Create Tenant` to begin the Tenant Creation process.
2) Create the Tenant
~~~~~~~~~~~~~~~~~~~~
The :guilabel:`Form View` provides a user interface for configuring the new MinIO Tenant.
.. image:: /images/openshift/minio-openshift-tenant-create-ui.png
:align: center
:width: 90%
:class: no-scaled-link
:alt: OpenShift Tenant Creation UI View
- Ensure the :guilabel:`Tenant Secret -> Name` is set to the name of the MinIO Root User Kubernetes Secret created as part of the prerequisites.
- Ensure the :guilabel:`Console -> Console Secret -> Name` is set to the name of the MinIO Console Kubernetes Secret created as part of the prerequisites.
You can also use the YAML view to perform more granular configuration of the MinIO Tenant.
Refer to the :minio-git:`MinIO Custom Resource Definition Documentation <operator/blob/master/docs/crd.adoc>` for guidance on setting specific fields.
MinIO also publishes examples for additional guidance in creating custom Tenant YAML objects.
Note that the OperatorHub YAML view supports creating only the MinIO Tenant object.
Do not specify any other objects as part of the YAML input.
.. image:: /images/openshift/minio-openshift-tenant-create-yaml.png
:align: center
:width: 90%
:class: no-scaled-link
:alt: OpenShift Tenant Creation UI View
Changes to one view are reflected in the other.
For example, you can make modifications in the :guilabel:`YAML View` and see those changes in the :guilabel:`Form View`.
.. admonition:: Security Context Configuration
:class: note
If your OpenShift cluster Security Context Configuration restricts the supported pod security contexts, open the YAML View and locate the ``spec.pools[n].securityContext`` and ``spec.console.securityContext`` objects.
Modify the ``securityContext`` settings to use a supported UID based on the SCC of your OpenShift Cluster.
Click :guilabel:`Create` to create the MinIO Tenant using the specified configuration.
Use the credentials specified as part of the MinIO Root User secret to access the MinIO Server.
3) Connect to the Tenant
~~~~~~~~~~~~~~~~~~~~~~~~
The MinIO Operator creates services for the MinIO Tenant.
Use the ``oc get svc -n NAMESPACE`` command to review the deployed services:
.. code-block:: shell
:class: copyable
oc get svc -n minio-tenant-1
.. code-block:: shell
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
minio LoadBalancer 10.97.114.60 <pending> 443:30979/TCP 2d3h
minio-tenant-1-console LoadBalancer 10.106.103.247 <pending> 9443:32095/TCP 2d3h
minio-tenant-1-hl ClusterIP None <none> 9000/TCP 2d3h
minio-tenant-1-log-hl-svc ClusterIP None <none> 5432/TCP 2d3h
minio-tenant-1-log-search-api ClusterIP 10.103.5.235 <none> 8080/TCP 2d3h
minio-tenant-1-prometheus-hl-svc ClusterIP None <none> 9090/TCP 7h39m
- The ``minio`` service corresponds to the MinIO Tenant service.
Applications should use this service for performing operations against the MinIO Tenant.
- The ``*-console`` service corresponds to the :minio-git:`MinIO Console <console>`.
Administrators should use this service for accessing the MinIO Console and performing administrative operations on the MinIO Tenant.
The remaining services support Tenant operations and are not intended for consumption by users or administrators.
By default each service is visible only within the Kubernetes cluster.
Applications deployed inside the cluster can access the services using the ``CLUSTER-IP``.
Applications external to the Kubernetes cluster can access the services using the ``EXTERNAL-IP``.
This value is only populated for Kubernetes clusters configured for Ingress or a similar network access service.
Kubernetes provides multiple options for configuring external access to services.
See the Kubernetes documentation on
:kube-docs:`Publishing Services (ServiceTypes) <concepts/services-networking/service/#publishing-services-service-types>`
and :kube-docs:`Ingress <concepts/services-networking/ingress/>`
for more complete information on configuring external access to services.
4) Forward Ports
~~~~~~~~~~~~~~~~
You can temporarily expose each service using the ``oc port-forward`` utility.
Run the following examples to forward traffic from the local host running ``oc`` to the services running inside the Kubernetes cluster.
.. tab-set::
.. tab-item:: MinIO Tenant
.. code-block:: shell
:class: copyable
oc port-forward service/minio 443:443
.. tab-item:: MinIO Console
.. code-block:: shell
:class: copyable
oc port-forward service/minio-tenant-1-console 9443:9443