跳到主要内容

gcp-config

阅读需 2 分钟

1. 获取project id

2. artifact

Artifact Registry API

image-20250610143056722

create repository ->

3. create service accounts

pulumi stack

dev, qa, prod

Dev 需要给qa, artifact repository, storage 的权限

Cloud Run Admin API

Database Migration API

Cloud SQL Admin API

Cloud Scheduler API

Compute Engine API

secret manager API

service-117025067244@serverless-robot-prod.iam.gserviceaccount.com for dev, artifact registory

Google Sheets API

Google Drive API

(base) jiexu:~/ $ gcloud services enable talent-marketplace-1o7yy5f215ahi.apigateway.talent-marketplace-qa-7ba7.cloud.goog [17:49:07]

gcloud api-gateway gateways update talent-marketplace-gateway \
--api=talent-marketplace-gateway \
--api-config=talent-marketplace-using-ahm-dev-v2 \
--project=talent-marketplace-dev-558f



# 创建新的 API 配置
gcloud api-gateway api-configs create v6-config-20250611-2 \
--api=talent-marketplace-gateway \
--openapi-spec=/Users/jiexu/coding/tw/talent/talent-marketplace-backend/api-gateway-v6.yaml \
--project=talent-marketplace-dev-558f \
--backend-auth-service-account=talent-marketplace@talent-marketplace-dev-558f.iam.gserviceaccount.com

# 更新网关
gcloud api-gateway gateways update talent-marketplace-gateway \
--api=talent-marketplace-gateway \
--api-config=v6-config-20250611-2 \
--location=us-central1 \
--project=talent-marketplace-dev-558f



curl -X GET https://talent-marketplace-gateway-ddahn5mv.uc.gateway.dev/app/user \
-H "Origin: http://example.com" \
-H "Access-Control-Request-Method: GET" \
-H "Access-Control-Request-Headers: Authorization" \
--header 'authorization: Bearer eyJraWQiOiJ5V0RLMXZkVkFWVlBzc1EwNjJGaVduVkZFRGozVlNLRkZYNHZkb1RCLWxVIiwiYWxnIjoiUlMyNTYifQ.eyJ2ZXIiOjEsImp0aSI6IkFULnB4end3ZThNdUZXY0JNeXVWeTNYVUZvNEEyWkc1Zjh0ZnEyTVZnZ3hSWFUiLCJpc3MiOiJodHRwczovL2Rldi05MDE1NTQ1NS5va3RhLmNvbS9vYXV0aDIvZGVmYXVsdCIsImF1ZCI6ImFwaTovL2RlZmF1bHQiLCJpYXQiOjE3NDk2MjYwNTcsImV4cCI6MTc0OTY4MzY1NywiY2lkIjoiMG9hcDQ0ZmsxODJjTkk5ZFk1ZDciLCJ1aWQiOiIwMHVldWZ2cDdlT2Z6UWxLSDVkNyIsInNjcCI6WyJvcGVuaWQiLCJwcm9maWxlIiwiZW1haWwiXSwiYXV0aF90aW1lIjoxNzQ5NjI2MDUyLCJzdWIiOiJqaWUueHVAdGhvdWdodHdvcmtzLmNvbSIsImVtcCI6IjI4Nzc1In0.NUCQ9rHz4eIthNzRpiHw0oSeG90_A7fTsCgyWd4VFUuIFpCDQ-xh_REvLXrCw0BVhTRDsWi12yD9yDt_OHPrefsxLf7oIkfUGQl_hi_kRtsaDL3Qjp9CKQv9ZC4PGtT79ppDbFmTRZHd1anoPHfbTgIq37ftoLIygsS8u5v72yJAYliRZ0-e1IxeGyAFhHxoV8rCEn23KSZ0FEii-Ce7YSQUFi7wn-F9o-RLaXnG1HFVaB28UC5PlGeTyOSh7Jjg0I61ZJjNDpuk0oFua2TB4zBhUILklDrBkoYqznHOY1GIVqmS34ktMNftycP8k1Ql4iQl2VfOQwcEKYXneze62g' \
-v


enabled API:
to
Cloud SQL Admin API

gateway:

API Gateway API
API Gateway enables you to provide secure access to your services.
Service Control API
Provides control plane functionality to managed services, such as logging, monitoring, and status checks
Service Management API
Service Management allows service producers to publish their services on Google Cloud Platform


AIzaSyBXsgeymgRacXS-zZYUv-01HSRUmzoyPVA



"Aupro-cli": {
"command": "/Users/jiexu/Downloads/aupro-cli-v0.0.8-darwin-arm64/aupro-cli",
"args": ["serve"]
}


pandoc --citeproc \
--csl gb-t-7714-2015-numeric-bilingual-no-uppercase-no-url-doi.csl \
--bibliography ref.bib --reference-doc=templates_refine.docx -s /Users/jiexu/coding/website/gin1995.top/blog/kehu/4-2025-05-15-AI车辆登船记录系统技术解决方案评估.md -o output.docx
创建service account
talent-marketplace@gits-ai-hackathon-team-6-4990.iam.gserviceaccount.com
创建postgres
postgres

DB_PASSWORD: postgres@dev
DATABASE_URL: jdbc:postgresql://10.230.0.3/talent_matching_profiling
secret manager
DATABASE_URL: jdbc:postgresql://34.56.253.170/talent_matching_profiling
DATABASE_PASSWORD
artifact image registery


psql "host=localhost port=1234 dbname=postgres user=postgres password=yJ4t>Iec&9/VPOKh sslmode=disable"

us-central1-docker.pkg.dev/gits-ai-hackathon-team-6-4990/talent-marketplace

gcloud auth configure-docker us-central1-docker.pkg.dev

docker build -t us-central1-docker.pkg.dev/talent-marketplace-dev-558f/talent-marketplace/backend:latest .

docker push us-central1-docker.pkg.dev/talent-marketplace-dev-558f/talent-marketplace/backend:latest

10.209.21.119


URL="https://storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/v2.16.0"

curl "https://storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/v2.16.0/cloud-sql-proxy.darwin.arm64" -o cloud-sql-proxy

chmod +x cloud-sql-proxy


./cloud-sql-proxy --address 0.0.0.0 --port 1236 talent-marketplace-dev-558f:us-central1:talent-marketplace


psql "host=localhost port=1236 dbname=postgres user=postgres password=postgres@dev sslmode=disable"

psql "host=34.42.230.11 port=5432 dbname=postgres user=postgres password=postgres@dev sslmode=disable"


pulumi login gs://talent-marketplace-backend-iac

Loading Comments...