-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update arm Signed-off-by: ysicing <i@ysicing.me>
- Loading branch information
Showing
9 changed files
with
159 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/ysicing/spot/cloud/qcloud" | ||
|
||
"github.com/spf13/cobra" | ||
) | ||
|
||
func cmdNewArm() *cobra.Command { | ||
var count, exp int64 | ||
var netaccess bool | ||
var image string | ||
c := &cobra.Command{ | ||
Use: "arm", | ||
Short: "新建腾讯云ARM虚拟机", | ||
Version: "0.1.0", | ||
RunE: func(c *cobra.Command, args []string) error { | ||
client := qcloud.NewClient("ap-guangzhou") | ||
return client.CreateArm(count, exp, netaccess, image) | ||
}, | ||
} | ||
c.Flags().Int64VarP(&count, "count", "c", 1, "虚拟机数量") | ||
c.Flags().BoolVar(&netaccess, "net", true, "是否开启公网访问, 单节点生效") | ||
c.Flags().StringVarP(&image, "image", "i", "", "指定linux arm镜像") | ||
c.Flags().Int64VarP(&exp, "exp", "e", 2, "销毁时间(区间1-12小时)") | ||
return c | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
qcloud: | ||
account: | ||
id: <qcloud-SecretId> | ||
secret: <qcloud-SecretId> | ||
instance: | ||
image: img-kh0snalc | ||
type: SR1.MEDIUM2 | ||
auth: | ||
sshkey: | ||
ids: | ||
- sshkey-id | ||
securitygroup: | ||
id: sg-id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.5 | ||
0.1.0 |