Apigee Connect

์ด ์„น์…˜์—์„œ๋Š” ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ๊ด€๋ฆฌ ์˜์—ญ๊ณผ ๋Ÿฐํƒ€์ž„ ์˜์—ญ์˜ MART ์„œ๋น„์Šค ์‚ฌ์ด์˜ ํ†ต์‹ ์„ ์œ„ํ•ด Apigee Connect๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค.

์†Œ๊ฐœ

Apigee Connect๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์ธํ„ฐ๋„ท์— MART ์—”๋“œํฌ์ธํŠธ๋ฅผ ๋…ธ์ถœํ•  ํ•„์š” ์—†์ด Apigee Hybrid ๊ด€๋ฆฌ ์˜์—ญ์„ ๋Ÿฐํƒ€์ž„ ์˜์—ญ์˜ MART ์„œ๋น„์Šค์— ์•ˆ์ „ํ•˜๊ฒŒ ์—ฐ๊ฒฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Apigee Connect๋ฅผ ์‚ฌ์šฉํ•  ๊ฒฝ์šฐ ํ˜ธ์ŠคํŠธ ๋ณ„์นญ ๋ฐ ์Šน์ธ๋œ DNS ์ธ์ฆ์„œ๋กœ MART ์ธ๊ทธ๋ ˆ์Šค ๊ฒŒ์ดํŠธ์›จ์ด๋ฅผ ๊ตฌ์„ฑํ•  ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.

Apigee Connect๊ฐ€ ํ‘œ์‹œ๋œ ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ๋Ÿฐํƒ€์ž„ ์˜์—ญ์—์„œ ์‹คํ–‰๋˜๋Š” ๊ธฐ๋ณธ ์„œ๋น„์Šค

๊ธฐ๋ณธ ์š”๊ฑด

Apigee Hybrid 1.2.0 ์ด์ƒ

ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ๋Ÿฐํƒ€์ž„์— Apigee Connect ์ถ”๊ฐ€

Apigee Connect๋Š” Apigee Hybrid ๋ฒ„์ „ 1.3.0 ์ด์ƒ์„ ์ƒˆ๋กœ ์„ค์น˜ํ•  ๋•Œ ๊ธฐ๋ณธ์ ์œผ๋กœ ์‚ฌ์šฉ ์„ค์ •๋ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์ด ๋‹จ๊ณ„๋Š” ์ด์ „ ๋ฒ„์ „์—์„œ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜๋Š” ๊ฒฝ์šฐ์—๋งŒ ํ•„์š”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Apigee Connect๊ฐ€ ๊ตฌ์„ฑ๋˜์—ˆ๊ณ  ์‚ฌ์šฉ ์„ค์ •๋˜์—ˆ์œผ๋ฉด MART ์ธ๊ทธ๋ ˆ์Šค๊ฐ€ ๋ฌด์‹œ๋ฉ๋‹ˆ๋‹ค. ๊ด€๋ฆฌ ์˜์—ญ์€ Apigee Connect๋ฅผ ์‚ฌ์šฉํ•ด์„œ๋งŒ MART์— ์—ฐ๊ฒฐ๋ฉ๋‹ˆ๋‹ค. ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ๋Ÿฐํƒ€์ž„ ์˜์—ญ ๊ฐ„์˜ ๋ชจ๋“  MART ํŠธ๋ž˜ํ”ฝ์€ ์•ˆ์ „ํ•œ Apigee Connect ์—ฐ๊ฒฐ์„ ํ†ตํ•ด ์ „๋‹ฌ๋ฉ๋‹ˆ๋‹ค.

