1
0
mirror of https://github.com/minio/docs.git synced 2025-04-25 17:22:39 +03:00
docs/source/includes/container/steps-deploy-minio-single-node-single-drive.rst
Andrea Longo d17c896f75
attempt to remove plugin from docs (#1219)
The Kubernetes plugin is gone, this PR replaces the procedures that use
`kubectl minio` in all its various forms. The plugin was referenced on
many pages and for many purposes so there is _a lot_ of restructuring
involved.

Some procedures no longer have CLI instructions, which can be addressed
in subsequent PRs. Everything should have at least one working method,
even if it's to use Operator Console.

- Remove references to plugin, except for pre-4.5.8 upgrade paths
- Move pre-4.5.8 upgrade paths to new child page (currently hidden from
TOC, linked in page)
- Fill in with new Kustomize, kubectl, and/or Operator Console steps.

A handful of old screen captures still to be updated

Staged:
- [Operator
deploy](http://192.241.195.202:9000/staging/DOCS-1213-upstream/k8s/operations/installation.html)
- [Operator
upgrade](http://192.241.195.202:9000/staging/DOCS-1213-upstream/k8s/operations/install-deploy-manage/upgrade-minio-operator.html)
- [Deploy and manage
Tenants](http://192.241.195.202:9000/staging/DOCS-1213-upstream/k8s/operations/deploy-manage-tenants.html)

Fixes https://github.com/minio/docs/issues/1213
2024-06-07 09:05:39 -06:00

6.7 KiB

1) Pull the Latest Stable Image of MinIO

2) Create the Environment Variable File

3) Create and Run the Container

Select the container management interface of your choice for the relevant command syntax.

Podman

Copy the command to a text file for further modification.

podman run -dt                                  \
  -p 9000:9000 -p 9001:9001                     \
  -v PATH:/mnt/data                             \
  -v /etc/default/minio:/etc/config.env         \
  -e "MINIO_CONFIG_ENV_FILE=/etc/config.env"    \
  --name "minio_local"                          \
  minio server --console-address ":9001"

Specify any other options <markdown/podman-run.1.html> to podman run as necessary for your local environment.

Docker

Copy the command to a text file for further modification.

docker run -dt                                  \
  -p 9000:9000 -p 9001:9001                     \
  -v PATH:/mnt/data                             \
  -v /etc/default/minio:/etc/config.env         \
  -e "MINIO_CONFIG_ENV_FILE=/etc/config.env"    \
  --name "minio_local"                          \
  minio server --console-address ":9001"

Specify any other options to docker run as necessary for your local environment.

For running Docker in Rootless mode, you may need to set the following additional Docker CLI options:

Linux

--user $(id -u):$(id -g) - directs the container to run as the currently logged in user.

Windows

--security-opt "credentialspec=file://path/to/file.json" - directs the container to run using a Windows Group Managed Service Account.

The following table describes each line of the command and provides additional configuration instructions:

Line Description
podman run -dt
docker run -dt
Directs Podman/Docker to create and start the container as a detached (-d) background process with a pseudo-TTY (-t). This allows the container to run in the background with an open TTY for bash-like access.
-p 9000:9000 -p 9001:9001 Binds the ports 9000 and 9090 on the local machine to the same ports on the container. This allows access to the container through the local machine.
-v PATH:/data/minio Binds the storage volume PATH on the local machine to the /data path on the container. Replace this value with the full path to a storage volume or folder on the local machine. For example:
Linux or macOS

~/minio/data/

Windows

C:\minio\data

-v /etc/default/minio:/etc/config.env

Mounts the environment file created in the previous step to the /etc/config.env path on the Container. For Windows hosts, specify the Windows-style path -v C:\minio\config:/etc/config.env.

The MinIO Server uses this environment file for configuration.

-e "MINIO_CONFIG_ENV_FILE=/etc/config.env" Sets a MinIO environment variable pointing to the container-mounted path of the environment file.
--name "minio_local" Sets a custom name for the container. Omit this value to allow Podman/Docker to automatically generate a container name. You can replace this value to best reflect your requirements.

minio server --console-address ":9001"

Starts the MinIO server using the minio:minio image pulled from an earlier step. The minio server --console-address ":9001" <minio server --console-address> option directs the server to set a static port for the MinIO Console Web Interface. This option is required for containerized environments.

If you modify this value, ensure you set the proper port mapping using the -p flag to Podman/Docker to ensure traffic forwarding between the local host and the container.

Once you have applied any further customizations to the command, run it in your preferred terminal or shell environment. The command should return a unique ID for the created container.

4) Validate the Container Status

Status:         1 Online, 0 Offline. 
API: http://10.0.2.100:9000  http://127.0.0.1:9000       
RootUser: myminioadmin 
RootPass: minio-secret-key-change-me 
Console: http://10.0.2.100:9001 http://127.0.0.1:9001    
RootUser: myminioadmin 
RootPass: minio-secret-key-change-me 

Command-line: https://min.io/docs/minio/linux/reference/minio-mc.html
   $ mc alias set myminio http://10.0.2.100:9000 myminioadmin minio-secret-key-change-me

Documentation: https://min.io/docs/minio/container/index.html

Container Networks May Not Be Accessible Outside of the Host

The API and CONSOLE blocks may include the network interfaces for the container. Clients outside of the container network cannot access the MinIO API or Console using these addresses.

External access requires using a network address for the container host machine and assumes the host firewall allows access to the related ports (9000 and 9090 in the examples).

5) Connect to the MinIO Service