Git Product home page Git Product logo

vultr-cli's People

Contributors

afady avatar afatalerrror avatar barbosaaob avatar biondizzle avatar christhemorse avatar ddymko avatar dependabot-preview[bot] avatar dependabot[bot] avatar driusan avatar elliottcable avatar erwinsexpertise avatar gibeom-gwon avatar happytreees avatar jakimfett avatar jasites avatar kpcyrd avatar major avatar mamclaughlin avatar mondragonfx avatar nhooyr avatar nickcao avatar nxnjz avatar optik-aper avatar paulsonoflars avatar resmo avatar rmorey avatar samwhited avatar shavit avatar travispaul avatar uplime avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vultr-cli's Issues

[Feature] - Custom ISO workflow?

Unsure if this exists (and I'm missing the functionality somewhere) or if it's actually a feature request.

I'd like to use the Vultr CLI tool to deploy instances based on an ISO at a remote URL.

At the moment, I've manually uploaded my ISO via the webUI, but am not seeing a way to select the specific system image within the vultr-cli instance create syntax.

Would prefer to avoid the webui completely, any suggestions? Is this currently possible?

Error message on creating a resource is ''error deleteing".

Describe the bug
Error message on creating a resource is ''error deleteing".

To Reproduce

$ vultr-cli network create -c 10.111.0.0/24 -r 40 -d "Test private network"
error deleteing  network : Post https://api.vultr.com/v1/network/create: net/http: TLS handshake timeout

Expected behavior
To see an error message saying 'error creating network'.

[Question] - Missing PLANS on listing

Describe the bug
There's missing PLANS when we call listing. For example New Jersey $2.50 (IPV6 only with 512RAM) & $3.50 (512RAM) are missing.

To Reproduce

./vultr-cli plans list

Output :

VPSPLANID	NAME					VCPU COUNT	RAM	DISK	BANDWIDTH	BANDWIDTH GB	PRICE PER MONTH		TYPE		REGIONS						DEPRECATED
201		1024 MB RAM,25 GB SSD,1.00 TB BW	1		1024	25	1.00		1024		5.00			SSD		[1 2 3 4 5 6 7 8 9 12 19 22 24 25 39 40]	false
202		2048 MB RAM,55 GB SSD,2.00 TB BW	1		2048	55	2.00		2048		10.00			SSD		[1 2 3 4 5 6 7 8 9 12 19 22 24 25 39 40]	false
204		8192 MB RAM,160 GB SSD,4.00 TB BW	4		8192	160	4.00		4096		40.00			SSD		[1 2 3 4 5 6 7 8 9 12 19 22 24 25 39 40]	false
206		32768 MB RAM,640 GB SSD,6.00 TB BW	8		32768	640	6.00		6144		160.00			SSD		[1 2 3 4 5 6 7 8 9 12 19 22 24 25 39 40]	false
117		24576 MB RAM,3x110 GB SSD,30.00 TB BW	6		24576	110	30.00		30720		180.00			DEDICATED	[12]						false
400		1024 MB RAM,32 GB SSD,1.00 TB BW	1		1024	32	1.00		1024		6.00			HIGHFREQUENCY	[1 2 3 4 5 6 7 8 9 12 19 24 25 39 40]		false
401		2048 MB RAM,64 GB SSD,2.00 TB BW	1		2048	64	2.00		2048		12.00			HIGHFREQUENCY	[1 2 3 4 5 6 7 8 9 12 19 24 25 39 40]		false
208		98304 MB RAM,1600 GB SSD,15.00 TB BW	24		98304	1600	15.00		15360		640.00			SSD		[22]						false
404		16384 MB RAM,384 GB SSD,5.00 TB BW	4		16384	384	5.00		5120		96.00			HIGHFREQUENCY	[1 2 3 4 5 6 7 8 9 12 19 24 25 39 40]		false
406		49152 MB RAM,768 GB SSD,8.00 TB BW	12		49152	768	8.00		8192		256.00			HIGHFREQUENCY	[5 8 9 19 24 39 40]				false
203		4096 MB RAM,80 GB SSD,3.00 TB BW	2		4096	80	3.00		3072		20.00			SSD		[1 2 3 4 5 6 7 8 9 12 19 22 24 25 39 40]	false
207		65536 MB RAM,1280 GB SSD,10.00 TB BW	16		65536	1280	10.00		10240		320.00			SSD		[2 3 5 6 12 19 22 25 39 40]			false
403		8192 MB RAM,256 GB SSD,4.00 TB BW	3		8192	256	4.00		4096		48.00			HIGHFREQUENCY	[1 2 3 4 5 6 7 8 9 12 19 24 25 39 40]		false
405		32768 MB RAM,512 GB SSD,6.00 TB BW	8		32768	512	6.00		6144		192.00			HIGHFREQUENCY	[1 2 3 4 5 6 7 8 9 12 19 24 25 39 40]		false
205		16384 MB RAM,320 GB SSD,5.00 TB BW	6		16384	320	5.00		5120		80.00			SSD		[1 2 3 4 5 6 7 8 9 12 19 22 24 25 39 40]	false
115		8192 MB RAM,110 GB SSD,10.00 TB BW	2		8192	110	10.00		10240		60.00			DEDICATED	[1 2 12 25]					false
116		16384 MB RAM,2x110 GB SSD,20.00 TB BW	4		16384	110	20.00		20480		120.00			DEDICATED	[2 12]						false
118		32768 MB RAM,4x110 GB SSD,40.00 TB BW	8		32768	110	40.00		40960		240.00			DEDICATED	[12]						false
402		4096 MB RAM,128 GB SSD,3.00 TB BW	2		4096	128	3.00		3072		24.00			HIGHFREQUENCY	[1 2 3 4 5 6 7 8 9 12 19 24 25 39 40]		false

Expected behavior
VPSPLANID199 : 10 GB SSD $2.50/mo $0.004/h 1 CPU 512MB Memory 500GB Bandwidth
VPSPLANID200 : 10 GB SSD $3.50/mo $0.005/h 1 CPU 512MB Memory 500GB Bandwidth

Screenshots
image

Desktop (please complete the following information where applicable:

  • Vultr cli : v0.1.4
  • OS: Ubuntu 18.04.3
  • Language Version : go version go1.12.7 linux/amd64

Thanks

[BUG] - Unable to create an instance from snapshot

Describe the bug
When trying to create an instance from snapshot, I get unknown flag: --snapshot_id error.

To Reproduce
Steps to reproduce the behavior:

  1. Create a snapshot of an existing instance vultr-cli snapshot create --id $UUID_INSTANCE --description vulture-snapshot
  2. Delete instance vultr-cli instance delete $UUID_INSTANCE
  3. Create new instance from snapshot vultr-cli instance create --region $REGION --plan $PLAN_ID --snapshot_id $UUID_SNAPSHOT
  4. See error unknown flag: --snapshot_id

Expected behavior
A new instance is created from the snapshot

Screenshots
N/A

Desktop (please complete the following information where applicable:

  • OS: macOS Monterey
  • Version: Vultr-cli v2.13.0 (installed via Homebrew)

Additional context
N/A

Vultr-cli crashes inside cloud-init

The vultr-cli exits without any warnings/errors in the output or logs when run inside a cloud-init user-data script. It took me a while to figure out that it happens when the HOME environment variable is undefined.

A good solution would be to output a message so it appears in cloud-init-output.log.

[Feature] - add a password of instance in json response

It is useful to be able to work with the passwords of the instances in json, thus giving greater versatility to the use of the api, if the case is lack of security, you could add an option to enable insecure settings in the account.

Errors running `make` on go 1.10.1

Describe the bug

Following the instructions from
https://github.com/vultr/vultr-cli#building-from-source
I have cloned this repo and now getting errors running make:

→ make build_mac
building vultr-cli
env GOOS=darwin GOARCH=amd64 go build -gcflags=-trimpath=$GOPATH -o /Users/dmitrizaitsev/Repos/vultr-cli/builds/vultr-cli_darwin_amd64
main.go:17:8: cannot find package "github.com/vultr/vultr-cli/cmd" in any of:
	/usr/local/Cellar/go/1.10.1/libexec/src/github.com/vultr/vultr-cli/cmd (from $GOROOT)
	/Users/dmitrizaitsev/go/src/github.com/vultr/vultr-cli/cmd (from $GOPATH)
make: *** [_build] Error 1

To Reproduce
Steps to reproduce the behavior:

https://github.com/vultr/vultr-cli.git
cd vultr-cli
make build_mac

Expected behavior
Installing the CLI.

Desktop (please complete the following information where applicable:

  • OS: Mac OSX 10.8.5
  • Language Version
→ go version
go version go1.10.1 darwin/amd64
→ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin12.6.0
Thread model: posix

[Feature] - Print the original API error messages

Some commands hide the error messages from the API. For example, if access control is enabled for the API key that is being used, the error message should also have a description: "Your IP <IP_ADDRESS> is not authorized to use this API key". But currently it only return "error getting plan list"

It would be nice to see a description for the error messages, as it already does with most of the commands.

[DOC] - Config file

Describe the bug

Not a code bug, but documentation is needed for what can be saved to the config file, and in what format.

Perhaps the API Key? Output format?

Using the os change command wipes out existing SSH Key

Describe the bug
Using the os change command wipes out the original ssh key and reverts to password authentication. I could be missing a flag or something but couldn't find anything to specify the SSH key to use when changing the os through vultr-cli.

To Reproduce
Steps to reproduce the behavior:

  1. Run vultr-cli instance os change [instance id] -o 387 (This is Ubuntu 20.04)
  2. ssh -i [original ssh key] root@[linode_ip] prompts for password. When you get the root password from the console and login there is no authorized_keys file or .ssh/ directory

Expected behavior
I'd expect when using the os change command the instance relaunches with the original ssh key

Desktop (please complete the following information where applicable:

  • OS: Ubuntu 18.04 LTS Server

[BUG] - Can't list domain with more than 20 records

Describe the bug
The DNS v2 API is paginated and the cli seems to not have a way to handle this, so domains with more than 20 records will only show the first 20 records. It does print out the "next page" cursor key but there doesn't seem to be any way to use it.

To Reproduce
Steps to reproduce the behavior:

  1. Have a domain with more than 20 records
  2. Run vultr-cli dns record list example.com
  3. See that only 20 records are show and the output ends with ====================================== TOTAL NEXT PAGE PREV PAGE 27 bmV4dF9fMjA1NTcwODQ=

Expected behavior
Full list of domain records is printed or there is a CLI option to feed in the next page cursor

[Feature] - Add transparent pagination support for long results

Currently long results returned by the client are split in pages and the user has to request multiple pages using the pointers at the end of each page. This behavior makes it difficult for script automation. It would be helpful to have a new switch which would make vultr-cli handle pagination transparently for the user a return a single data set.

[Feature] Vultr-cli updates

While the cli works we should look to make some additions to the underlying structure to allow for the following:

  • Testing
  • New output types (json & yaml)
  • Make use of .vultr-cli.yaml config
  • Better alias for commands
  • Examples for all commands

here are the resources that have been changed to the new structure

  • account
  • applications
  • backup
  • bare metal
  • baremetal app
  • baremetal os
  • baremetal user data
  • block storage
  • dns domanis
  • dns records
  • firewall groups
  • firewall rules
  • instances
  • iso
  • load balancer
  • private networks
  • plans
  • object storage
  • operating systems
  • regions
  • reserved ip
  • ssh keys
  • users
  • version
  • startup scripts
  • snapshot

The branch with the changes is https://github.com/vultr/vultr-cli/tree/rewrite

[Feature] - Improve Error responses

Currently the error responses will all print on the same line. We should update these error responses to print on new lines

Originally brought up in #63

error setting creating instance : Server add failed: No NETWORKID defined, but multiple private networks exist in this location.error setting creating instance : Server add failed: No NETWORKID defined, but multiple private networks exist in this location.$

[Feature] - Verbosity

Is your feature request related to a problem? Please describe.
Debugging

Describe the solution you'd like

Add the option to dump request/responses made to the API Server, like curl -v

Describe alternatives you've considered
MITM proxy?

[Feature] Shell Completion Subcommand

Is your feature request related to a problem? Please describe.

I would like to be able to use a sub-command to configure shell completion for vultr-cli, having support for bash at minimum.

Describe the solution you'd like

$ source <(vultr-cli completion bash)

[Feature] - documentation-request for setting .vultr-cli.yaml configuration file

I'm not sure how to properly format the yaml config file. An example config file would be really nice.

Also if I want to deploy a server instance, I can't seem to see an option for a Cloud Compute instance (new jersey, cheapest option w/ ipv4!)

when running: vultr-cli plans list I get a list but it's outputting NEXT PAGE PREV PAGE to my terminal which I can't really use.

Attached a photo of my output, would be cool to learn your API more!

pic-full-210424-0125-18

[BUG] - vultr-cli instance user-data get <instance-id> returns error

Describe the bug
vultr-cli instance user-data get returns error error getting user-data : json: cannot unmarshal array into Go struct field UserData.user_data.data of type string

To Reproduce

$ vultr-cli version                                              
Vultr-cli v2.14.2
$ vultr-cli instance list                                              
ID                                      IP              LABEL   OS                              STATUS  Region  CPU     RAM     DISK    BANDWIDTH       TAGS
e51a5124-3a85-4fa7-a926-9b0bd0388a7f    xx.xx.xxx.xxx   test    Debian 11 x64 (bullseye)        active  ams     1       1024    25      1000            []
======================================
TOTAL   NEXT PAGE       PREV PAGE
$ vultr-cli instance user-data get e51a5124-3a85-4fa7-a926-9b0bd0388a7f
error getting user-data : json: cannot unmarshal array into Go struct field UserData.user_data.data of type string
curl "https://api.vultr.com/v2/instances/e51a5124-3a85-4fa7-a926-9b0bd0388a7f/user-data" \
  -X GET \
  -H "Authorization: Bearer ${VULTR_API_KEY}"
{"user_data":{"data":[]}}% 

[BUG] - Using "--notify false" still notify me by email

Describe the bug
Email notification is not disabled by flag "--notify false"

To Reproduce
vultr-cli instance create --os 477 --plan vhf-1c-1gb --region cdg --label dev-db-redis-1 --host dev-db-redis-1 --private-network true --notify false --ssh-keys *** --auto-backup false

Expected behavior
No email about server creation

Desktop (please complete the following information where applicable:

  • OS: macos
  • Language Version go1.16.6 darwin/amd64

[Enhancement] - os flag seems to take precedence over app flag when creating server

Describe the bug
I'm trying to create a server with Docker installed. In the WebUI I can choose between Ubuntu 18.04 and CentOS 7. When I try to create a server with CLI, it looks like I can pass any value to the os flag and that takes precedence over the app flag.

To Reproduce
Steps to reproduce the behavior:

  1. $vultr-cli server create --app 37 --plan 201 --region 40 --os 367
  2. This create a Fedora 31 x64 server
  3. Docker isn't installed on the server, this is expected as it isn't supported

Expected behavior
When app flag is passed then vultr-cli should restrict OSID to be the ones that are supported or user 186 as the default.
For the above command I should be restricted to using OSID of 167, 381, 270 or 186.

Screenshots
N/A

Desktop (please complete the following information where applicable:

  • OS: macOS Catalina 10.15.3
  • Version: Vultr-cli v0.2.1

Additional context

N/A

Example .vultr-cli.yaml file

Is your feature request related to a problem? Please describe.
I see a reference to .vultr-cli.yaml , but no examples on how this file should look.

Describe the solution you'd like
Create a .vultr-cli.yaml.example file in the repo.

[Feature] Web Authentication

Is your feature request related to a problem? Please describe.

Web authentication for vultr-cli.

Describe the solution you'd like

Instead of exporting VULTR_API_KEY, it would be nice to be able to use a web browser to authenticate and store a token.

$ vultr-cli account login
Open a web browser and login? [Yes/No]:

Additional context

Needs to work on Linux please, and respect the BROWSER env variable.

[Feature] Provide a container image for releases

As a user of vultr-cli, it would be great not having to compile or install binaries (from releases) directly on my workstation, and instead just use an official container image.

Publishing a container image on each new release (plus some kind of moving tag to always track the newest one) would make make workload isolation easier.

[Feature] - ARM6 build for Raspberry Pi

This is a request to build vultr-cli for ARM6 (Raspberry Pi). I haven't been able to build it from source on that platform, unfortunately.

Thanks for your time!

[BUG] - Record data must be enclosed in quotes

Describe the bug
Cannot update unescaped TXT values, or create TXT values without quotes.

To Reproduce
Steps to reproduce the behavior:

  1. Try to update a TXT record with new_value, "new_value"
  2. You will receive this error: Record data must be enclosed in quotes
  3. You can update the record with escaped values: "\"new_value"\"
  4. Unlike update, create of TXT works with quotes: "new_value"

Expected behavior
The API should handle values without quotes for any type, and match the behavior on the website.

Desktop

  • OSX 10.15
  • Language Version Go 1.9.2
  • Version 0.1.2

vultr-cli: command not found

Compile the repo using make build_linux_amd64

"Export" my api key, per the repo instructions

Run: vultr-cli server list per the example, leads to the error message int he subject

panic: runtime error: invalid memory address or nil pointer dereference

(Thanks for creating this!! 👍)

I've got an API key that I've been using via curl to do API requests previously, and I figured I should give this new tool a shot but no matter what command I attempt, I get a segfault:

$ vultr-cli server list
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x72f44e]

goroutine 1 [running]:
github.com/vultr/govultr.(*Client).DoWithContext(0xc0000b9040, 0x9f56c0, 0xc0000aa018, 0xc000133f00, 0x881c00, 0xc0000ae3b0, 0x0, 0x0)
	/Users/ddymko/go/pkg/mod/github.com/vultr/[email protected]/govultr.go:169 +0x12e
github.com/vultr/govultr.(*ServerServiceHandler).list(0xc0000ae380, 0x9f56c0, 0xc0000aa018, 0x0, 0x0, 0x0, 0x0, 0x2, 0x2, 0x1, ...)
	/Users/ddymko/go/pkg/mod/github.com/vultr/[email protected]/server.go:1431 +0x127
github.com/vultr/govultr.(*ServerServiceHandler).List(0xc0000ae380, 0x9f56c0, 0xc0000aa018, 0xc0000240c5, 0x542b74, 0xc000133d00, 0x939a0c, 0x4)
	/Users/ddymko/go/pkg/mod/github.com/vultr/[email protected]/server.go:1395 +0x53
github.com/vultr/vultr-cli/cmd.glob..func135(0xd3d1c0, 0xd68698, 0x0, 0x0)
	/Users/ddymko/go/src/github.com/vultr/vultr-cli/cmd/server.go:438 +0x5f
github.com/spf13/cobra.(*Command).execute(0xd3d1c0, 0xd68698, 0x0, 0x0, 0xd3d1c0, 0xd68698)
	/Users/ddymko/go/pkg/mod/github.com/spf13/[email protected]/command.go:766 +0x2ae
github.com/spf13/cobra.(*Command).ExecuteC(0xd3ae20, 0x2, 0x2, 0xc0000ba500)
	/Users/ddymko/go/pkg/mod/github.com/spf13/[email protected]/command.go:850 +0x2fc
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/ddymko/go/pkg/mod/github.com/spf13/[email protected]/command.go:800
github.com/vultr/vultr-cli/cmd.Execute()
	/Users/ddymko/go/src/github.com/vultr/vultr-cli/cmd/root.go:41 +0x32
main.main()
	/Users/ddymko/go/src/github.com/vultr/vultr-cli/main.go:20 +0x20
$ vultr-cli api-key
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x72f44e]

goroutine 1 [running]:
github.com/vultr/govultr.(*Client).DoWithContext(0xc0000b71e0, 0x9f56c0, 0xc0000a8018, 0xc000131c00, 0x87c400, 0xc0000cab80, 0x0, 0x0)
	/Users/ddymko/go/pkg/mod/github.com/vultr/[email protected]/govultr.go:169 +0x12e
github.com/vultr/govultr.(*APIServiceHandler).GetInfo(0xc0000ac300, 0x9f56c0, 0xc0000a8018, 0xc000131a00, 0x939a0c, 0x4)
	/Users/ddymko/go/pkg/mod/github.com/vultr/[email protected]/api.go:37 +0xfc
github.com/vultr/vultr-cli/cmd.glob..func2(0xd42c00, 0xd68698, 0x0, 0x0)
	/Users/ddymko/go/src/github.com/vultr/vultr-cli/cmd/apiKey.go:35 +0x53
github.com/spf13/cobra.(*Command).execute(0xd42c00, 0xd68698, 0x0, 0x0, 0xd42c00, 0xd68698)
	/Users/ddymko/go/pkg/mod/github.com/spf13/[email protected]/command.go:766 +0x2ae
github.com/spf13/cobra.(*Command).ExecuteC(0xd3ae20, 0x2, 0x2, 0xc0000b8500)
	/Users/ddymko/go/pkg/mod/github.com/spf13/[email protected]/command.go:850 +0x2fc
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/ddymko/go/pkg/mod/github.com/spf13/[email protected]/command.go:800
github.com/vultr/vultr-cli/cmd.Execute()
	/Users/ddymko/go/src/github.com/vultr/vultr-cli/cmd/root.go:41 +0x32
main.main()
	/Users/ddymko/go/src/github.com/vultr/vultr-cli/main.go:20 +0x20

Do I need to create a new API key or create it differently for this tool?

(FWIW, I'm using the vultr-cli_linux_amd64.tar.gz binary attached to https://github.com/vultr/vultr-cli/releases/tag/v0.1.0 currently, but I'm happy to build from source instead if that would be helpful. 👍)

[Feature] - V1.0.0

A V1 branch needs to be created and all v1 work moving forward will be based off this branch. While the master branch will become the v2 codebase

[Feature] - Add UserAgent to CLI

The CLI doesn't have it's own useragent instead it falls back on the one that GoVultr has.

We should update the CLI to have it's own useragent.

[Feature] - Output format

Is your feature request related to a problem? Please describe.
Parsing output with scripts

Describe the solution you'd like
An easy way to output say a csv or json document, or something that can be easily parsed programatically

Describe alternatives you've considered
Regexes.......

[Feature] - Manipulating DNS Records without the RecordsIDs

Finding the record IDs is unnecessary complexity. The same arguments for create should be able to be used for update.

Describe the solution you'd like

Two solutions:

  1. Create should have a flag for --upsert. If a record with that domain, name, and type alredy exists, overwrite the data and ttl fields. If there are multiple matches it should probably be an error (unless an --allow-multiple flag is set?)

  2. Update/delete should not require a recordID. Supplying --name --type should act as filters. If there is only one matching record, it should update/delete the data and ttl. If there are more same case as above

If the record is unique (e.g. zero or only one matching record):

  • update should of the data field and ttl should be performed

Additional context
The API will feel more natural and easier to script.

[DOC] - document the default location of the config file

The README mentions the "default config file", but does not mention where it actually lives or what it should be named. I had to go look in the actual source code to find this out. It would be better, I think, to mention it explicitly.

[Feature] - Duplicate a Firewall Rule Group

Is your feature request related to a problem? Please describe.
At the moment there appears to be no way to duplicate a rule group, either through the cli or through the web interface. Ideally I'd like to have a starter group for a stack, and then create a copy to start opening up additional ports as needed per instance.

Describe the solution you'd like
vultr-cli firewall group duplicate <firewallGroupID> -d <new group description>

Linux Snap support

I noticed on the readme, it says: Snap (Coming soon).

I didn't see a snapcraft.yml or a branch for it in the repo.. Is there a fork or someplace else where progress has been made on this?

I'd love to help get the vultr-cli built into a Snap as I have some experience snapping apps!

[BUG] - Unable to set user data during reinstall

Describe the bug
When I try to reinstall OS on an instance I can't seem to set user data. For example I have an instance with Ubuntu 20.04 installed and would like to change the OS to Fedora CoreOS which expects an ignition file during install. However there is no option to supply the ignition file when I change the OS.

To Reproduce
Steps to reproduce the behavior:

  1. $ vultr-cli server os change --help gives you
changes operating system

Usage:
  vultr-cli server os change <instanceID> [flags]

Flags:
  -h, --help        help for change
  -o, --os string   operating system ID you wish to use

Global Flags:
      --config string   config file (default is $HOME/.vultr-cli.yaml)

Expected behavior
There needs to be an additional flag option for vultr-cli server os change <instanceID> [flags] where you can either pass in the user data or a file containing the user data.

Screenshots
N/A

Desktop (please complete the following information where applicable:

  • OS: MacOS Catalina
  • Vultr-CLI version: Vultr-cli v0.4.0

Additional context
N/A

Dependabot can't resolve your Go dependency files

Dependabot can't resolve your Go dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

dmitri.shuralyov.com/gpu/[email protected]: unrecognized import path "dmitri.shuralyov.com/gpu/mtl" (https fetch: Get https://dmitri.shuralyov.com/gpu/mtl?go-get=1: EOF)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

[Question] Salt-cloud plugin support

Hello!

Posting here because I didn't know the right place for a question like this - I didn't quite get the response I was looking for by opening a support ticket.

I'm a new Vultr user and it's great to see you guys active in the Open source space. I use salt-cloud to manage all of my VMs which currently uses this plugin https://github.com/saltstack/salt/blob/master/salt/cloud/clouds/vultrpy.py to interact with vultr. This plugin is less feature rich than some of the plugins for other providers like DO, and I was wondering if there is a chance you guys would consider checking it out/supporting it. It's currently missing features like adding ssh keys, working with bare metal, etc - it would be nice to see this migrated over to the v2 API once that is released into production as well.

Thanks for all your hard work, loving vultr so far!

Cheers,
Pieter

[Feature] - Delete without SUBID

Hello,

I am looking for an automated solution to cut down the Vultr billing and extend it to a couple of weeks extra.

I came across Vultr CLI and found it to be quite good for someone like me, who doesn't know much about APIs. I tried to use it for deletion of the Vultr server and I could do it fine.

But can you please tell me a way to delete the server without the SUBID?

Basically, I deploy a snapshot to a new server daily for a couple of hours, and then I forget to delete it. This ends up costing me a lot of extra money.

I was thinking about having an automated script which will detect the network transmission and when the data is no longer being transmitted, it runs the delete command for the server.

With the requirement of adding a SUBID in the delete command, I can't put the command inside a bash script. That is why I am asking if you can add deletion of server without SUBID if there is only 1 server is deployed.

[BUG] - Unable to build with Go 1.17

Describe the bug

I'm trying to package vultr-cli on Fedora rawhide and it currently has Go 1.17 included. The compile fails when it reaches:

# github.com/vultr/vultr-cli/cmd/printer
_build/src/github.com/vultr/vultr-cli/cmd/printer/application.go:11:61: a.Type undefined (type govultr.Application has no field or method Type)
_build/src/github.com/vultr/vultr-cli/cmd/printer/application.go:11:69: a.Vendor undefined (type govultr.Application has no field or method Vendor)
_build/src/github.com/vultr/vultr-cli/cmd/printer/application.go:11:79: a.ImageID undefined (type govultr.Application has no field or method ImageID)
_build/src/github.com/vultr/vultr-cli/cmd/printer/instance.go:93:61: a.Type undefined (type govultr.Application has no field or method Type)
_build/src/github.com/vultr/vultr-cli/cmd/printer/instance.go:93:69: a.Vendor undefined (type govultr.Application has no field or method Vendor)
_build/src/github.com/vultr/vultr-cli/cmd/printer/kubernetes.go:7:25: undefined: govultr.Cluster
_build/src/github.com/vultr/vultr-cli/cmd/printer/kubernetes.go:47:17: undefined: govultr.Cluster
_build/src/github.com/vultr/vultr-cli/cmd/printer/kubernetes.go:82:27: undefined: govultr.NodePool
_build/src/github.com/vultr/vultr-cli/cmd/printer/kubernetes.go:107:19: undefined: govultr.NodePool
_build/src/github.com/vultr/vultr-cli/cmd/printer/kubernetes.go:127:27: undefined: govultr.Versions
_build/src/github.com/vultr/vultr-cli/cmd/printer/instance.go:93:69: too many errors
/usr/lib/golang/pkg/tool/linux_amd64/buildid -w $WORK/b160/_pkg_.a # internal
cp $WORK/b160/_pkg_.a /builddir/.cache/go-build/68/68e16097adb385305d51d942e9a8f3d6f0303cb2e7819ce7a35454322cec8291-d # internal

A full build log can be found in Fedora COPR.

To Reproduce
Steps to reproduce the behavior:

  1. Prepare a container build file:
FROM registry.fedoraproject.org/fedora:rawhide
RUN curl -sLO https://download.copr.fedorainfracloud.org/results/mhayden/vultr-cli/fedora-rawhide-x86_64/02893148-golang-github-vultr-cli/golang-github-vultr-cli-2.8.4-1.fc36.src.rpm
RUN dnf -y install dnf-plugins-core rpm-build
RUN dnf -y builddep golang-github-vultr-cli-2.8.4-1.fc36.src.rpm
RUN rpmbuild --rebuild golang-github-vultr-cli-2.8.4-1.fc36.src.rpm
  1. Build the container with docker build or podman build
  2. Build fails at github.com/vultr/vultr-cli/cmd/printer

Expected behavior

I expect the compile to finish successfully.

Screenshots

See excerpt of build failure in first section.

How to create FCOS instance via Vultr API

Hello, how can I pass ignition.fcc data to vultr-cli server create when deploying Fedora CoreOS?

config.fcc

variant: fcos
version: 1.1.0
passwd:
  users:
    - name: core
      ssh_authorized_keys:
        - ssh-key ...
      groups: [ sudo, docker ]
storage:
  directories:
    - path: /opt/releases
      overwrite: true
      mode: 0755
export HOSTNAME=example.com
export OS_ID=391
export REGION_ID=7
export PLAN_ID=400
export VULTR_API_KEY=$VULTR_API_KEY

vultr-cli server create \
  -l $HOSTNAME \
  -o $OS_ID \
  -p $PLAN_ID \
  -r $REGION_ID \
  -t Web \
  -u `fcct config.fcc | base64` \
  --ipv6 true \
  --host $HOSTNAME

Снимок экрана 2020-11-23 в 10 04 25

ssh core@instance-ip doesn't work

Creating via web interface is working

Снимок экрана 2020-11-23 в 09 57 55

ssh core@instance-ip passed

[BUG] - ERW Cloud compute instance (regular performance) with 0.5 GB Memory missing in API response

Describe the bug
I am not entirely sure if this is the right place to report this bug, because it actually relates to the Vultr API.

Anyways, in the web UI for creating an instance, there is this plan that can only be found when you choose: Cloud Compute - Regular Performance - New York (NJ) - OS: FreeBSD-13 (but I guess it applies to many other as well). The first two plans that show up are:

  1. IPv6 ONLY for $2.5/month
  2. $3.5/month for 1vCPU, 0.5 GB Memory, 10GB SSD and 0.5 TB Bandwidth

When I try to list all plans through the Vultr API doing a GET request with curl to https://api.vultr.com/v2/plans these two plans do not show up. Actually, the cheapest plan in the json response from the API starts at $5.00

Therefore, I have been unable to start the $3.5/month instance in EWR through an API call, since I do not know how to name the plan when performing the create instance API request. Otherwise, I can start instances in other plans without any issues.

To Reproduce
Steps to reproduce the behavior:

  1. GET request to https://api.vultr.com/v2/plans
curl "https://api.vultr.com/v2/plans" \
  -X GET \
  -H "Authorization: Bearer ${VULTR_API_KEY}"

Expected behavior
The json response should show these two specific plans for the EWR region, but they are totally missing in the json file.

[Feature] - Human readable information about used bandwidth of an instance

Is your feature request related to a problem? Please describe.
It's unnecessarily hard to get the used bandwidth of an instance in a humal readable form.

Describe the solution you'd like
A USED BANDWIDTH field in Megabyte in vultr-cli instance get analog to ALLOWED BANDWIDTH.

Describe alternatives you've considered
Right now the alternative is calculating all the values in vultr-cli bandwidth which IMHO is unnecessarily hard.

[Feature] - Add Vultr CLI to scoop package manager for developers using Windows 11

Is your feature request related to a problem? Please describe.

  • I use Windows 11 on my developer workstation.
  • I use the Scoop package manager to install and update various GUI and CLI development tools, such as Visual Studio Code and Node.js.
  • I would like to install the Vultr CLI tool using the same package manager as my other development tools.

Describe the solution you'd like

Add Vultr CLI as a Scoop package, by creating a manifest for it.

https://scoop-docs.vercel.app/docs/concepts/App-Manifests.html

Many example manifests can be found in the main bucket for Scoop.

https://github.com/ScoopInstaller/Main/tree/master/bucket

[Feature] - Clean up Script list command

The current implementation of script list gets a bit messy when there are larger/longer scripts present

Example:

➜  ~ vultr-cli script list
SCRIPTID	DATE CREATED		DATE MODIFIED		TYPE	NAME	SCRIPT
565344		2019-08-06 22:01:58	2019-08-06 22:16:16	boot	b	#!/bin/sh

cd ~

touch hello.txt
touch againagain.txt
565345	2019-08-06 22:02:20	2019-08-06 22:02:20	pxe	p	#!ipxe
# NOTE: This is an example that boots CoreOS. You'd need to add your SSH key before this would work

set base-url http://stable.release.core-os.net/amd64-usr/current

kernel ${base-url}/coreos_production_pxe.vmlinuz sshkey="ssh-rsa AAAA..." cloud-config-url=http://169.254.169.254/2014-09-12/coreos-init
initrd ${base-url}/coreos_production_pxe_image.cpio.gz
boot

You lose a bit of visibility into the information about the script itself. We should try to clean this up where we move the script contents into its own command.

So script list should be cleaned up to look something like this:

➜  ~ vultr-cli script list
SCRIPTID	DATE CREATED		DATE MODIFIED		TYPE	NAME
565344		2019-08-06 22:01:58	2019-08-06 22:16:16	boot	b	
565345	        2019-08-06 22:02:20	2019-08-06 22:02:20	pxe     p	

We remove the script field from this call.

Now we should introduce a new command vultr-cli script [script_id] or vultr-cli script [script_id] contents/list

Not entirely sure what the best sub-command will be for this. Either way the goal here is to allow users to see the contents of their script

[BUG] - vultr-cli plans list does not work

Describe the bug
vultr-cli plans list does not work

To Reproduce

$ vultr-cli plans list
error getting plan list : json: cannot unmarshal number 7.5 into Go struct field Plan.plans.monthly_cost of type int

$ vultr-cli version
Vultr-cli v2.5.2

Expected behavior
List of plans

Desktop (please complete the following information where applicable:

  • OS: Debian GNU/Linux 11 (bullseye)

Additional context

I dont't have a configuration file, but I expose my API key as $VULTR_API_KEY

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.