Apigee Hybrid์—์„œ Apigee Connect๋ฅผ ์‚ฌ์šฉ ์„ค์ •ํ•˜๊ณ  ์‚ฌ์šฉํ•˜๋ ค๋ฉด ๋‹ค์Œ ๋‹จ๊ณ„๋ฅผ ๋”ฐ๋ฅด์„ธ์š”.

  1. Google Cloud API ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์—์„œ Apigee Connect API๋ฅผ ์‚ฌ์šฉ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. Google Cloud(GCP) Console์—์„œ ๋˜๋Š” gcloud๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ API๋ฅผ ์‚ฌ์šฉ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Google Cloud ์ฝ˜์†”์—์„œ API ์‚ฌ์šฉ ์„ค์ •์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ 3๋‹จ๊ณ„: API ์‚ฌ์šฉ ์„ค์ •์„ ์ฐธ์กฐํ•˜์„ธ์š”. gcloud๋ฅผ ์‚ฌ์šฉํ•ด์„œ API๋ฅผ ์‚ฌ์šฉ ์„ค์ •ํ•˜๋ ค๋ฉด ๋‹ค์Œ ์•ˆ๋‚ด๋ฅผ ๋”ฐ๋ฅด์„ธ์š”.
    1. gcloud์—์„œ ํ˜„์žฌ ํ”„๋กœ์ ํŠธ๋ฅผ Apigee๊ฐ€ ์‚ฌ์šฉ ์„ค์ •๋˜์—ˆ๊ณ  Apigee ์กฐ์ง์ด ํ”„๋กœ๋น„์ €๋‹๋œ ๋™์ผํ•œ GCP ํ”„๋กœ์ ํŠธ๋กœ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
      $ gcloud config set project YOUR_GCP_PROJECT_ID

      ์—ฌ๊ธฐ์„œ YOUR_GCP_PROJECT_ID๋Š” ํ”„๋กœ์ ํŠธ ID์ž…๋‹ˆ๋‹ค.

    2. Apigee Connect API๊ฐ€ ์ด๋ฏธ ์‚ฌ์šฉ ์„ค์ •๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.
      gcloud services list
      NAME                                 TITLE
      apigee.googleapis.com                Apigee API
      apigeeconnect.googleapis.com         Apigee Connect API
      bigquery.googleapis.com              BigQuery API
      
      ...
    3. ๊ฒฐ๊ณผ์— apigeeconnect.googleapis.com์ด ์—†์œผ๋ฉด API๋ฅผ ์‚ฌ์šฉ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
      $ gcloud services enable apigeeconnect.googleapis.com
  2. Apigee Hybrid ์„ค์น˜ ์•ˆ๋‚ด์˜ ์„œ๋น„์Šค ๊ณ„์ • ๋งŒ๋“ค๊ธฐ ๋‹จ๊ณ„์—์„œ ๋งŒ๋“  MART ์„œ๋น„์Šค ๊ณ„์ •์— Apigee Connect ์—์ด์ „ํŠธ ์—ญํ• ์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
    1. ํ•„์š”ํ•œ ๊ฒฝ์šฐ MART ์„œ๋น„์Šค ๊ณ„์ •์˜ ์ด๋ฉ”์ผ ์ฃผ์†Œ๋ฅผ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค.
      gcloud iam service-accounts list
      NAME                          EMAIL                                                 DISABLED
      apigee-mart                   apigee-mart@hybrid-example.iam.gserviceaccount.com       False
      
      ...
    2. MART ์„œ๋น„์Šค ๊ณ„์ •์— ์ด๋ฏธ ์—ญํ• ์ด ํ• ๋‹น๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.
      gcloud projects get-iam-policy YOUR_GCP_PROJECT_ID
      ...
      
      - members:
        - serviceAccount:apigee-mart@hybrid-example.iam.gserviceaccount.com
        role: roles/apigeeconnect.Agent
      
      ...
    3. ๊ฒฐ๊ณผ์— role: roles/apigeeconnect.Agent๊ฐ€ ์—†์œผ๋ฉด ์—ญํ• ์„ ํ• ๋‹นํ•ฉ๋‹ˆ๋‹ค.
      gcloud projects add-iam-policy-binding YOUR_GCP_PROJECT_ID \
      --member serviceAccount:YOUR_MART_SERVICE_ACCOUNT_EMAIL --role roles/apigeeconnect.Agent

      ์—ฌ๊ธฐ์—์„œ YOUR_GCP_PROJECT_ID๋Š” GCP ํ”„๋กœ์ ํŠธ์˜ ID์ด๊ณ  YOUR_MART_SERVICE_ACCOUNT_EMAIL์€ MART ์„œ๋น„์Šค ๊ณ„์ • ์ด๋ฉ”์ผ ์ฃผ์†Œ์ž…๋‹ˆ๋‹ค.

    Apigee Connect ์—์ด์ „ํŠธ ์—ญํ• ์€ ์‚ฌ์ „ ์ •์˜๋˜์–ด ์žˆ์œผ๋ฉฐ ๋‹ค์Œ ๊ถŒํ•œ์ด ํ• ๋‹น๋ฉ๋‹ˆ๋‹ค.

    ๊ถŒํ•œ ์„ค๋ช…
    apigeeconnect.endpoints.connect Apigee Connect ์—์ด์ „ํŠธ๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋Š” ๊ถŒํ•œ์ž…๋‹ˆ๋‹ค.

    GCP Console ๋˜๋Š” API๋ฅผ ํ†ตํ•œ ์•ก์„ธ์Šค ๊ถŒํ•œ ๋ถ€์—ฌ ํ• ๋‹น์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ ๋‹ค์Œ์„ ์ฐธ์กฐํ•˜์„ธ์š”.

  3. ์„œ๋น„์Šค ๊ณ„์ • ๋งŒ๋“ค๊ธฐ์— ์„ค๋ช…๋œ ๋Œ€๋กœ MART ์„œ๋น„์Šค ๊ณ„์ •์˜ ํ‚ค ํŒŒ์ผ์ด hybrid_files/service_accounts ๋””๋ ‰ํ„ฐ๋ฆฌ์— ์žˆ๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.
  4. ์žฌ์ •์˜ ํŒŒ์ผ์„ ์—ฝ๋‹ˆ๋‹ค. connectAgent:enabled ์†์„ฑ์ด true๋กœ ์„ค์ •๋˜์ง€ ์•Š์•˜๊ฑฐ๋‚˜ ๋ˆ„๋ฝ๋˜์—ˆ์œผ๋ฉด ๋‹ค์Œ ์Šคํƒ ์ž๋ฅผ ์ถ”๊ฐ€ํ•˜๊ฑฐ๋‚˜ ์—…๋ฐ์ดํŠธํ•ฉ๋‹ˆ๋‹ค.

    Apigee Connect ์Šคํƒ ์ž๋Š” ์ฆ‰์‹œ k8sCluster ์Šคํƒ ์ž๋ฅผ ๋”ฐ๋ผ์•ผ ํ•ฉ๋‹ˆ๋‹ค.

    ์ด ๊ตฌ์„ฑ์—์„œ๋Š” ๋‹ค์šด๋กœ๋“œ๋œ ์„œ๋น„์Šค ๊ณ„์ • ํ‚ค์— ๋Œ€ํ•œ ๊ฒฝ๋กœ๋ฅผ ์ œ๊ณตํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ํ‚ค๋Š” Apigee Connect ์—์ด์ „ํŠธ ์—ญํ• ์ด ์žˆ๋Š” ์„œ๋น„์Šค ๊ณ„์ •์— ์‚ฌ์šฉ๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

    # Apigee Connect Agent
    connectAgent:
      enabled: true
      serviceAccountPath: ./service-accounts/MART_SA_KEYFILE.json
    # Apigee Connect Agent
    connectAgent:
      enabled: true
      replicaCountMin: 3
      serviceAccountPath: ./service-accounts/connect_agent_sa_key.json
  5. ์กฐ์ง์— Apigee Connect ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ๋Šฅ ์ด๋ฆ„์€ features.mart.connect.enabled์ž…๋‹ˆ๋‹ค.
    1. ๋™๊ธฐํ™” ๋‹ด๋‹น์ž ์•ก์„ธ์Šค ์‚ฌ์šฉ ์„ค์ • ์„น์…˜์— ์„ค๋ช…๋œ ๋Œ€๋กœ Apigee Hybrid๋ฅผ ์ฒ˜์Œ ์„ค์น˜ํ•  ๋•Œ ์‚ฌ์šฉํ•œ Apigee ์กฐ์ง ๊ด€๋ฆฌ์ž ์—ญํ• ์ด ์žˆ๋Š” ์„œ๋น„์Šค ๊ณ„์ • ํ‚ค๋ฅผ ์ฐพ์Šต๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ apigee-org-admin ์„œ๋น„์Šค ๊ณ„์ •์ž…๋‹ˆ๋‹ค. ์•„๋ž˜ ์„ค๋ช…๋œ ๋Œ€๋กœ API ํ˜ธ์ถœ์„ ์ˆ˜ํ–‰ํ•˜๋Š” ๋ฐ ํ•„์š”ํ•œ ํ† ํฐ์„ ์ƒ์„ฑํ•˜๋ ค๋ฉด ์ด ํ‚ค๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
    2. ๋‹ค์Œ ๋‘ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•˜์—ฌ ํ† ํฐ์„ ๊ฐ€์ ธ์˜ต๋‹ˆ๋‹ค.
      export GOOGLE_APPLICATION_CREDENTIALS=org-admin-service-account-file
      $ export TOKEN=$(gcloud auth application-default print-access-token)

      ์—ฌ๊ธฐ์„œ org-admin-service-account-file์€ ์‹œ์Šคํ…œ์—์„œ Apigee ์กฐ์ง ๊ด€๋ฆฌ์ž ์—ญํ• ์ด ์žˆ๋Š” ์„œ๋น„์Šค ๊ณ„์ • ํ‚ค์— ๋Œ€ํ•œ ๊ฒฝ๋กœ์ž…๋‹ˆ๋‹ค.

    3. Apigee Connect๊ฐ€ ์ด๋ฏธ ์‚ฌ์šฉ ์„ค์ •๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.
      curl  https://apigee.googleapis.com/v1/organizations/your_org_name \
        -H "Authorization: Bearer $TOKEN"

      ๊ฒฐ๊ณผ๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

        "properties": {
          "property": [
            {
              "name": "features.mart.connect.enabled",
              "value": "true"
            },
            {
              "name": "features.hybrid.enabled",
              "value": "true"
            }
          ]
        },
    4. ๊ฒฐ๊ณผ์— true๋กœ ์„ค์ •๋œ features..mart.connect.enabled๊ฐ€ ์—†์œผ๋ฉด ๋‹ค์Œ Apigee API๋ฅผ ํ˜ธ์ถœํ•˜์—ฌ ์กฐ์ง์— Apigee Connect๋ฅผ ์‚ฌ์šฉ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.
      curl -v -X PUT \
         https://apigee.googleapis.com/v1/organizations/your_org_name \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer $TOKEN" \
        -d '{
        "name" : "your_org_name",
        "properties" : {
          "property" : [ {
            "name" : "features.hybrid.enabled",
            "value" : "true"
          }, {
            "name" : "features.mart.connect.enabled",
            "value" : "true"
          } ]
        }
      }'

  6. ํด๋Ÿฌ์Šคํ„ฐ์—์„œ Apigee Connect ์—์ด์ „ํŠธ๋ฅผ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค.

    ์œ„ ๋‹จ๊ณ„ ์ค‘์—์„œ ํ•ญ๋ชฉ์„ ๋ณ€๊ฒฝํ•œ ๊ฒฝ์šฐ์—๋Š” ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•ด์„œ Apigee Connect ์—์ด์ „ํŠธ๋ฅผ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค.

     $APIGEECTL_HOME/apigeectl apply -f your_overrides_file.yaml --org

  7. mart:
      hostAlias: "mart.apigee-hybrid-docs.net"  # ignored when Apigee Connect is enabled.
      serviceAccountPath: ./service-accounts/example-project-apigee-mart.json
      sslCertPath: ./certs/fullchain.pem  # ignored when Apigee Connect is enabled.
      sslKeyPath: ./certs/privkey.key  # ignored when Apigee Connect is enabled.
  8. Apigee Connect ์—์ด์ „ํŠธ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค. ๋ณด๊ณ ๋œ ์˜ค๋ฅ˜๊ฐ€ ์—†์œผ๋ฉด ์—…๊ทธ๋ ˆ์ด๋“œ๊ฐ€ ์„ฑ๊ณตํ•ฉ๋‹ˆ๋‹ค.
    kubectl logs -n namespace apigee-connect-agent-pod-name

    Apigee Connect ์—์ด์ „ํŠธ์—์„œ ๋‹ค์Œ ๋กœ๊ทธ ์นดํ…Œ๊ณ ๋ฆฌ๋ฅผ ๋ณด๊ณ ํ•ฉ๋‹ˆ๋‹ค.
    ๊ฐ์‚ฌ ๋กœ๊ทธ ์นดํ…Œ๊ณ ๋ฆฌ ์ž‘์—…
    DATA_READ ConnectionService.ListConnections
    DATA_WRITE Tether.Egress
    Apigee Hybrid์—์„œ ๊ฐ์‚ฌ ๋กœ๊ทธ ํ™•์ธ์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ ๊ฐ์‚ฌ ๋กœ๊น… ์ •๋ณด๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.
  9. ์ด ์—…๊ทธ๋ ˆ์ด๋“œ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ํ•˜์ด๋ธŒ๋ฆฌ๋“œ ๋Ÿฐํƒ€์ž„ ์˜์—ญ์ด Apigee Connect๋ฅผ ํ†ตํ•ด ๊ด€๋ฆฌ ์˜์—ญ๊ณผ ํ†ต์‹ ํ•ฉ๋‹ˆ๋‹ค.

  10. ์„ค์น˜๋ฅผ ํ…Œ์ŠคํŠธํ•ฉ๋‹ˆ๋‹ค.

