Google Cloud Pricing Cost Calculator 项目使用指南

Google Cloud Pricing Cost Calculator 项目使用指南

google-cloud-pricing-cost-calculator 💸 Calculate estimated monthly costs of Google Cloud Platform products and resources via YAML files and CLI program (Linux, macOS, Windows) google-cloud-pricing-cost-calculator 项目地址: https://gitcode.com/gh_mirrors/go/google-cloud-pricing-cost-calculator

1. 项目目录结构及介绍

google-cloud-pricing-cost-calculator/
├── build/
├── gcosts/
├── img/
├── tools/
├── usage/
├── .editorconfig
├── .gitignore
├── .gitpod.yml
├── .golangci.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── cloud-shell-tutorial.md
└── pricing.yml

目录结构说明

  • build/: 构建相关文件。
  • gcosts/: 项目的主要代码文件,包含CLI程序的实现。
  • img/: 项目中使用的图片资源。
  • tools/: 项目中使用的工具脚本。
  • usage/: 用户自定义的YAML配置文件存放目录。
  • .editorconfig: 编辑器配置文件,用于统一代码风格。
  • .gitignore: Git忽略文件配置。
  • .gitpod.yml: Gitpod配置文件。
  • .golangci.yml: GolangCI配置文件。
  • CODE_OF_CONDUCT.md: 行为准则文件。
  • CONTRIBUTING.md: 贡献指南文件。
  • LICENSE: 项目许可证文件。
  • README.md: 项目介绍和使用说明文件。
  • cloud-shell-tutorial.md: 云Shell教程文件。
  • pricing.yml: 价格信息配置文件。

2. 项目启动文件介绍

项目的启动文件是gcosts,这是一个命令行工具,用于计算Google Cloud Platform产品的预计月度成本。

启动文件说明

  • gcosts: 这是一个可执行文件,支持Linux、macOS和Windows操作系统。用户可以通过命令行运行此文件来启动成本计算工具。

启动命令示例

  • Linux/macOS:

    ./gcosts help
    
  • Windows:

    .\gcosts.exe help
    

3. 项目的配置文件介绍

主要配置文件

  • pricing.yml: 这个文件包含了Google Cloud Platform产品的价格信息。用户可以通过下载最新的pricing.yml文件来获取最新的价格数据。

用户自定义配置文件

  • usage/: 用户可以在这个目录下创建自己的YAML配置文件,定义资源的使用情况。例如:
    region: europe-west4
    project: my-first-project
    instances:
      - name: app-server
        type: e2-standard-8
        os: rhel
        commitment: 3
    disks:
      - name: disk-boot
        type: ssd
        data: 75
    

配置文件使用示例

  1. 下载价格信息文件:

    curl -L "https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/raw/master/pricing.yml" -o "pricing.yml"
    
  2. 运行成本计算工具:

    ./gcosts calc --pricing pricing.yml
    

通过以上步骤,用户可以轻松地配置和使用Google Cloud Pricing Cost Calculator项目来计算Google Cloud Platform产品的预计月度成本。

google-cloud-pricing-cost-calculator 💸 Calculate estimated monthly costs of Google Cloud Platform products and resources via YAML files and CLI program (Linux, macOS, Windows) google-cloud-pricing-cost-calculator 项目地址: https://gitcode.com/gh_mirrors/go/google-cloud-pricing-cost-calculator

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

张飚贵Alarice

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值