Este conteúdo não está disponível no idioma selecionado.
Chapter 2. Getting Started
2.1. System Requirements Copiar o linkLink copiado para a área de transferência!
To use Red Hat Data Grid for OpenShift, you need:
A running Red Hat OpenShift cluster.
For supported Red Hat OpenShift Container Platform versions, refer to Red Hat Data Grid Supported Configurations.
TipUse the Red Hat Container Development Kit to create a local OpenShift cluster with minishift.
-
An oc client in your
$PATH.
2.2. Creating a Data Grid for OpenShift Project Copiar o linkLink copiado para a área de transferência!
Set up an OpenShift project where you can run Data Grid for OpenShift pods.
Log in to your OpenShift cluster.
If you are new to OpenShift, try the following tutorial: Logging in to an OpenShift Cluster.
Create an OpenShift project with the
oc new-projectcommand, for example:oc new-project rhdg-helloworld --display-name="Red Hat Data Grid"
$ oc new-project rhdg-helloworld --display-name="Red Hat Data Grid"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.3. Setting Up Registry Authentication Copiar o linkLink copiado para a área de transferência!
You must authenticate with the Red Hat Container Catalog, registry.redhat.io, to pull Data Grid images.
Use one of the following:
-
Red Hat customer account username and password. Pull resources from registry.redhat.io with the
docker logincommand. Registry service account tokens. Use authentication tokens to configure multiple hosts. Do the following:
- Log in to registry.redhat.io.
- Create or select a Registry Service Account.
- Generate authentication tokens.
2.3.1. Configuring Hosts with Authentication Tokens Copiar o linkLink copiado para a área de transferência!
Add authentication tokens from your Registry Service Account to hosts as follows:
- Select the Docker Login tab and copy the command.
-
Run the
docker logincommand on each host that pulls from registry.redhat.io. Verify your Docker configuration.
cat ~/.docker/config.json ... "registry.redhat.io": { "auth": "MTEwMDkx..." }$ cat ~/.docker/config.json ... "registry.redhat.io": { "auth": "MTEwMDkx..." }Copy to Clipboard Copied! Toggle word wrap Toggle overflow
2.3.2. Creating Pull Secrets Copiar o linkLink copiado para a área de transferência!
To pull secured container images that are not available on the internal registry for OpenShift, do the following:
- Log in to your OpenShift cluster.
Select your working project, for example:
oc project rhdg-helloworld
$ oc project rhdg-helloworldCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a generic pull secret with your Docker configuration.
oc create secret generic ${SECRET_NAME} \ --from-file=.dockerconfigjson=path/to/.docker/config.json \ --type=kubernetes.io/dockerconfigjson$ oc create secret generic ${SECRET_NAME} \ --from-file=.dockerconfigjson=path/to/.docker/config.json \ --type=kubernetes.io/dockerconfigjsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow Link the pull secret to your service account.
oc secrets link default ${SECRET_NAME} --for=pull$ oc secrets link default ${SECRET_NAME} --for=pullCopy to Clipboard Copied! Toggle word wrap Toggle overflow Mount the secret.
oc secrets link builder ${SECRET_NAME}$ oc secrets link builder ${SECRET_NAME}Copy to Clipboard Copied! Toggle word wrap Toggle overflow
For more information, including troubleshooting procedures, see Red Hat Container Registry Authentication.