์ฐธ์กฐ: Apigee Connect ์ œ๊ฑฐ

์„ค์น˜ ํ…Œ์ŠคํŠธ

  1. Apigee Hybrid UI๋ฅผ ์—ฝ๋‹ˆ๋‹ค.
  2. ์ด์ „์— ๋งŒ๋“  ๊ฐœ๋ฐœ์ž ๋ฐ ๊ฐœ๋ฐœ์ž ์•ฑ์ด UI์— ์žˆ๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ํ•ญ๋ชฉ์€ MART ์„œ๋ฒ„์—์„œ ์ฟผ๋ฆฌ๋˜์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ๊ด€๋ฆฌ ์˜์—ญ๊ณผ ๋Ÿฐํƒ€์ž„ ์˜์—ญ ๊ฐ„ ํ†ต์‹ ์ด ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ๊ตฌ์„ฑ๋œ ๊ฒฝ์šฐ์—๋งŒ ์ œ๊ณต๋ฉ๋‹ˆ๋‹ค.
  3. ์š”์ฒญ์ด MART ์ธ๊ทธ๋ ˆ์Šค๊ฐ€ ์•„๋‹ˆ๋ผ Apigee Connect๋ฅผ ํ†ต๊ณผํ•˜๋Š”์ง€ ํ™•์ธํ•˜๋ ค๋ฉด MART ์„œ๋ฒ„ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค. apigee-connect-agent-1.0์ด๋ผ๋Š” Apigee Connect ์—์ด์ „ํŠธ์— ๋Œ€ํ•œ ํ•ญ๋ชฉ์ด ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.
    kubectl logs -n apigee apigee-mart-orgname-rc101-q72tl --org | grep connect

    ์˜ˆ๋ฅผ ๋“ค๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

    "2020-07-31 04:59:52,321 org: env: target: action: context-id: mode: pool-1-thread-1 INFO.
    gserviceaccount.com 1576040392317 /v1/organizations/apigee-connect-hybrid-prod/developers/
    count=100&expand=true&startKey=4ee9e8f7-12b2-4cde-bf10-32d991469876 200 GET apigee-connect
    -hybrid-prod 10.40.11.3 10.40.0.5 apigee-connect-agent-1.0 null"
  4. ์Šน์ธ ํ† ํฐ์„ ์ƒˆ๋กœ๊ณ ์นจํ•ฉ๋‹ˆ๋‹ค.
    export TOKEN=$(gcloud auth application-default print-access-token)
  5. Apigee API๋ฅผ ํ˜ธ์ถœํ•˜์—ฌ apigee-mart ์—”๋“œํฌ์ธํŠธ์— ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์ŠคํŠธ๋ฆฌ๋ฐ ์—ฐ๊ฒฐ์„ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.
    curl -s https://apigeeconnect.googleapis.com/v1/projects/YOUR_GCP_PROJECT_ID/endpoints/apigee_mart/connections \
      -H "Authorization: Bearer $TOKEN"
    {
      "connections": [
        {
          "endpoint": "projects/865098068308/endpoints/apigee_mart",
          "cluster": {
            "name": "apigee-connect-test-cluster2",
            "region": "australia-southeast1"
          },
          "streamCount": 4
        },
        {
          "endpoint": "projects/865098068308/endpoints/apigee_mart",
          "cluster": {
            "name": "apigee-connect-test-cluster",
            "region": "us-central1"
          },
          "streamCount": 2
        }
      ]
    }
  6. Apigee Connect ์—์ด์ „ํŠธ ๋กœ๊ทธ๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.
    kubectl logs -n namespace apigee-connect-agent-YOUR_GCP_PROJECT_ID-<....>

    ๋‹ค์Œ ๋กœ๊ทธ๋Š” Apigee Connect ์—์ด์ „ํŠธ๊ฐ€ ์‹œ์ž‘๋˜์—ˆ๊ณ  ์˜ฌ๋ฐ”๋ฅด๊ฒŒ ํ†ต์‹ ํ•˜๊ณ  ์žˆ์Œ์„ ๋‚˜ํƒ€๋ƒ…๋‹ˆ๋‹ค.

    I0719 11.66:10.765526 2314949 main.go:47] Agent's flag values below
    I0719 11.66:10.765928 2314949 main.go:50] "alsologtostderr" : false
    I0719 11.66:10.765940 2314949 main.go:50] "cluster_name" : testABC
    I0719 11.66:10.765947 2314949 main.go:50] "cluster_region" : us-west2
    I0719 11.66:10.765953 2314949 main.go:50] "cpu_profile_enabled" : false
    I0719 11.66:10.765959 2314949 main.go:50] "http_client_timeout" : 2m0s
    I0719 11.66:10.765966 2314949 main.go:50] "http_port" : 7070
    I0719 11.66:10.765972 2314949 main.go:50] "http_server" : false
    I0719 11.66:10.765978 2314949 main.go:50] "insecure_ssl" : false
    I0719 11.66:10.765984 2314949 main.go:50] "local_cert" :
    I0719 11.66:10.765990 2314949 main.go:50] "log_backtrace_at" : :0
    I0719 11.66:10.766001 2314949 main.go:50] "log_dir" :
    I0719 11.66:10.766007 2314949 main.go:50] "logtostderr" : true
    I0719 11.66:10.766012 2314949 main.go:50] "mem_profile_enabled" : false
    I0719 11.66:10.766018 2314949 main.go:50] "project" : projects/apigee-connect-hybrid-prod
    I0719 11.66:10.766025 2314949 main.go:50] "resource_id" :
    I0719 11.66:10.766031 2314949 main.go:50] "server_addr" : apigeeconnect.googleapis.com:443
    I0719 11.66:10.766036 2314949 main.go:50] "server_cert" : ./server.crt
    I0719 11.66:10.766042 2314949 main.go:50] "server_key" : ./server.key
    I0719 11.66:10.766047 2314949 main.go:50] "stderrthreshold" : 2
    I0719 11.66:10.766054 2314949 main.go:50] "target_server" : http://127.0.0.1/
    I0719 11.66:10.766059 2314949 main.go:50] "tether_endpoint" : APIGEE_MART
    I0719 11.66:10.766065 2314949 main.go:50] "v" : 0
    I0719 11.66:10.766072 2314949 main.go:50] "vmodule" :
    I0719 11.66:10.845441 2314949 agent.go:400] successfully initiated http client
    I0719 11.66:10.845772 2314949 agent.go:728] starting metrics http server at ":7070"
    I0719 11.66:11.231.69 2314949 agent.go:245] listening on tether 6407043920806543360
    I0719 11.68:11.346544 2314949 agent.go:245] listening on tether 2101602677040349184
    I0719 12:00:11.461084 2314949 agent.go:245] listening on tether 9109203697228840960
    I0719 12:02:11.683743 2314949 agent.go:245] listening on tether 8978599308035096576
    I0719 12:02:40.325633 2314949 agent.go:255] tether id 6407043920806543360 is closed
    
    ...
  7. ํ•˜์ด๋ธŒ๋ฆฌ๋“œ UI์—์„œ API ์ œํ’ˆ, ๊ฐœ๋ฐœ์ž, ๊ฐœ๋ฐœ์ž ์•ฑ์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฐ ํ›„ ํ”„๋ก์‹œ์— ๋Œ€ํ•ด API ํ˜ธ์ถœ์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

    ์š”์ฒญ์„ ์ฒ˜๋ฆฌํ•˜๋Š” ๋™์•ˆ ์ƒ์„ฑ๋œ Connect ์—์ด์ „ํŠธ ๋กœ๊ทธ๋Š” ์ƒํƒœ ๋˜๋Š” ์˜ค๋ฅ˜๋ฅผ ํ™•์ธํ•˜๋Š”๋ฐ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค.

    kubectl logs -n namespace apigee-connect-agent-YOUR_GCP_PROJECT_ID-<....>
    INFO: 2020/04/13 03:29:08 "961ff385-600a-427a-8864-ba066ff42330": received response from target
    "apigee-mart-apigee-connect-hybrid-prod.apigee.svc.cluster.local:8843", status code: 200
    INFO: 2020/04/13 03:29:08 Attempting to send response 961ff385-600a-427a-8864-ba066ff42330 on
    tether 16734438331890270208
    INFO: 2020/04/13 03:29:09 "e2fc0492-6e78-4c58-972b-7de8258b9e86": received response from target
    "apigee-mart-apigee-connect-hybrid-prod.apigee.svc.cluster.local:8843", status code: 200
    INFO: 2020/04/13 03:29:09 Attempting to send response e2fc0492-6e78-4c58-972b-7de8258b9e86 on
    tether 12483040283652521984
    INFO: 2020/04/13 03:29:10 "1ab3023b-b763-4b91-bf4f-ca8c02f62e50": received response from target
    "apigee-mart-apigee-connect-hybrid-prod.apigee.svc.cluster.local:8843", status code: 200
    INFO: 2020/04/13 03:29:10 Attempting to send response 1ab3023b-b763-4b91-bf4f-ca8c02f62e50 on
    tether 12483040283652521984
    INFO: 2020/04/13 03:29:12 "1fa3e3c3-a36e-4ff1-b2d3-5cf14f2f8fdd": received response from target
    "apigee-mart-apigee-connect-hybrid-prod.apigee.svc.cluster.local:8843", status code: 200
    INFO: 2020/04/13 03:29:12 Attempting to send response 1fa3e3c3-a36e-4ff1-b2d3-5cf14f2f8fdd on
    tether 16734438331890270208
    INFO: 2020/04/13 03:29:13 "09b7ef9d-f53d-466a-a174-e88fc7e5286d": received response from target
    "apigee-mart-apigee-connect-hybrid-prod.apigee.svc.cluster.local:8843", status code: 200
    INFO: 2020/04/13 03:29:13 Attempting to send response 09b7ef9d-f53d-466a-a174-e88fc7e5286d on
    tether 16734438331890270208
    INFO: 2020/04/13 03:29:14 "c2ce8b73-8faf-4a05-88d9-24fb2bf45552": received response from target
    "apigee-mart-apigee-connect-hybrid-prod.apigee.svc.cluster.local:8843", status code: 200
    INFO: 2020/04/13 03:29:14 Attempting to send response c2ce8b73-8faf-4a05-88d9-24fb2bf45552 on
    tether 12483040283652521984
    INFO: 2020/04/13 03:29:15 "fdc3bac5-2b83-4b57-a28d-d8b455dae71e": received response from target
    "apigee-mart-apigee-connect-hybrid-prod.apigee.svc.cluster.local:8843", status code: 200
    INFO: 2020/04/13 03:29:15 Attempting to send response fdc3bac5-2b83-4b57-a28d-d8b455dae71e on
    tether 12483040283652521984
    INFO: 2020/04/13 03:29:16 "260026a9-f578-4447-a1d2-d8e49cf181d8": received response from target
    "apigee-mart-apigee-connect-hybrid-prod.apigee.svc.cluster.local:8843", status code: 200
    INFO: 2020/04/13 03:29:16 Attempting to send response 260026a9-f578-4447-a1d2-d8e49cf181d8 on
    tether 12483040283652521984
    INFO: 2020/04/13 03:29:17 "bf3d74a1-94ae-4041-892f-56f1ed9c9cff": received response from target
    "apigee-mart-apigee-connect-hybrid-prod.apigee.svc.cluster.local:8843", status code: 200
    INFO: 2020/04/13 03:29:17 Attempting to send response bf3d74a1-94ae-4041-892f-56f1ed9c9cff on
    tether 16734438331890270208
    INFO: 2020/04/13 03:29:18 "6d017278-3b7a-40fb-9c63-7c34320e7df1": received response from target
    "apigee-mart-apigee-connect-hybrid-prod.apigee.svc.cluster.local:8843", status code: 200

    IAM ๊ถŒํ•œ ๊ฑฐ๋ถ€ ์˜ค๋ฅ˜๋กœ ์ธํ•ด ์—์ด์ „ํŠธ๊ฐ€ ์ถฉ๋Œํ•˜๊ณ  Connect ์—์ด์ „ํŠธ ์˜ค๋ฅ˜๋กœ ์ƒ์„ฑ๋œ ๋กœ๊ทธ:

    F0719 12:34:33.128565 2326128 tether.go:29] failed to register stream with Apigee Connect, got
    'PermissionDenied': rpc error: code = PermissionDenied desc = Permission denied on resource '//
    apigeeconnect.googleapis.com/projects/apigee-connect-hybrid-prod/endpoints/APIGEE_MART' (or it
    may not exist).
    F0719 12:34:33.128565 2326128 tether.go:29] failed to register stream with Apigee Connect, got
    'PermissionDenied': rpc error: code = PermissionDenied desc = Permission denied on resource pro
    ject apigee-connect-hybrid-prod.

