logo
1
0
WeChat Login

tencentyun-tsf-deploy

A Docker image plugin based on TCCLI for one-click deployment of container applications (DeployContainerGroup) to Tencent Cloud Microservice Platform.

Parameter Description

  • secretId: Cloud API key SecretId.
  • secretKey: Cloud API key SecretKey.
  • args: Additional parameters can be passed through the command line using --, please refer to the examples below.

Using in Docker

docker run --rm \
  -e PLUGIN_SECRETID=xxx \
  -e PLUGIN_SECRETKEY=xxx \
  -e PLUGIN_ARGS="--region ap-guangzhou --GroupId group-xxx \
   --InstanceNum 1 --CpuRequest '0.5' --MemRequest 516 \
    --RepoName tsf_xxx/tsf-demo --TagName v1" \
  -v $(pwd):$(pwd) -w $(pwd) \
  tencentcom/tencentyun-tsf-deploy

Using in Cloud Native Build

# env.yml
TSF_DOCKER_USER: xxx
TSF_DOCKER_PASSWORD: xxx
T_SECRET_ID: xxx
T_SECRET_KEY: xxx
# .cnb.yml
main:
main:
  push:
    - services:
        - docker
      imports: https://xxx/env.yml
      stages:
        - name: generate image tag
          script: echo -e "ccr.ccs.tencentyun.com/tsf_xxx/tsf-demo:$CNB_COMMIT"
          exports:
            info: IMAGE_TAG
        - name: show image tag
          script: echo -e $IMAGE_TAG
        - name: docker login
          script: docker login -u $TSF_DOCKER_USER -p $TSF_DOCKER_PASSWORD ccr.ccs.tencentyun.com
        - name: docker build
          script: docker build -t $IMAGE_TAG .
        - name: docker push
          script: docker push $IMAGE_TAG
        - name: tsf deploy
          image: tencentcom/tencentyun-tsf-deploy
          settings:
            secretId: $T_SECRET_ID
            secretKey: $T_SECRET_KEY
            args: >
              --region ap-guangzhou
              --GroupId group-xxx
              --InstanceNum 1
              --CpuRequest '0.5'
              --MemRequest 516
              --RepoName tsf_xxx/tsf-demo
              --TagName $CNB_COMMIT

For more configuration options, please refer to: Deploy Container Applications

About

tencentyun-tsf-deploy

572.00 KiB
1 forks0 stars1 branches1 TagREADMEMIT license
Language
Shell65.2%
Dockerfile34.8%