การเพิ่มและลบองค์ประกอบการวิเคราะห์ในกลุ่มข้อมูลวิเคราะห์

คุณกำลังดูเอกสารประกอบของ Apigee Edge
ไปที่ เอกสารประกอบของ Apigee X
info

ในการติดตั้ง Edge for Private Cloud คุณอาจต้องนำเซิร์ฟเวอร์ Postgres และ Qpid ออกจากกลุ่มข้อมูลวิเคราะห์ที่มีอยู่ หรือเพิ่มเซิร์ฟเวอร์ดังกล่าวลงในกลุ่มข้อมูลวิเคราะห์ เอกสารนี้อธิบายวิธีเพิ่มและนำเซิร์ฟเวอร์ Postgres และ Qpid ออกจากการติดตั้ง Edge ที่มีอยู่ สำหรับการติดตั้ง Postgres แบบเดี่ยวและการติดตั้ง Postgres แบบหลัก-สำรอง

ดูข้อมูลเพิ่มเติมได้ที่ ตั้งค่า การจำลองแบบหลัก-สำรองสำหรับ Postgres

ข้อกำหนดเบื้องต้น

ความสามารถในการเรียก API ของเซิร์ฟเวอร์การจัดการโดยใช้ข้อมูลเข้าสู่ระบบของผู้ดูแลระบบ

เพิ่มเซิร์ฟเวอร์ Postgres ที่มีอยู่ลงในกลุ่มข้อมูลวิเคราะห์

กระบวนการเพิ่มคอมโพเนนต์เซิร์ฟเวอร์ Postgres จะขึ้นอยู่กับว่ามีการติดตั้ง Postgres เป็นเซิร์ฟเวอร์เดียวโดยไม่มีการจำลองแบบ หรือเป็นเซิร์ฟเวอร์ 2 เครื่องที่มีการจำลองแบบหลัก-สำรองที่เปิดใช้

สถานการณ์ที่ 1: เซิร์ฟเวอร์ Postgres 1 เครื่อง ไม่มีการจำลองแบบ Postgres

  1. กำหนดชื่อของกลุ่มข้อมูลวิเคราะห์และกลุ่มผู้ใช้

    โดยค่าเริ่มต้น ชื่อของกลุ่มข้อมูลวิเคราะห์คือ axgroup-001 และชื่อของกลุ่มผู้ใช้คือ consumer-group-001 ในไฟล์กำหนดค่าแบบเงียบสำหรับภูมิภาค คุณสามารถตั้งชื่อกลุ่มข้อมูลวิเคราะห์ได้โดยใช้พร็อพเพอร์ตี้ AXGROUP

    หากไม่แน่ใจเกี่ยวกับชื่อของกลุ่มข้อมูลวิเคราะห์และกลุ่มผู้ใช้ ให้ใช้คำสั่งต่อไปนี้ เพื่อแสดงชื่อ

    curl -u adminEmail:pword "http://ms-IP:8080/v1/analytics/groups/ax"

    การเรียกนี้จะแสดงการตอบกลับที่มีชื่อของกลุ่มข้อมูลวิเคราะห์

    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ]
      …

    ในตัวอย่างนี้ ชื่อกลุ่มข้อมูลวิเคราะห์คือ axgroup-001.

  2. ใช้ API ต่อไปนี้เพื่อกำหนด UUID ของคอมโพเนนต์ postgres-server
    curl http://pg-IP:8084/v1/servers/self

    ในการเรียก API ต่อไปนี้ ให้แทนที่ axgoupname และ UUID ด้วย ชื่อกลุ่มข้อมูลวิเคราะห์และ UUID ที่กำหนดไว้ด้านบน

  3. ใช้การเรียก API ต่อไปนี้เพื่อเพิ่ม UUID ของเซิร์ฟเวอร์ Postgres ลงในองค์ประกอบ postgres-server
    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/servers?uuid=UUID&type=postgres-server&force=true"

    ตัวอย่างการเรียกและการแสดงผล

    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/servers?uuid=8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77&type=postgres-server&force=true"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
        "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07"],
        "postgres-server" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07"],
        "datastores" : [ ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  4. ใช้ API ต่อไปนี้เพื่อเพิ่ม UUID ของเซิร์ฟเวอร์ Postgres ลงในกลุ่มผู้ใช้
    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/consumer-groups/consumer-group-001/datastores?uuid=UUID"

    ตัวอย่างการเรียกและการแสดงผล

    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/consumer-groups/consumer-group-001/datastores?uuid=8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
        "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07"],
        "postgres-server" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07"],
        "datastores" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77"],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  5. รีสตาร์ทคอมโพเนนต์ edge-postgres-server และ edge-qpid-server ทั้งหมดใน โหนดทั้งหมดเพื่อให้แน่ใจว่าคอมโพเนนต์เหล่านั้นจะรับการเปลี่ยนแปลง
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restart
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server wait_for_ready
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server restart
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server wait_for_ready

