העברת עומס עבודה
בדף הזה מוסבר איך לבצע ניתוח תאימות לפני העברת פרויקט קיים לתיקיית Assured Workloads. בניתוח הזה מושווים פרויקט המקור ותיקיית היעד של Assured Workloads כדי לקבוע אילו שינויים עשויים להידרש לפני או אחרי שתתחילו את ההעברה. לדוגמה, אם יש לכם פרויקט שאתם רוצים להעביר לתיקייה של Assured Workloads שהוגדרה בהתאם ל-FedRAMP Moderate, אתם יכולים לטפל מראש בכל הפרה פוטנציאלית של דרישות התאימות שעשויה להתרחש לפני העברת הפרויקט.
אלה סוגי הממצאים שמתקבלים מניתוח ההעברה:
- פרויקט המקור משתמש במוצרים או בשירותים שלא נתמכים.
- פרויקט המקור מכיל משאבים שנמצאים במיקום אסור.
- פרויקט המקור מוגדר עם ערכי אילוץ של מדיניות הארגון שלא תואמים לתיקיית היעד של Assured Workloads.
חשוב לגלות את הממצאים האלה לפני שמנסים לבצע העברה. כברירת מחדל, תיקייה של Assured Workloads יכולה להכיל רק סוגי משאבים של השירותים הנתמכים על ידי חבילת הבקרה של התיקייה. אם הפרויקט מכיל משאבים לשירות שלא נתמך בחבילת הבקרה של התיקייה, יכול להיות שתצטרכו לפרוס מחדש את המשאבים האלה או להסיר אותם.
אפשר לשנות את רשימת ברירת המחדל של השירותים הנתמכים בתיקייה של Assured Workloads על ידי שינוי מדיניות הארגון בנושא הגבלת השימוש במשאבים. כך אפשר לפרוס בתיקייה שירותים שלא עומדים בדרישות התאימות, אבל מערכות הבדיקה ברקע יתעלמו מהשירותים האלה ומהמשאבים שלהם. לכן, אם תפעילו שירות שלא נתמך, תבחרו לקחת את הסיכון שהוא עלול לגרום לעומס העבודה שלכם לחרוג מהתאימות.
העברת תיקיות ופרויקטים של Assured Workloads
אם אתם מעבירים תיקיות או פרויקטים של Assured Workloads, אתם יכולים להעביר אותם רק לתיקייה שמשתמשת באותו חבילת בקרה. אחרת, יכול להיות שתחויבו בעמלות נוספות על החיוב ותפגעו בסטטוס התאימות שלכם.
לפני שמתחילים
- אוספים את מזהי המשאבים של פרויקט המקור ושל תיקיית היעד ב-Assured Workloads.
- מקצים או מאמתים הרשאות IAM גם בפרויקט המקור וגם בתיקיית היעד של Assured Workloads, כדי לוודא שהמתקשר מורשה לבצע את ההעברה.
הרשאות IAM נדרשות
כדי לבצע ניתוח של העברה, צריך להעניק לקורא הרשאות IAM באמצעות תפקיד מוגדר מראש שכולל קבוצה רחבה יותר של הרשאות, או באמצעות תפקיד בהתאמה אישית שמוגבל להרשאות המינימליות הנדרשות.
נדרשות ההרשאות הבאות:
-
assuredworkloads.workload.getבעומס העבודה של היעד -
cloudasset.assets.searchAllResourcesבפרויקט המקור -
orgpolicy.policy.getבפרויקט המקור ובתיקיית היעד של Assured Workloads
ביצוע ניתוח של העברה
כשמבצעים ניתוח בפרויקט המקור ובתיקיית Assured Workloads של היעד, צריך לטפל בכל הממצאים לפני שמזיזים את הפרויקט ליעד. הממצאים לא מונעים את העברת הפרויקט, אבל הם עלולים להוביל להפרות של דרישות התאימות בתיקיית Assured Workloads ביעד.
הממצאים האלה הם משני סוגים שונים:
- אזהרה: תוצאה של אזהרה מתקבלת כשיש פוטנציאל לאי-תאימות בין פרויקט המקור לבין פרויקט היעד, וזה עלול להוביל להפרת תאימות. צריך לבדוק את האזהרות כדי לוודא שהאי-תאימות מקובלת או שצריך לטפל בה לפני המעבר.
- חסימה: תוצאת חסימה מתרחשת כשמזוהה הפרה של התאימות בין פרויקט המקור לבין פרויקט היעד. צריך לטפל בבעיות שמונעות את ההעברה לפני שממשיכים בהעברה.
אלה סוגי הממצאים שמדווחים:
מיקומי משאבים: חבילות בקרה רבות אוכפות הגבלות על מיקום המשאבים כדי לעמוד בדרישות התאימות. למשל, אם פרויקט המקור מכיל משאבים שנמצאים במיקום אסור.
כדי לפתור את הבעיה, מעבירים את המשאבים המושפעים למיקומים מותרים, מוחקים אותם או משנים את הגדרת האילוץ של מדיניות הארגון
gcp.resourceLocationsשל היעד.מוצרים או שירותים שלא נתמכים: כל חבילת אמצעי בקרה תומכת ברשימה ספציפית של Google Cloud מוצרים ושירותים. אם בפרויקט שלכם נעשה שימוש בשירות שלא נתמך בחבילת הבקרה של תיקיית Assured Workloads ביעד, הוא יופיע כתוצאה.
אילוצים של מדיניות הארגון: יכול להיות שפרויקט המקור מוגדר עם ערכי אילוצים של מדיניות הארגון ששונים מהמדיניות בפועל של תיקיית היעדים של Assured Workloads, או שלא עומדים בדרישות של חבילת הבקרה של היעד. הניתוח הזה מתבצע רק לגבי אילוצים שרלוונטיים לחבילת הבקרה של תיקיית Assured Workloads ביעד. לא מתבצעת הערכה של כל ערכי האילוצים בפרויקט. יכולות להיות כמה תוצאות, למשל הבעיות הבאות:
- יש חוסר תאימות בין הפרויקט שלכם לבין המדיניות האפקטיבית של היעד.
- בפרויקט יש ערכי אילוצים של מדיניות הארגון שלא מוגדרים ביעד, או להפך.
- בפרויקט יש ערכים של אילוצים של מדיניות הארגון שלא עומדים בדרישות של חבילת הבקרה של היעד.
אם נמצא חוסם לאילוץ של מדיניות הארגון, התשובה כוללת את הערכים הצפויים שתואמים לחבילת הבקרה של היעד. אפשר להשתמש בערכים הצפויים האלה כדי לבצע שינויים בפרויקט לפני שמבצעים העברה.
כדי לפתור את הבעיה, צריך לזהות את האילוץ של מדיניות הארגון שצריך לשנות, ואז לבצע את השינויים הנדרשים.
סוגי ממצאים שלא נתמכים
ניתוח המיגרציה לא תומך בסוגי הממצאים הבאים:
- חוסר תאימות ברמת המשאב לאילוצים של מדיניות הארגון, מלבד
gcp.resourceLocations. לדוגמה, חלק מחבילות הבקרה מוגדרות עם האילוץ הגלובליgcp.restrictCmekCryptoKeyProjectsאו עם האילוץcompute.disableNestedVirtualizationהספציפי ל-Compute Engine. אי התאמות לאילוצים האלה בין המקור ליעד לא מנותחות ולא מדווחות. - תכונות ספציפיות לשירות שאולי מושבתות בחבילת בקרה מסוימת. לדוגמה, בדיקות הזמינות של Cloud Monitoring מושבתות בתיקיות IL4, ופונקציות מרוחקות של BigQuery מושבתות בתיקיות ITAR. אם פרויקט המקור משתמש בתכונות מושבתות כאלה, אי-התאמות כאלה לא נבדקות ולא מדווחות.
ניתוח של העברת פרויקט לתיקיית Assured Workloads
השיטה analyzeWorkloadMove מבצעת ניתוח של העברת פרויקט המקור לתיקיית היעד של Assured Workloads.
בדוגמה של הבקשה שבהמשך, מחליפים את הפרמטרים הבאים בפרמטרים משלכם:
- ENDPOINT_URI: ה-URI של נקודת הקצה של שירות Assured Workloads.
ה-URI הזה חייב להיות נקודת הקצה שתואמת למיקום של עומס העבודה ביעד, למשל
https://us-west1-assuredworkloads.googleapis.comלעומס עבודה אזורי באזורus-west1ו-https://us-assuredworkloads.googleapis.comלעומס עבודה במספר אזורים בארה"ב. - DESTINATION_ORGANIZATION_ID: מזהה הארגון של עומס העבודה ביעד שאליו יועבר פרויקט המקור. לדוגמה:
919698201234 - DESTINATION_LOCATION_ID: המיקום של עומס העבודה ביעד. לדוגמה:
us-west1אוus. הוא תואם לערךdata regionשל עומס העבודה. - DESTINATION_WORKLOAD_ID: המזהה של תיקיית Assured Workloads של היעד שאליה יועבר פרויקט המקור.
לדוגמה:
00-701ea036-7152-4780-a867-9f5 - SOURCE_PROJECT_ID: פרמטר שאילתה למזהה של פרויקט המקור שרוצים להעביר. לדוגמה:
my-project-123 - ASSET_TYPES: אופציונלי. פרמטר שאילתה אחד של סוג נכס שיסנן את הממצאים כך שיוצגו רק הסוגים שצוינו.
לדוגמה:
cloudresourcemanager.googleapis.com/Project - PAGE_SIZE: אופציונלי. פרמטר שאילתה למספר התוצאות שיוחזרו בכל דף, עד למקסימום של 50. לדוגמה:
5 - PAGE_TOKEN: אופציונלי. פרמטר של שאילתה לאסימון להמשך תוצאות עם חלוקה לדפים. לדוגמה:
CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA
שיטת HTTP, כתובת URL ופרמטרים של שאילתה:
GET https://[ENDPOINT_URI]/v1/organizations/[DESTINATION_ORGANIZATION_ID]/locations/[DESTINATION_LOCATION_ID]/workloads/[DESTINATION_WORKLOAD_ID]:analyzeWorkloadMove?project=projects/SOURCE_PROJECT_ID&page_size=PAGE_SIZE&page_token=PAGE_TOKEN
לדוגמה:
GET https://us-west1-assuredworkloads.googleapis.com/v1/organizations/919698298765/locations/us-west1/workloads/00-701ea036-7152-4781-a867-9f5:analyzeWorkloadMove?project=projects/my-project-123&page_size=5&page_token=CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA
אתם אמורים לקבל תגובת JSON שדומה לזו:
{ "assetMoveAnalyses": [ { "asset": "//orgpolicy.googleapis.com/projects/130536381852/policies/container.restrictNoncompliantDiagnosticDataAccess", "assetType": "orgpolicy.googleapis.com/Policy" }, { "asset": "//compute.googleapis.com/projects/my-project-123/global/routes/default-route-9ca6e6b0ab7326f0", "assetType": "compute.googleapis.com/Route", "analysisGroups": [ { "displayName": "RESOURCE_LOCATIONS", "analysisResult": { "warnings": [ { "detail": "The asset's location 'global' is incompatible with the gcp.resourceLocations org policy effective at the target. In case of 'global only' assets, this may be ignored." } ] } } ] }, { "asset": "//compute.googleapis.com/projects/my-project-123/regions/europe-west10/subnetworks/default", "assetType": "compute.googleapis.com/Subnetwork", "analysisGroups": [ { "displayName": "RESOURCE_LOCATIONS", "analysisResult": { "blockers": [ { "detail": "The asset's location 'europe-west10' is incompatible with the gcp.resourceLocations org policy effective at the target." } ] } } ] }, { "asset": "//serviceusage.googleapis.com/projects/130536381852/services/servicemanagement.googleapis.com", "assetType": "serviceusage.googleapis.com/Service" }, { "asset": "//serviceusage.googleapis.com/projects/130536381852/services/monitoring.googleapis.com", "assetType": "serviceusage.googleapis.com/Service" }, { "asset": "//serviceusage.googleapis.com/projects/130536381852/services/bigquerymigration.googleapis.com", "assetType": "serviceusage.googleapis.com/Service", "analysisGroups": [ { "displayName": "DISALLOWED_SERVICES", "analysisResult": { "warnings": [ { "detail": "This service is not allowed by the gcp.restrictServiceUsage org policy effective at the target" } ] } } ] }, { "asset": "//cloudresourcemanager.googleapis.com/projects/my-project-123", "assetType": "cloudresourcemanager.googleapis.com/Project", "analysisGroups": [ { "displayName": "ORG_POLICIES", "analysisResult": { "warnings": [ { "detail": "constraints/gcp.resourceLocations: Target applies/inherits this custom policy and it is not applied by the source. Upon moving, this policy will get inherited from the target." }, { "detail": "constraints/compute.disableInstanceDataAccessApis: Source applies this custom policy and it is not applied by the target." }, { "detail": "constraints/cloudkms.allowedProtectionLevels: Source and target set different values for this policy." }, { "detail": "constraints/container.restrictNoncompliantDiagnosticDataAccess: Source and target set different values for this policy." }, { "detail": "constraints/gcp.restrictServiceUsage: Target applies/inherits this custom policy and it is not applied by the source. Upon moving, this policy will get inherited from the target." } ], "blockers": [ { "detail": "constraints/gcp.resourceLocations: The value applied at the source is not compliant with the target compliance program. The expected allowed values are [us-west4, us-west1, us-west2, us-west3, us-central1, us-east1, us-east4, us-south1, us-central2, us-east5]." }, { "detail": "constraints/container.restrictNoncompliantDiagnosticDataAccess: The value applied at the source is not compliant with the target compliance program. The expected value is [true]." }, { "detail": "constraints/container.restrictTLSVersion: The value applied at the source is not compliant with the target compliance program. The expected denied values are [TLS_VERSION_1, TLS_VERSION_1_1]." } ] } } ] } ], "nextPageToken": "Ch8wLDc0MzY3NTExNCwzMzg4ODM1NTM2NDQ0NTg4MDMy" }
כדי לסנן את הממצאים לפי סוג נכס ספציפי, משתמשים בפרמטר השאילתה asset_types:
GET https://assuredworkloads.googleapis.com/v1/organizations/919698298765/locations/us-west1/workloads/00-701ea036-7152-4781-a867-9f5:analyzeWorkloadMove?project=projects/my-project-123&asset_types=cloudresourcemanager.googleapis.com/Project&page_size=5&page_token=CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA
התוצאות יכללו רק ממצאים מהסוג שצוין (cloudresourcemanager.googleapis.com/Project):
{ "assetMoveAnalyses": [ { "asset": "//cloudresourcemanager.googleapis.com/projects/my-project-123", "assetType": "cloudresourcemanager.googleapis.com/Project", "analysisGroups": [ { "displayName": "ORG_POLICIES", "analysisResult": { "warnings": [ { "detail": "constraints/gcp.resourceLocations: Target applies/inherits this custom policy and it is not applied by the source. Upon moving, this policy will get inherited from the target." }, { "detail": "constraints/compute.disableInstanceDataAccessApis: Source applies this custom policy and it is not applied by the target." } ], "blockers": [ { "detail": "constraints/gcp.resourceLocations: The value applied at the source is not compliant with the target compliance program. The expected allowed values are [us-west4, us-west1, us-west2, us-west3, us-central1, us-east1, us-east4, us-south1, us-central2, us-east5]." } ] } } ] } ], "nextPageToken": "Ch8wLDc0MzY3NTExNCwzMzg4ODM1NTM2NDQ0NTg4MDMy" }
כדי לסנן את הממצאים לפי יותר מסוג נכס אחד, מוסיפים כל אחד מהם כפרמטר שאילתה נוסף:
GET https://assuredworkloads.googleapis.com/v1/organizations/919698298765/locations/us-west1/workloads/00-701ea036-7152-4781-a867-9f5:analyzeWorkloadMove?project=projects/my-project-123&asset_types=cloudresourcemanager.googleapis.com/Project&asset_types=serviceusage.googleapis.com/Service&page_size=5&page_token=CiAKGjBpNDd2Nmp2Zml2cXRwYjBpOXA
התוצאות יכללו רק ממצאים מהסוגים שצוינו (cloudresourcemanager.googleapis.com/Project ו-serviceusage.googleapis.com/Service):
{ "assetMoveAnalyses": [ { "asset": "//serviceusage.googleapis.com/projects/130536381852/services/bigquerymigration.googleapis.com", "assetType": "serviceusage.googleapis.com/Service", "analysisGroups": [ { "displayName": "DISALLOWED_SERVICES", "analysisResult": { "warnings": [ { "detail": "This service is not allowed by the gcp.restrictServiceUsage org policy effective at the target" } ] } } ] }, { "asset": "//cloudresourcemanager.googleapis.com/projects/my-project-123", "assetType": "cloudresourcemanager.googleapis.com/Project", "analysisGroups": [ { "displayName": "ORG_POLICIES", "analysisResult": { "warnings": [ { "detail": "constraints/gcp.resourceLocations: Target applies/inherits this custom policy and it is not applied by the source. Upon moving, this policy will get inherited from the target." }, { "detail": "constraints/compute.disableInstanceDataAccessApis: Source applies this custom policy and it is not applied by the target." } ], "blockers": [ { "detail": "constraints/gcp.resourceLocations: The value applied at the source is not compliant with the target compliance program. The expected allowed values are [us-west4, us-west1, us-west2, us-west3, us-central1, us-east1, us-east4, us-south1, us-central2, us-east5]." } ] } } ] } ], "nextPageToken": "Ch8wLDc0MzY3NTExNCwzMzg4ODM1NTM2NDQ0NTg4MDMy" }
אחרי שמבצעים את ניתוח ההעברה, בודקים את האזהרות או את הבעיות שמונעות את ההעברה ומטפלים בהן, ואז מריצים שוב את הניתוח כדי לוודא שהן נפתרו. אחרי כן, אפשר להמשיך להעביר את הפרויקט.
המאמרים הבאים
- הסבר על חבילות הבקרה של Assured Workloads.
- אילו מוצרים נתמכים בכל חבילת אמצעי בקרה