{"id":20539207,"url":"https://github.com/ysicing/spot","last_synced_at":"2025-04-14T07:51:04.584Z","repository":{"id":59043394,"uuid":"518883517","full_name":"ysicing/spot","owner":"ysicing","description":"竞价机器小能手","archived":false,"fork":false,"pushed_at":"2025-04-10T00:16:34.000Z","size":347,"stargazers_count":20,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T01:25:19.370Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ysicing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-07-28T14:41:33.000Z","updated_at":"2025-04-10T00:16:31.000Z","dependencies_parsed_at":"2023-11-17T03:25:55.983Z","dependency_job_id":"f92d881b-7ee9-482f-b15d-fcf3ead016a1","html_url":"https://github.com/ysicing/spot","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysicing%2Fspot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysicing%2Fspot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysicing%2Fspot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysicing%2Fspot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ysicing","download_url":"https://codeload.github.com/ysicing/spot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248844054,"owners_count":21170486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T00:49:52.330Z","updated_at":"2025-04-14T07:51:04.558Z","avatar_url":"https://github.com/ysicing.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spot 竞价机器小助手\n\n[![Release](https://github.com/ysicing/spot/actions/workflows/release.yml/badge.svg)](https://github.com/ysicing/spot/actions/workflows/release.yml)\n![GitHub go.mod Go version (subdirectory of monorepo)](https://img.shields.io/github/go-mod/go-version/ysicing/spot?filename=go.mod\u0026style=flat-square)\n![GitHub commit activity](https://img.shields.io/github/commit-activity/w/ysicing/spot?style=flat-square)\n![GitHub all releases](https://img.shields.io/github/downloads/ysicing/spot/total?style=flat-square)\n![GitHub](https://img.shields.io/github/license/ysicing/spot?style=flat-square)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ysicing/spot)](https://goreportcard.com/report/github.com/ysicing/spot)\n[![Releases](https://img.shields.io/github/release-pre/ysicing/spot.svg)](https://github.com/ysicing/spot/releases)\n\n\u003e 解决频繁开通竞价机器\n\n## 功能\n\n- [x] 开通Linux/Windows竞价机器\n- [x] 重启机器\n- [x] 销毁机器同时删除解析记录\n- [x] 列出镜像列表\n- [x] 选择镜像启动虚拟机\n- [x] 开通LinuxArm架构按量机器(限定广州六区/上海二区, 白名单支持信创机型)\n- [x] 支持添加解析记录\n\n## 安装\n\n### 二进制安装\n\n从 [Github Release](https://github.com/ysicing/spot/releases) 下载已经编译好的二进制文件:\n\n### macOS安装\n\n- 支持brew方式\n\n```bash\nbrew tap ysicing/tap\nbrew install spotvm\n```\n\n### Debian系安装\n\n```bash\necho \"deb [trusted=yes] https://mirrors.ysicing.net/ysicing/apt/ /\" | sudo tee /etc/apt/sources.list.d/ysicing.list\napt update\napt install -y spot\nspot -v\n```\n\n### CentOS安装\n\n```bash\ncat /etc/yum.repos.d/fury.repo\n[fury]\nname=Gemfury Private Repo\nbaseurl=https://yum.fury.io/ysicing/\nenabled=1\ngpgcheck=0\n```\n\n### 源码编译安装\n\n- 支持go v1.21+\n\n```bash\n# Clone the repo\n# Build and run the executable\nmake build \u0026\u0026 ./dist/spot_darwin_amd64\n```\n\n## 配置使用\n\n```yaml\ncat /home/ysicing/.spot.yaml\nqcloud:\n  account:\n    id: AKIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n    secret: AKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n  zone: ap-shanghai-5\n  region: ap-shanghai\n  # 可选, 方便计费\n  # project:\n  #   id: 1250841\n  instance:\n    # 镜像\n    image: img-xxxx\n    # 规格这个规格比较便宜\n    type: SA2.MEDIUM4\n    network:\n      vpc:\n        id: vpc-xxxx\n      subnet:\n        id: subnet-xxxx\n    auth:\n      # 只支持密钥登录\n      sshkey:\n        ids:\n          - skey-xxxx\n    # 安全组\n    securitygroup:\n      id: sg-xxxx\n\n  dnspod:\n    main: \"ysicing.net\"\n    sub: \"*.dev\"\n```\n\n### 使用\n\n```bash\n# 创建1台机器, 默认开启公网访问100M按流量计费， 超过1台则默认不分配公网ip(因为我们环境默认nat出去)\nspot new --config /home/ysicing/.spot.yaml\n# 列表\nspot list --config /home/ysicing/.spot.yaml\nINFO[0000] Using config file: /home/ysicing/.spot.yaml\n创建时间             Name                ID           内网IP      公网IP         规格        类型     状态\n2022-08-22T13:17:34Z spot-20220822211647 ins-kysdso6l 10.10.16.39 42.192.202.136 SA2.MEDIUM4 SPOTPAID RUNNING\n# 销毁\nspot destroy --config /home/ysicing/.spot.yaml\n# 销毁全部\nspot destroy --config /home/ysicing/.spot.yaml --all\n# 添加解析记录\nspot dnspod --config /home/ysicing/.spot.yaml\nINFO[0000] Using config file: /home/ysicing/.spot.yaml\n🎉 10.10.16.25\nINFO[0003] create record success *.dev.ysicing.net ---\u003e 106.54.x.x\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysicing%2Fspot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fysicing%2Fspot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysicing%2Fspot/lists"}