From b55bdf2a3c412b1157d438d219c341deda3f6964 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=88=98=E6=B4=AA=E9=9D=92?= Date: Wed, 21 Oct 2020 10:31:46 +0800 Subject: [PATCH] =?utf8?q?feat:=20=E6=94=AF=E6=8C=81poa=20api=20=E7=9A=84?= =?utf8?q?=20=E6=9C=8D=E5=8A=A1=E5=88=9B=E5=BB=BA=E7=9A=84=20origin=20?= =?utf8?q?=E5=9C=B0=E5=9D=80=E7=9A=84=E5=8F=AF=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../9.poa-api-docs-installer.yaml | 4 ++++ poa-api-docs/exec.sh | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/deploy-manifests/k8s-rancher/1.authx-service/0.authx-service/9.poa-api-docs-installer.yaml b/deploy-manifests/k8s-rancher/1.authx-service/0.authx-service/9.poa-api-docs-installer.yaml index 41fa706..014538d 100644 --- a/deploy-manifests/k8s-rancher/1.authx-service/0.authx-service/9.poa-api-docs-installer.yaml +++ b/deploy-manifests/k8s-rancher/1.authx-service/0.authx-service/9.poa-api-docs-installer.yaml @@ -13,6 +13,10 @@ data: POA_SERVER_URL: http://poa.paas.xxx.edu.cn POA_SA_SERVER_URL: http://poa-sa-svc.poa.svc.cluster.local:8443 + USER_API_SERVER_URL: http://user-data-service-poa-svc.user-data-service.svc.cluster.local:8080 + USER_AUTHZ_API_SERVER_URL: http://user-authorization-poa-svc.user-authorization-service.svc.cluster.local:8080 + COMMUNICATE_API_SERVER_URL: http://communicate-center-poa-svc.communicate-center.svc.cluster.local:8080 + --- apiVersion: batch/v1 diff --git a/poa-api-docs/exec.sh b/poa-api-docs/exec.sh index eadd0f4..08e131a 100644 --- a/poa-api-docs/exec.sh +++ b/poa-api-docs/exec.sh @@ -10,13 +10,25 @@ fi echo "POA_SA_SERVER_URL2=${POA_SA_SERVER_URL}" +if [ -z "$USER_API_SERVER_URL" ]; then + USER_API_SERVER_URL="http://user-data-service-poa-svc.user-data-service.svc.cluster.local:8080" +fi + +if [ -z "$USER_AUTHZ_API_SERVER_URL" ]; then + USER_AUTHZ_API_SERVER_URL="http://user-authorization-poa-svc.user-authorization-service.svc.cluster.local:8080" +fi + +if [ -z "$COMMUNICATE_API_SERVER_URL" ]; then + COMMUNICATE_API_SERVER_URL="http://communicate-center-poa-svc.communicate-center.svc.cluster.local:8080" +fi + # user-data-service-poa.v1.yaml curl -i -s -X DELETE "${POA_SA_SERVER_URL}/v1/services/user" # 1. 创建服务 -curl -i -s -X POST "${POA_SA_SERVER_URL}/v1/services" -H 'Content-Type: application/json' -d '{"id": "user", "origin": "http://user-data-service-poa-svc.user-data-service.svc.cluster.local:8080", "name": "用户服务", "description": "用户服务"}' +curl -i -s -X POST "${POA_SA_SERVER_URL}/v1/services" -H 'Content-Type: application/json' -d "{\"id\": \"user\", \"origin\": \"${USER_API_SERVER_URL}\", \"name\": \"用户服务\", \"description\": \"用户服务\"}" # 2. 创建版本 curl -i -s -X POST "${POA_SA_SERVER_URL}/v1/services/user/apiVersions/v1" @@ -33,7 +45,7 @@ curl -i -s -X POST "${POA_SA_SERVER_URL}/v1/services/user/apiVersions/v1/publish curl -i -s -X DELETE "${POA_SA_SERVER_URL}/v1/services/authz" # 1. 创建服务 -curl -i -s -X POST "${POA_SA_SERVER_URL}/v1/services" -H 'Content-Type: application/json' -d '{"id": "authz", "origin": "http://user-authorization-poa-svc.user-authorization-service.svc.cluster.local:8080", "name": "授权服务", "description": "授权服务"}' +curl -i -s -X POST "${POA_SA_SERVER_URL}/v1/services" -H 'Content-Type: application/json' -d "{\"id\": \"authz\", \"origin\": \"${USER_AUTHZ_API_SERVER_URL}\", \"name\": \"授权服务\", \"description\": \"授权服务\"}" # 2. 创建版本 curl -i -s -X POST "${POA_SA_SERVER_URL}/v1/services/authz/apiVersions/v1" @@ -50,7 +62,7 @@ curl -i -s -X POST "${POA_SA_SERVER_URL}/v1/services/authz/apiVersions/v1/publis curl -i -s -X DELETE "${POA_SA_SERVER_URL}/v1/services/communicate" # 1. 创建服务 -curl -i -s -X POST "${POA_SA_SERVER_URL}/v1/services" -H 'Content-Type: application/json' -d '{"id": "communicate", "origin": "http://communicate-center-poa-svc.communicate-center.svc.cluster.local:8080", "name": "通信服务", "description": "通信服务"}' +curl -i -s -X POST "${POA_SA_SERVER_URL}/v1/services" -H 'Content-Type: application/json' -d "{\"id\": \"communicate\", \"origin\": \"${COMMUNICATE_API_SERVER_URL}\", \"name\": \"通信服务\", \"description\": \"通信服务\"}" # 2. 创建版本 curl -i -s -X POST "${POA_SA_SERVER_URL}/v1/services/communicate/apiVersions/v1" -- 2.17.1