סקירה כללית
החל מגרסה 1.13.1, ארגוני Apigee Hybrid שמופעלת בהם תכונת מיקום אחסון הנתונים יכולים להשתמש בפייפליין נתונים חדש שמאפשר לרכיבי זמן הריצה לכתוב נתונים ישירות למישור הבקרה. בעבר, הפעולה הזו בוצעה באמצעות רכיב ה-UDCA, שיצר כתובות URL חתומות לכתיבה בשירותי Google Cloud. הצינור החדש מבטל את הצורך ב-UDCA וברכיבים קשורים אחרים שאחראים לעיבוד נתונים שהועלו לשירותי Google Cloud.
הגדרות אישיות
כדי להגדיר את hybrid כך שישתמש בצינור הנתונים החדש לרכיבים ספציפיים, פועלים לפי ההוראות הבאות.
הגדרת תהליך ההרשאה
מגדירים הרשאות לחשבון השירות של זמן הריצה כדי לקיים אינטראקציה עם צינור עיבוד הנתונים החדש ולדחוף נתונים למישור הבקרה. חובה לבצע את השלב הזה כדי לאפשר הפעלה של סשנים לניפוי באגים ושל Analytics עם צינור הנתונים החדש:
curl -X PATCH -H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type:application/json" \
"https://apigee.googleapis.com/v1/organizations/ORG_NAME/controlPlaneAccess?update_mask=analytics_publisher_identities" \
-d '{ "analytics_publisher_identities": ["serviceAccount:apigee-runtime@ORG_NAME.iam.gserviceaccount.com"]}'התגובה אמורה להיראות כך:
{
"name": "organizations/newpipeline-hybrid-org/operations/8316aa78-c137-4733-92ec-cc0d2d92fd29",
"metadata": {
"@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata",
"operationType": "UPDATE",
"targetResourceName": "organizations/newpipeline-hybrid-org/controlPlaneAccess",
"state": "IN_PROGRESS"
}
}
כדי לאמת את מצב הפעולה, משתמשים בפרמטר name מתגובת העדכון:
curl -X GET -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type:application/json" \ "https://apigee.googleapis.com/v1/organizations/ORG_NAME/operations/8316aa78-c137-4733-92ec-cc0d2d92fd29"
התגובה אמורה להיראות כך:
{
"name": "organizations/newpipeline-hybrid-org/operations/8316aa78-c137-4733-92ec-cc0d2d92fd29",
"metadata": {
"@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata",
"operationType": "UPDATE",
"targetResourceName": "organizations/newpipeline-hybrid-org/controlPlaneAccess",
"state": "FINISHED"
},
"done": true,
"response": {
"@type": "type.googleapis.com/google.cloud.apigee.v1.ControlPlaneAccess",
"name": "organizations/newpipeline-hybrid-org/controlPlaneAccess"
}
}
בודקים את ההגדרה ControlPlaneAccess של הארגון:
curl "https://apigee.googleapis.com/v1/organizations/ORG_NAME/controlPlaneAccess" \ -H "Authorization: Bearer $(gcloud auth print-access-token)"
התגובה אמורה להיראות כך:
{
"synchronizerIdentities": [
"serviceAccount:apigee-synchronizer@newpipeline-hybrid-org.iam.gserviceaccount.com"
],
"analyticsPublisherIdentities": [
"serviceAccount:apigee-runtime@newpipeline-hybrid-org.iam.gserviceaccount.com"
]
}
מעבר בין פייפליינים חדשים וישנים לניפוי באגים ולמיקום אחסון הנתונים ב-Analytics
אחרי שחשבונות השירות מקבלים את ההרשאה הנכונה, המשתמשים יכולים להעביר את מופע Apigee שלהם לשימוש בצינור החדש.
כדי לעבור לצינור החדש, מגדירים את newDataPipeline.debugSession: true ואת newDataPipeline.analytics: true בקובץ overrides.yaml.
כדי להפסיק להשתמש בצינור החדש, מגדירים את newDataPipeline.debugSession: false ואת newDataPipeline.analytics: false בקובץ overrides.yaml.
לדוגמה:
... rest of the overrides.yaml ...
gcp:
projectID: PROJECT_ID
region: ANALYTICS_REGION # Specifies the analytics region for the hybrid org. This attribute is
# the regional endpoint used to push analytics and debug data to the
# control plane. For example: us-central1
newDataPipeline:
debugSession: true # this flag enables debug session to use the new data pipeline
analytics: true # this flag enables analytics to use the new data pipeline
k8sCluster:
name: CLUSTER_NAME
region: CLUSTER_LOCATION # Must be the closest Google Cloud region to your cluster. For example, us-west1
org: ORG_NAME
... rest of the overrides.yaml ...
מחילים את השינויים האלה באמצעות הפקודה helm upgrade. משדרגים סביבה אחת בכל פעם. מציינים את הסביבה באמצעות --set env=ENV_NAME.
helm upgrade ENV_RELEASE_NAME apigee-env/ \ --install \ --namespace APIGEE_NAMESPACE \ --set env=ENV_NAME \ -f OVERRIDES_FILE
- ENV_RELEASE_NAME הוא השם שבו התקנתם בעבר את תרשים
apigee-env. - ENV_NAME הוא שם הסביבה שמשדרגים.