สถานการณ์ที่ 2: เซิร์ฟเวอร์ Postgres 2 เครื่องที่มีการจำลองแบบหลัก-สำรอง

  1. กำหนดชื่อของกลุ่มข้อมูลวิเคราะห์และกลุ่มผู้ใช้

    โดยค่าเริ่มต้น ชื่อของกลุ่มข้อมูลวิเคราะห์คือ axgroup-001 และชื่อของกลุ่มผู้ใช้คือ consumer-group-001 ในไฟล์กำหนดค่าแบบเงียบสำหรับภูมิภาค คุณสามารถตั้งชื่อกลุ่มข้อมูลวิเคราะห์ได้โดยใช้พร็อพเพอร์ตี้ AXGROUP

    หากไม่แน่ใจเกี่ยวกับชื่อของกลุ่มข้อมูลวิเคราะห์และกลุ่มผู้ใช้ ให้ใช้คำสั่งต่อไปนี้ เพื่อแสดงชื่อ

    curl -u adminEmail:pword "http://ms-IP:8080/v1/analytics/groups/ax"

    การเรียกนี้จะแสดงการตอบกลับที่มีชื่อของกลุ่มข้อมูลวิเคราะห์ที่กำหนดไว้

    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ]
      …

    ในตัวอย่างนี้ ชื่อกลุ่มข้อมูลวิเคราะห์คือ axgroup-001.

  2. ใช้การเรียก API ต่อไปนี้เพื่อค้นหา UUID ของคอมโพเนนต์ postgres-server หลักแต่ละรายการและคอมโพเนนต์ postgres-server สำรอง
    curl http://pg-IP:8084/v1/servers/self

    ในการเรียก API ต่อไปนี้ คุณจะต้องแทนที่ axgoupname ด้วย axgroup-001 และใช้ UUID ที่ได้รับในขั้นตอนที่ 2 ในเซิร์ฟเวอร์หลักแทน masteruuid และใช้ UUID ที่แสดงในขั้นตอนที่ 2 สำหรับ เซิร์ฟเวอร์สำรองเป็น slaveuuid

  3. ใช้ API ต่อไปนี้เพื่อเพิ่ม UUID ของเซิร์ฟเวอร์ Postgres ลงในองค์ประกอบ postgres-server
    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/servers?uuid=masteruuid,slaveuuid&type=postgres-server&force=true"

    ตัวอย่างการเรียกและการแสดงผล

    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/servers?uuid=8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77,731c8c43-8c35-4b58-ad1a-f572b69c5f0&type=postgres-server&force=true"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
            "qpid-server" : ["54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
            "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "datastores" : [],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  4. ใช้ API ต่อไปนี้เพื่อเพิ่ม UUID ของเซิร์ฟเวอร์ Postgres ลงในกลุ่มผู้ใช้
    curl -v -u adminEmail:pword -X POST -H -H 'Content-Type: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/consumer-groups/consumer-group-001/datastores?uuid=masteruuid,slaveuuid"

    ตัวอย่างการเรียกและการแสดงผล

    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/consumer-groups/consumer-group-001/datastores?uuid=8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77,731c8c43-8c35-4b58-ad1a-f572b69c5f0"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
            "qpid-server" : ["54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
            "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "datastores" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  5. รีสตาร์ทคอมโพเนนต์ edge-postgres-server และ edge-qpid-server ทั้งหมดใน โหนดทั้งหมดเพื่อให้แน่ใจว่าคอมโพเนนต์เหล่านั้นจะรับการเปลี่ยนแปลง
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restart
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server wait_for_ready
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server restart
    /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server wait_for_ready

เพิ่มเซิร์ฟเวอร์ Qpid ที่มีอยู่ลงในกลุ่มข้อมูลวิเคราะห์

  1. ค้นหาชื่อกลุ่มข้อมูลวิเคราะห์โดยใช้ API ต่อไปนี้
    curl -u adminEmail:pword "http://ms-IP:8080/v1/analytics/groups/ax"

    ซึ่งควรแสดงการตอบกลับที่มีชื่อของกลุ่มข้อมูลวิเคราะห์และขอบเขต

    [  {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ]
      …

    ในตัวอย่างนี้ ชื่อกลุ่มข้อมูลวิเคราะห์คือ axgroup-001.

  2. ใช้การเรียก API ต่อไปนี้เพื่อกำหนด UUID ของคอมโพเนนต์เซิร์ฟเวอร์ Qpid แต่ละรายการที่คุณต้องการ เพิ่มลงในกลุ่มข้อมูลวิเคราะห์
    curl http://qp-IP:8083/v1/servers/self
  3. ใช้การเรียก API ต่อไปนี้เพื่อเพิ่ม UUID ของเซิร์ฟเวอร์ Qpid รายการเดียวลงใน qpid-server องค์ประกอบ (ทำซ้ำสำหรับ UUID ที่จำเป็น)
    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/servers?uuid=qpiduuid&type=qpid-server"

    ตัวอย่างการเรียกและการแสดงผล

    curl -v -u adminEmail:pword -X POST -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/servers?uuid=94c96375-1ca7-412d-9eee-80fda94f6e0&type=qpid-server"
    [  {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
            "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
            "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "datastores" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f57 ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  4. ใช้การเรียก API ต่อไปนี้เพื่อเพิ่ม UUID ของเซิร์ฟเวอร์ Qpid รายการเดียวลงในองค์ประกอบผู้ใช้ของ กลุ่มผู้ใช้ (ทำซ้ำสำหรับ UUID ที่จำเป็น)
    curl -v -u adminEmail:pword -X POST -H 'Content-Type: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/consumer-groups/consumer-group-001/consumers?uuid=qpiduuid" 

    ตัวอย่างการเรียกและการแสดงผล

    curl -v -u adminEmail:pword -X POST -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001//consumer-groups/consumer-group-001/consumers?uuid=94c96375-1ca7-412d-9eee-80fda94f6e0"
    [  {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
            "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
            "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07","54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "datastores" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f57 ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  5. รีสตาร์ทคอมโพเนนต์ edge-qpid-server ทั้งหมดในโหนดทั้งหมดเพื่อให้แน่ใจว่าคอมโพเนนต์เหล่านั้นจะรับการเปลี่ยนแปลง
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restart
    /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server wait_for_ready

นำเซิร์ฟเวอร์ Postgres ออกจากกลุ่มข้อมูลวิเคราะห์

กระบวนการนำเซิร์ฟเวอร์ Postgres ออกจะขึ้นอยู่กับว่ามีการเปิดใช้การจำลองแบบ Postgres หรือไม่

สถานการณ์ที่ 1: เซิร์ฟเวอร์ Postgres 1 เครื่อง ไม่มีการจำลองแบบ

  1. กำหนดชื่อของกลุ่มข้อมูลวิเคราะห์และกลุ่มผู้ใช้

    โดยค่าเริ่มต้น ชื่อของกลุ่มข้อมูลวิเคราะห์คือ axgroup-001 และชื่อของกลุ่มผู้ใช้คือ consumer-group-001 ในไฟล์กำหนดค่าแบบเงียบสำหรับภูมิภาค คุณสามารถตั้งชื่อกลุ่มข้อมูลวิเคราะห์ได้โดยใช้พร็อพเพอร์ตี้ AXGROUP

    หากไม่แน่ใจเกี่ยวกับชื่อของกลุ่มข้อมูลวิเคราะห์และกลุ่มผู้ใช้ ให้ใช้คำสั่งต่อไปนี้ เพื่อแสดงชื่อ

    curl -u adminEmail:pword "http://ms-IP:8080/v1/analytics/groups/ax"

    ซึ่งควรแสดงการตอบกลับดังต่อไปนี้

    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
        "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07" ],
        "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07" ],
        "datastores" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77" ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }

    ในตัวอย่างนี้ ชื่อกลุ่มข้อมูลวิเคราะห์คือ axgroup-001 ชื่อกลุ่มผู้ใช้คือ consumer-group-001 และ UUID ของ postgres-server คือ 8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77 โปรดทราบว่ารหัสนี้เชื่อมโยงกับทั้ง องค์ประกอบ postgres-server และ datastores ภายใต้ consumer-groups

    ใช้ชื่อกลุ่มข้อมูลวิเคราะห์ ชื่อกลุ่มผู้ใช้ และ UUID ที่ได้รับในขั้นตอนด้านล่าง

  2. ใช้การเรียก API ต่อไปนี้เพื่อนำ UUID ของ postgres-server ออกจาก datastores องค์ประกอบของกลุ่มผู้ใช้
    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/consumer-groups/consumergroupname/datastores/UUID"

    ตัวอย่างการเรียกและการแสดงผล

    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/consumer-groups/consumer-group-001/datastores/8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
        "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07" ],
        "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07" ],
        "datastores" : [ ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  3. ใช้ API ต่อไปนี้เพื่อนำ postgres-server UUID ออกจาก postgres-server องค์ประกอบ:
    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/servers?uuid=UUID&type=postgres-server"

    ตัวอย่างการเรียกและการแสดงผล

    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/servers?uuid=8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77&type=postgres-server"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
        "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07" ],
        "postgres-server" : [ ]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07" ],
        "datastores" : [ ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  4. ดำเนินการดังนี้โดยขึ้นอยู่กับว่าคุณจะแทนที่ หรือลบ เซิร์ฟเวอร์ Postgres
    • หากคุณจะแทนที่เซิร์ฟเวอร์ Postgres โปรดดูขั้นตอนการเพิ่มเซิร์ฟเวอร์ Postgres ที่หัวข้อเพิ่มเซิร์ฟเวอร์ Postgres
    • หากคุณจะลบเซิร์ฟเวอร์ Postgres ให้รีสตาร์ทคอมโพเนนต์ edge-postgres-server และ edge-qpid-server ทั้งหมดในโหนดทั้งหมดเพื่อให้ แน่ใจว่าคอมโพเนนต์เหล่านั้นจะรับการเปลี่ยนแปลงโดยเรียกใช้คำสั่งต่อไปนี้
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restart
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server wait_for_ready
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server restart
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server wait_for_ready

สถานการณ์ที่ 2: เซิร์ฟเวอร์ Postgres 2 เครื่องที่มีการจำลองแบบหลัก-สำรอง

  1. ค้นหาชื่อกลุ่มข้อมูลวิเคราะห์และ UUID ของเซิร์ฟเวอร์ Postgres ที่ลงทะเบียนไว้ในปัจจุบันโดยใช้ API ต่อไปนี้

    curl -u adminEmail:pword "http://ms-IP:8080/v1/analytics/groups/ax"

    การเรียกนี้จะแสดงการตอบกลับดังต่อไปนี้

    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
            "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
            "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "datastores" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0" ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }

    ในตัวอย่างนี้ ชื่อกลุ่มข้อมูลวิเคราะห์คือ axgroup-001 และ postgres-server UUID คือ 8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77 และ 731c8c43-8c35-4b58-ad1a-f572b69c5f0 โปรดทราบว่าองค์ประกอบ postgres-server และ datastores มีค่าเดียวกัน

    ใช้ชื่อกลุ่มข้อมูลวิเคราะห์ ชื่อกลุ่มผู้ใช้ และ UUID ที่ได้รับในขั้นตอนนี้ในขั้นตอนด้านล่าง

  2. ใช้ API ต่อไปนี้เพื่อนำ postgres-server UUID ออกจาก datastores องค์ประกอบของกลุ่มผู้ใช้ (โปรดทราบว่า UUID หลักและรองจะ คั่นด้วยคอมมาใน API แต่จะคั่นด้วยโคลอนในการแสดงผลของการเรียกกลุ่มข้อมูลวิเคราะห์ ที่กล่าวถึงข้างต้น)
    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/consumer-groups/consumergroupname/datastores/masteruuid,slaveuuid"

    ตัวอย่างการเรียกและการแสดงผล

    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/consumer-groups/consumer-group-001/datastores/8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77,731c8c43-8c35-4b58-ad1a-f572b69c5f0"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
            "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
            "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "datastores" : [ ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  3. ใช้ API ต่อไปนี้เพื่อนำ postgres-server UUID ออกจาก postgres-server องค์ประกอบ:
    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/servers?uuid=masteruuid,slaveuuid&type=postgres-server"

    ตัวอย่างการเรียกและการแสดงผล

    curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/servers?uuid=8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77,731c8c43-8c35-4b58-ad1a-f572b69c5f0&type=postgres-server"
    [ {
      "name" : "axgroup-001",
      "properties" : {
      },
      "scopes" : [ "example~prod", "example~test" ],
      "uuids" : {
        "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "postgres-server" : [ ]
      },
      "consumer-groups" : [ {
        "name" : "consumer-group-001",
        "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
        "datastores" : [ ],
        "properties" : {
        }
      } ],
      "data-processors" : {
      }
  4. ดำเนินการดังนี้โดยขึ้นอยู่กับว่าคุณจะแทนที่ หรือลบ เซิร์ฟเวอร์ Postgres
    • หากคุณจะแทนที่เซิร์ฟเวอร์ Postgres โปรดดูขั้นตอนการเพิ่มเซิร์ฟเวอร์ Postgres ที่หัวข้อเพิ่มเซิร์ฟเวอร์ Postgres
    • หากคุณจะลบเซิร์ฟเวอร์ Postgres ให้รีสตาร์ทคอมโพเนนต์ edge-postgres-server และ edge-qpid-server ทั้งหมดในโหนดทั้งหมดเพื่อให้ แน่ใจว่าคอมโพเนนต์เหล่านั้นจะรับการเปลี่ยนแปลงโดยเรียกใช้คำสั่งต่อไปนี้
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restart
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server wait_for_ready
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server restart
      /opt/apigee/apigee-service/bin/apigee-service edge-postgres-server wait_for_ready

    นำเซิร์ฟเวอร์ Qpid ออกจากกลุ่มข้อมูลวิเคราะห์

    1. ค้นหา UUID ของเซิร์ฟเวอร์ Qpid ที่ลงทะเบียนไว้ในปัจจุบันโดยใช้ API ต่อไปนี้
      curl -u adminEmail:pword "http://ms-IP:8080/v1/analytics/groups/ax"
      ซึ่งควรแสดงการตอบกลับในรูปแบบต่อไปนี้
      [  {
        "name" : "axgroup-001",
        "properties" : {
        },
        "scopes" : [ "example~prod", "example~test" ],
        "uuids" : {
              "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
              "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
        },
        "consumer-groups" : [ {
          "name" : "consumer-group-001",
          "consumers" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
          "datastores" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0" ],
          "properties" : {
          }
        } ],
        "data-processors" : {
        }

      ในตัวอย่างนี้ ชื่อกลุ่มข้อมูลวิเคราะห์คือ axgroup-001 และ UUID ของเซิร์ฟเวอร์ Qpid คือ 94c96375-1ca7-412d-9eee-80fda94f6e0 และ 54a96375-33a7-4fba-6bfa-80fda94f6e07 โปรดทราบว่าองค์ประกอบ qpid-server และ consumers มีค่าเดียวกัน

      ใช้ชื่อกลุ่มข้อมูลวิเคราะห์ ชื่อกลุ่มผู้ใช้ และ UUID ที่ได้รับในขั้นตอนนี้ในขั้นตอนด้านล่าง

    2. ใช้การเรียก API ต่อไปนี้เพื่อนำ UUID ของ qpid-server รายการเดียวออกจากองค์ประกอบ consumers ของกลุ่มผู้ใช้ (ทำซ้ำสำหรับ UUID ที่จำเป็น)
      curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/consumer-groups/consumer-group-001/consumers/qpiduuid"

      ตัวอย่างการเรียกและการแสดงผล

      curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/consumer-groups/consumer-group-001/consumers/94c96375-1ca7-412d-9eee-80fda94f6e0"
      [  {
        "name" : "axgroup-001",
        "properties" : {
        },
        "scopes" : [ "example~prod", "example~test" ],
        "uuids" : {
              "qpid-server" : [ "94c96375-1ca7-412d-9eee-80fda94f6e07", "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
              "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
        },
        "consumer-groups" : [ {
          "name" : "consumer-group-001",
          "consumers" : [ "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
          "datastores" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f57 ],
          "properties" : {
          }
        } ],
        "data-processors" : {
        }
    3. ใช้การเรียก API ต่อไปนี้เพื่อนำ UUID ของ qpid-server รายการเดียวออกจาก qpid-server องค์ประกอบ (ทำซ้ำสำหรับ UUID ที่จำเป็น)
      curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://ms-IP:8080/v1/analytics/groups/ax/axgroupname/servers?uuid=qpiduuid&type=qpid-server"

      ตัวอย่างการเรียกและการแสดงผล

      curl -v -u adminEmail:pword -X DELETE -H 'Accept: application/json' "http://localhost:8080/v1/analytics/groups/ax/axgroup-001/servers?uuid=94c96375-1ca7-412d-9eee-80fda94f6e0&type=qpid-server"
      [  {
        "name" : "axgroup-001",
        "properties" : {
        },
        "scopes" : [ "example~prod", "example~test" ],
        "uuids" : {
              "qpid-server" : ["54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
              "postgres-server" : [ "8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f572b69c5f0"]
        },
        "consumer-groups" : [ {
          "name" : "consumer-group-001",
          "consumers" : [ "54a96375-33a7-4fba-6bfa-80fda94f6e07" ],
          "datastores" : ["8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77:731c8c43-8c35-4b58-ad1a-f57 ],
          "properties" : {
          }
        } ],
        "data-processors" : {
        }
    4. รีสตาร์ทคอมโพเนนต์ edge-qpid-server ทั้งหมดในโหนดทั้งหมดเพื่อให้แน่ใจว่าคอมโพเนนต์เหล่านั้นจะรับการเปลี่ยนแปลง
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server restart
      /opt/apigee/apigee-service/bin/apigee-service edge-qpid-server wait_for_ready