2016-11-09 69 views
2

我現在用的是後續的使用下面的代碼雲部署管理器:內部負載平衡器創建問題

- name: {{ env["name"] }}-port389-healthcheck 
type: compute.v1.healthChecks 
properties: 
    type: tcp 
    tcpHealthCheck: { 
    port: 389 
    } 

- name: {{ env["name"] }}-port389-backend-service 
type: compute.beta.backendService 
properties: 
    healthChecks: 
    - $(ref.{{ env["name"] }}-port389-healthcheck.selfLink) 
    backends: 
    - group: $(ref.{{ env['name'] }}-master-instance-groups-managed.instanceGroup) 
    - group: $(ref.{{ env['name'] }}-slave-instance-groups-managed.instanceGroup) 
    protocol: TCP 
    region: {{ properties['region'] }} 
    loadBalancingScheme: INTERNAL 

- name: {{ env["name"] }}-port389-forwarding-rule 
type: compute.beta.forwardingRule 
properties: 
    loadBalancingScheme: INTERNAL 
    ports: 
    - 389 
    network: default 
    region: {{ properties["region"] }} 
    backendService: $(ref.{{ env["name"] }}-port389-backend-service.selfLink) 

時有以下

Waiting for create operation-1478651694403-540d36cfdcdb9-cba25532-08697daf...failed. 
ERROR: (gcloud.beta.deployment-manager.deployments.create) Error in Operation operation-1478651694403-540d36cfdcdb9-cba25532-08697daf: 
errors: 
- code: RESOURCE_ERROR 
location: /deployments/forgerock/resources/forgerock-frontend-port389-backend-service-us-central1 
message: 'Unexpected response from resource of type compute.beta.backendService: 
    400 {"code":400,"errors":[{"domain":"global","message":"Invalid value for field 
    ''resource.loadBalancingScheme'': ''INTERNAL''. Load balancing scheme must be 
    external for a global backend service.","reason":"invalid"}],"message":"Invalid 
    value for field ''resource.loadBalancingScheme'': ''INTERNAL''. Load balancing 
    scheme must be external for a global backend service.","statusMessage":"Bad Request","requestPath":"https://www.googleapis.com/compute/beta/projects/carbide-tenure-557/global/backendServices"}' 
運行它errrors嘗試創建通過部署管理器的內部負載平衡器

它似乎使用的https://www.googleapis.com/compute/beta/projects/carbide-tenure-557/global/backendServices代替https://www.googleapis.com/compute/beta/projects/carbide-tenure-557/backendServices

的我知道這是測試版功能來創建,但是,試圖開發使用GDM代替gcloud命令和GDM

回答

0

對於類型,而不是type: compute.beta.backendService使用的混合此解決方案:

type: compute.v1.regionBackendService

+1

感謝您的幫助。幾個星期前,我在'Beta'文檔中發現了它,但它仍然失敗,但我使用'compute.beta.regionBackendService' –