Apigee Connect ์‚ญ์ œ

Apigee Connect ๋ฐฐํฌ๋ฅผ ์‚ญ์ œํ•  ๊ฒฝ์šฐ pod ์ƒํƒœ๋Š” ์ตœ๋Œ€ 7๋ถ„ ๋™์•ˆ '์ข…๋ฃŒ ์ค‘' ์ƒํƒœ๋กœ ์œ ์ง€๋  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ์‹œ๊ฐ„์€ ์˜ˆ์ƒ ๊ฐ’์ž…๋‹ˆ๋‹ค. Apigee Connect ์—์ด์ „ํŠธ๋Š” ์—ฐ๊ฒฐ์„ ๊ฐ‘์ž๊ธฐ ์ค‘์ง€ํ•˜๋Š” ๋Œ€์‹  ๊ธฐ์กด ์—ฐ๊ฒฐ์ด ์ข…๋ฃŒ๋  ๋•Œ๊นŒ์ง€ ๊ธฐ๋‹ค๋ฆฝ๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ์ง€์—ฐ ์‹œ๊ฐ„์€ ์ง„ํ–‰ ์ค‘์ธ ์š”์ฒญ์ด ์†์‹ค๋˜์ง€ ์•Š๋„๋ก ๋ณด์žฅํ•ฉ๋‹ˆ๋‹ค.