คุณกำลังดูเอกสารประกอบของ Apigee Edge
ไปที่เอกสารประกอบของ Apigee X ข้อมูล
ในการติดตั้ง Edge for Private Cloud คุณอาจต้องนำเซิร์ฟเวอร์ Postgres และ Qpid ออกจากกลุ่มข้อมูลวิเคราะห์ที่มีอยู่ หรือเพิ่มไปยังกลุ่มข้อมูลวิเคราะห์ เอกสารนี้จะอธิบายวิธีเพิ่มและนำเซิร์ฟเวอร์ Postgres และ Qpid ออกจากการติดตั้ง Edge ที่มีอยู่สำหรับการติดตั้ง Postgres รายการเดียวและการติดตั้ง Postgres หลัก
ดูข้อมูลเพิ่มเติมได้ที่ตั้งค่าการจำลองสแตนด์บายหลักสำหรับ Postgres
ข้อกำหนดเบื้องต้น
ความสามารถในการเรียก API ของเซิร์ฟเวอร์การจัดการโดยใช้ข้อมูลเข้าสู่ระบบของผู้ดูแลระบบ
เพิ่มเซิร์ฟเวอร์ Postgres ที่มีอยู่ไปยังกลุ่มการวิเคราะห์
กระบวนการเพิ่มคอมโพเนนต์เซิร์ฟเวอร์ Postgres ขึ้นอยู่กับว่า Postgres เป็นเซิร์ฟเวอร์เดียวที่ไม่มีการจำลอง หรือเป็นเซิร์ฟเวอร์ 2 เครื่องที่เปิดใช้การจำลองในโหมดสแตนด์บายมาสเตอร์
สถานการณ์ที่ 1: เซิร์ฟเวอร์ One Postgres ไม่มีการจำลอง Postgres
ระบุชื่อของข้อมูลวิเคราะห์และกลุ่มผู้บริโภค
โดยค่าเริ่มต้น ชื่อกลุ่มใน Analytics คือ
axgroup-001
และชื่อกลุ่มผู้บริโภคคือconsumer-group-001
ในไฟล์การกำหนดค่าแบบเงียบสำหรับภูมิภาค คุณตั้งชื่อกลุ่ม Analytics ได้โดยใช้พร็อพเพอร์ตี้AXGROUP
หากไม่แน่ใจเกี่ยวกับชื่อของ Analytics และกลุ่มผู้บริโภค ให้ใช้คำสั่งต่อไปนี้เพื่อแสดง
curl -u adminEmail:pword "http://ms-IP:8080/v1/analytics/groups/ax"
การเรียกนี้ส่งคืนการตอบกลับที่มีชื่อของกลุ่ม Analytics:
[ { "name" : "axgroup-001", "properties" : { }, "scopes" : [ "example~prod", "example~test" ] …
ในตัวอย่างนี้ ชื่อกลุ่ม Analytics คือ
axgroup-001.
- ใช้ API ต่อไปนี้เพื่อระบุ UUID ของคอมโพเนนต์
postgres-server
curl http://pg-IP:8084/v1/servers/self
ในการเรียก API ต่อไปนี้ ให้แทนที่ axgoupname และ UUID ด้วยชื่อกลุ่ม Analytics และ UUID ที่ระบุไว้ข้างต้น
- ใช้การเรียก 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" : { }
- ใช้ 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" : { }
- รีสตาร์ทคอมโพเนนต์
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 เครื่องที่มีการจำลองสแตนด์บายต้นแบบ
ระบุชื่อของข้อมูลวิเคราะห์และกลุ่มผู้บริโภค
โดยค่าเริ่มต้น ชื่อกลุ่มใน Analytics คือ
axgroup-001
และชื่อกลุ่มผู้บริโภคคือconsumer-group-001
ในไฟล์การกำหนดค่าแบบเงียบสำหรับภูมิภาค คุณตั้งชื่อกลุ่ม Analytics ได้โดยใช้พร็อพเพอร์ตี้AXGROUP
หากไม่แน่ใจเกี่ยวกับชื่อของ Analytics และกลุ่มผู้บริโภค ให้ใช้คำสั่งต่อไปนี้เพื่อแสดง
curl -u adminEmail:pword "http://ms-IP:8080/v1/analytics/groups/ax"
การเรียกนี้ส่งคืนการตอบกลับที่มีชื่อของกลุ่ม Analytics ที่กำหนด
[ { "name" : "axgroup-001", "properties" : { }, "scopes" : [ "example~prod", "example~test" ] …
ในตัวอย่างนี้ ชื่อกลุ่ม Analytics คือ
axgroup-001.
- ใช้การเรียก API ต่อไปนี้เพื่อหา UUID ของคอมโพเนนต์
postgres-server
หลักแต่ละรายการ และคอมโพเนนต์postgres-server
สแตนด์บายcurl http://pg-IP:8084/v1/servers/self
ในการเรียก API ต่อไปนี้ คุณจะต้องแทนที่ axgoupname ด้วย
axgroup-001
และต้องใช้ UUID ที่ได้มาจากขั้นตอนที่ 2 ในเซิร์ฟเวอร์หลักแทน masteruuid และ UUID ที่ส่งคืนในขั้นตอนที่ 2 สำหรับเซิร์ฟเวอร์สแตนด์บายต้องใช้เป็น slaveuuid - ใช้ 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" : { }
- ใช้ 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" : { }
- รีสตาร์ทคอมโพเนนต์
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 ที่มีอยู่ไปยังกลุ่มการวิเคราะห์
- ค้นหาชื่อกลุ่ม Analytics โดยใช้ API ต่อไปนี้
curl -u adminEmail:pword "http://ms-IP:8080/v1/analytics/groups/ax"
การดำเนินการนี้ควรแสดงการตอบกลับที่มีชื่อของกลุ่มใน Analytics และขอบเขตดังนี้
[ { "name" : "axgroup-001", "properties" : { }, "scopes" : [ "example~prod", "example~test" ] …
ในตัวอย่างนี้ ชื่อกลุ่ม Analytics คือ
axgroup-001.
- ใช้การเรียก API ต่อไปนี้เพื่อระบุ UUID ของคอมโพเนนต์เซิร์ฟเวอร์ Qpid แต่ละรายการที่คุณต้องการเพิ่มลงในกลุ่มข้อมูลวิเคราะห์
curl http://qp-IP:8083/v1/servers/self
- ใช้การเรียก 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" : { }
- ใช้การเรียก 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" : { }
- รีสตาร์ทคอมโพเนนต์
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: เซิร์ฟเวอร์ One Postgres ไม่มีการจำลอง
ระบุชื่อของข้อมูลวิเคราะห์และกลุ่มผู้บริโภค
โดยค่าเริ่มต้น ชื่อกลุ่มใน Analytics คือ
axgroup-001
และชื่อกลุ่มผู้บริโภคคือconsumer-group-001
ในไฟล์การกำหนดค่าแบบเงียบสำหรับภูมิภาค คุณตั้งชื่อกลุ่ม Analytics ได้โดยใช้พร็อพเพอร์ตี้AXGROUP
หากไม่แน่ใจเกี่ยวกับชื่อของ Analytics และกลุ่มผู้บริโภค ให้ใช้คำสั่งต่อไปนี้เพื่อแสดง
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
ใช้ชื่อกลุ่ม Analytics, ชื่อกลุ่มผู้ใช้ และ UUID ที่ได้รับจากขั้นตอนด้านล่าง
- ใช้การเรียก 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" : { }
- ใช้ API ต่อไปนี้เพื่อนำ UUID
postgres-server
ออกจากองค์ประกอบ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" : { }
- โดยขึ้นอยู่กับว่าคุณกำลังแทนที่หรือลบเซิร์ฟเวอร์ 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 เครื่องที่มีการจำลองสแตนด์บายต้นแบบ
ค้นหาชื่อกลุ่มการวิเคราะห์และ 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" : { }
ในตัวอย่างนี้ ชื่อกลุ่ม Analytics คือ
axgroup-001
และ UUID ของpostgres-server
คือ8ee86b70-5b33-44b6-b2f8-1b0ec0ec8d77
และ731c8c43-8c35-4b58-ad1a-f572b69c5f0
โปรดทราบว่าองค์ประกอบpostgres-server
และdatastores
มีค่าเหมือนกันใช้ชื่อกลุ่ม Analytics, ชื่อกลุ่มผู้ใช้ และ UUID ที่ได้รับในขั้นตอนนี้ในขั้นตอนด้านล่าง
- ใช้ API ต่อไปนี้เพื่อนำ UUID
postgres-server
ออกจากองค์ประกอบdatastores
ของกลุ่มผู้บริโภค (โปรดทราบว่า UUID หลักและรองจะคั่นด้วยคอมมาใน API แต่จะคั่นด้วยโคลอนในเอาต์พุตของการเรียกกลุ่ม Analytics ที่กล่าวถึงข้างต้น)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" : { }
- ใช้ API ต่อไปนี้เพื่อนำ UUID
postgres-server
ออกจากองค์ประกอบ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" : { }
- โดยขึ้นอยู่กับว่าคุณกำลังแทนที่หรือลบเซิร์ฟเวอร์ 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 ออกจากกลุ่มการวิเคราะห์
- ค้นหา 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" : { }
ในตัวอย่างนี้ ชื่อกลุ่ม Analytics คือ
axgroup-001
และ UUID ของเซิร์ฟเวอร์ Qpid คือ94c96375-1ca7-412d-9eee-80fda94f6e0
และ54a96375-33a7-4fba-6bfa-80fda94f6e07
โปรดทราบว่าองค์ประกอบqpid-server
และconsumers
มีค่าเหมือนกันใช้ชื่อกลุ่ม Analytics, ชื่อกลุ่มผู้ใช้ และ UUID ที่ได้รับในขั้นตอนนี้ในขั้นตอนด้านล่าง
- ใช้การเรียก 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" : { }
- ใช้การเรียก 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" : { }
- รีสตาร์ทคอมโพเนนต์
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