7.4. 配置 OpenShift DR Hub operator s3StoreProfiles


要查找 MCG 的 s3CompatibleEndpoint 或路由,请在主受管集群和二级受管集群中执行以下命令:

步骤

  1. 使用以下命令,搜索外部 S3 端点 s3CompatibleEndpoint 或路由来为每个受管集群上的 MCG 进行 MCG。

    $ oc get route s3 -n openshift-storage -o jsonpath --template="https://{.spec.host}{'\n'}"

    输出示例:

    https://s3-openshift-storage.apps.perf1.example.com
    重要

    唯一的 s3CompatibleEndpoint 路由或 s3-openshift-storage.apps.<primary clusterID>.<baseDomain>s3-openshift-storage.apps.<secondary clusterID>.<baseDomain> 必须分别为主受管集群次受管集群获取。

  2. 搜索 odrbucket OBC 准确存储桶名称。

    $ oc get configmap odrbucket -n openshift-storage -o jsonpath='{.data.BUCKET_NAME}{"\n"}'

    输出示例:

    odrbucket-2f2d44e4-59cb-4577-b303-7219be809dcd
    重要

    唯一的 s3Bucket 名称 odrbucket-<your value1>odrbucket-<your value2> 必须分别在主受管集群次受管集群上获得。

  3. 修改 Hub 集群上的 ConfigMap ramen-hub-operator-config 以添加新内容。

    $ oc edit configmap ramen-hub-operator-config -n openshift-dr-system
  4. 将以下新内容从 s3StoreProfiles 开始添加到 Hub 集群的 ConfigMap 中。

    [...]
    data:
      ramen_manager_config.yaml: |
        apiVersion: ramendr.openshift.io/v1alpha1
        kind: RamenConfig
    [...]
        ramenControllerType: "dr-hub"
        ### Start of new content to be added
        s3StoreProfiles:
        - s3ProfileName: s3-primary
          s3CompatibleEndpoint: https://s3-openshift-storage.apps.<primary clusterID>.<baseDomain>
          s3Region: primary
          s3Bucket: odrbucket-<your value1>
          s3SecretRef:
            name: odr-s3secret-primary
            namespace: openshift-dr-system
        - s3ProfileName: s3-secondary
          s3CompatibleEndpoint: https://s3-openshift-storage.apps.<secondary clusterID>.<baseDomain>
          s3Region: secondary
          s3Bucket: odrbucket-<your value2>
          s3SecretRef:
            name: odr-s3secret-secondary
            namespace: openshift-dr-system
    [...]
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.