civo / cli-rubygem Goto Github PK
View Code? Open in Web Editor NEWCommand line interface for interacting with Civo's cloud API
Home Page: https://www.civo.com
License: MIT License
Command line interface for interacting with Civo's cloud API
Home Page: https://www.civo.com
License: MIT License
I'm using:
Linux Ubuntu 16.04
Ruby 2.3.0
I installed civo and civo_cli using gem install
, then got this when I ran civo
:
/var/lib/gems/2.3.0/gems/civo_cli-0.3.9/lib/instance.rb:8:in `<class:Instance>': uninitialized constant CivoCLI::NameGenerator (NameError)
Did you mean? NameError
from /var/lib/gems/2.3.0/gems/civo_cli-0.3.9/lib/instance.rb:2:in `<module:CivoCLI>'
from /var/lib/gems/2.3.0/gems/civo_cli-0.3.9/lib/instance.rb:1:in `<top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /var/lib/gems/2.3.0/gems/civo_cli-0.3.9/lib/civo_cli.rb:8:in `block in <top (required)>'
from /var/lib/gems/2.3.0/gems/civo_cli-0.3.9/lib/civo_cli.rb:8:in `each'
from /var/lib/gems/2.3.0/gems/civo_cli-0.3.9/lib/civo_cli.rb:8:in `<top (required)>'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /var/lib/gems/2.3.0/gems/civo_cli-0.3.9/exe/civo:4:in `<top (required)>'
from /usr/local/bin/civo:23:in `load'
from /usr/local/bin/civo:23:in `<main>'
Please could someone take a look as this is a blocking error.
Thanks
Alex
If a user has no API keys set and adds a new API key, for simplicity's sake make that automatically the current key.
The CLI is currently leaking confidential data, i.e. the initial password.
This means it cannot be used in automation jobs or CI/CD.
Suggested fix:
--show-passwords
Example test job: https://travis-ci.org/alexellis/civo-prod-app/builds/556941496?utm_source=github_status&utm_medium=notification
I'm guessing the following list should use api_key
rather than a_p_i_key
?
$ civo apikey help
Commands:
civo a_p_i_key add NAME KEY # Add the API Key 'KEY' using a label of 'NAME'
civo a_p_i_key current [NAME] # Either return the name of the current API key or set the current key to b...
civo a_p_i_key help [COMMAND] # Describe subcommands or one specific subcommand
civo a_p_i_key list # List all stored API keys
civo a_p_i_key remove NAME # Remove the API Key with a label of 'NAME'
running civo kubernetes create <name>
with or without parameter triggers these errors :
Ruby 2.6
/var/lib/gems/2.6.0/gems/flexirest-1.8.6/lib/flexirest/request.rb:595:in `handle_response': The POST to '/v2/kubernetes/clusters' returned a 403 status, which raised a Flexirest::HTTPForbiddenClientException with a body of: {"result":"forbidden","status":403,"reason":"Sorry, this feature is not enabled"}
RUby 2.5
/var/lib/gems/2.5.0/gems/civo_cli-0.4.5/lib/kubernetes.rb:185:in
rescue in create': undefined method
reason' for #String:0x00000000029b5940 (NoMethodError)
tried on Ubuntu 16.04.6 & MacOS 10.14.6
I regenerated my API key and updated it as current with CLI, it makes no difference.
When setting up a new kubernetes cluster via the cli
using the the --save
argument, it seems to overwrite the current local file removing all earlier clusters in it leaving only the new cluster in the file.
Experienced this on v 0.5.8 of the CLI, Windows 10 computer.
Let me know if you need any more information about my setup!
Alex E. suggested possibly swapping out the default commands for kubernetes
and applications
for the shorter k8s
and apps
to save on typing. Would keep the longer terms as aliases, essentially just swapping out the current defaults for the aliases.
Thoughts?
I encountered an exception whilst running instance create --wait
This may be confusing to new users.
I would suggest adjusting the API rate limit for Civo's service, or backing-off on the retry for the polling.
[alex@nuc ~]$ civo instance create \
> --name ${HOST} \
> --ssh-key ${SSH_KEY_ID} \
> --template=${TEMPLATE} \
> --wait
Building new instance k3sup-1: \
/
\
\
Traceback (most recent call last):
27: from /home/alex/.gem/ruby/2.6.0/bin/civo:23:in `<main>'
26: from /home/alex/.gem/ruby/2.6.0/bin/civo:23:in `load'
25: from /home/alex/.gem/ruby/2.6.0/gems/civo_cli-0.3.10/exe/civo:6:in `<top (required)>'
24: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
23: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
22: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
21: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
20: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
19: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
18: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
17: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
16: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
15: from /home/alex/.gem/ruby/2.6.0/gems/civo_cli-0.3.10/lib/instance.rb:145:in `create'
14: from /home/alex/.gem/ruby/2.6.0/gems/civo_cli-0.3.10/lib/spinner.rb:9:in `spin'
13: from /home/alex/.gem/ruby/2.6.0/gems/civo_cli-0.3.10/lib/spinner.rb:9:in `new'
12: from /home/alex/.gem/ruby/2.6.0/gems/civo_cli-0.3.10/lib/spinner.rb:18:in `initialize'
11: from /home/alex/.gem/ruby/2.6.0/gems/civo_cli-0.3.10/lib/spinner.rb:45:in `spin'
10: from /home/alex/.gem/ruby/2.6.0/gems/civo_cli-0.3.10/lib/instance.rb:146:in `block in create'
9: from /home/alex/.gem/ruby/2.6.0/gems/flexirest-1.7.9/lib/flexirest/mapping.rb:28:in `block in _map_call'
8: from /home/alex/.gem/ruby/2.6.0/gems/flexirest-1.7.9/lib/flexirest/mapping.rb:46:in `_call'
7: from /home/alex/.gem/ruby/2.6.0/gems/flexirest-1.7.9/lib/flexirest/request.rb:181:in `call'
6: from /home/alex/.gem/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/notifications.rb:180:in `instrument'
5: from /home/alex/.gem/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
4: from /home/alex/.gem/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/notifications.rb:180:in `block in instrument'
3: from /home/alex/.gem/ruby/2.6.0/gems/flexirest-1.7.9/lib/flexirest/request.rb:229:in `block in call'
2: from /home/alex/.gem/ruby/2.6.0/gems/faraday-0.15.4/lib/faraday/response.rb:61:in `on_complete'
1: from /home/alex/.gem/ruby/2.6.0/gems/flexirest-1.7.9/lib/flexirest/request.rb:256:in `block (2 levels) in call'
/home/alex/.gem/ruby/2.6.0/gems/flexirest-1.7.9/lib/flexirest/request.rb:584:in `handle_response': The GET to '/v2/instances' returned a 429 status, which raised a Flexirest::HTTPClientException with a body of: {"error":"Throttle limit reached. Retry later."} (Flexirest::HTTPClientException)
13: from /home/alex/.gem/ruby/2.6.0/bin/civo:23:in `<main>'
12: from /home/alex/.gem/ruby/2.6.0/bin/civo:23:in `load'
11: from /home/alex/.gem/ruby/2.6.0/gems/civo_cli-0.3.10/exe/civo:6:in `<top (required)>'
10: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
9: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
8: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
7: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
6: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
5: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
4: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
3: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
2: from /home/alex/.gem/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
1: from /home/alex/.gem/ruby/2.6.0/gems/civo_cli-0.3.10/lib/instance.rb:115:in `create'
/home/alex/.gem/ruby/2.6.0/gems/civo_cli-0.3.10/lib/instance.rb:159:in `rescue in create': undefined method `colorize' for nil:NilClass (NoMethodError)
This would avoid instances being created with names such as --hostname=recovery_machine
The use of --verbose
or debug
flag is common to be able to debug requests or problems from the clients machine.
Alex Ellis had an idea of having a similar list to Docker's [Adjective]-[Noun] to make memorable names.
Currently the spinner will spin until instance/cluster is created or times out. Could benefit from a counter of seconds taken or similar more effective display that it has not hung.
I think we should implement a global -o=json
or --output=json
which outputs in JSON format for neat scripting in to jq
.
I also think we should consider a -q
which gives a quieter output to commands. For example:
$ civo instance password gitops-prod -q
foo-password-here
$ civo instance password gitops-prod
The password for gitops-prod.example.civo.com is foo-password-here # with green highlights
I installed civo_cli into MacOS/Ruby 2.6.4 and see a Ruby warning when I use the CLI:
$ rvm current
ruby-2.6.4
$ uname -a
Darwin starkair.lan 18.7.0 Darwin Kernel Version 18.7.0: Sat Oct 12 00:02:19 PDT 2019; root:xnu-4903.278.12~1/RELEASE_X86_64 x86_64
$ civo
/Users/drnic/.rvm/gems/ruby-2.6.4/gems/activesupport-4.2.11.1/lib/active_support/core_ext/object/duplicable.rb:111: warning: BigDecimal.new is deprecated; use BigDecimal() method instead.
Generated an SSH key and uploaded it:
civo apikey current production
civo ssh list |grep mini
| 5f81118c-1a69-4ba8-af0a-a73c308b3f51 | [email protected] | SHA256:PXVGBq8t7Fs4NKYdvZze6d2jR0y2Y4uPdIJB2H6DAzk |
export SSH_KEY_ID="5f81118c-1a69-4ba8-af0a-a73c308b3f51"
Then:
export HOSTNAME="gitops-prod.example.com"
civo instance show "${HOSTNAME}"
export EXISTS=$?
export TEMPLATE="811a8dfb-8202-49ad-b1ef-1e6320b20497"
if [ "${EXISTS}" -ne "0" ]
then
civo instance create \
${HOSTNAME} \
--template=${TEMPLATE} \
--ssh="${SSH_KEY_ID}"
fi
Then:
ssh -i ../id_rsa [email protected]
root@gitops-prod:~# cat .ssh/authorized_keys
<empty file>
Using a Mac hit two problems.
PATH
Password:
ERROR: Error installing civo_cli:
zeitwerk requires Ruby version >= 2.4.4.
workaround: Fine let me run brew install ruby
3. civo not found in PATH
civo
zsh: command not found: civo
workaround: echo 'export PATH="/usr/local/lib/ruby/gems/2.6.0/bin:$PATH"' >> ~/.zshrc
Providing a better install UX would be awsome, just downloading an executable (ie go binary), or hiding all the dependencies behind a brew install civo
or apt install -f civo.deb
that is easier to install.
In docker
I can do this:
# give all containers in a grid
docker ps
# give the IDs of containers on new lines, with no heading
docker ps -q
I'd like to do the same in the Civo CLI for scripting.
An example of what I'd like to do:
civo k8s ls -q | xargs civo k8s rm
I think that mirroring the CLI experience from the docker
command would appeal to the cloud native persona
Everywhere that all
is a command, alias it to ls
.
Everywhere that get
is a command, alias it to show
and inspect
Alias help
to be the default command, not the all
action so make the interface more discoverable.
When running the command:
$ civo kubernetes rename playground --name=civoplay
The old name still shows up:
$ civo kubernetes config civoplay
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: DELETED
server: https://DELETED
name: playground
contexts:
- context:
cluster: playground
user: playground
name: playground
current-context: playground
kind: Config
preferences: {}
users:
- name: playground
user:
password: DELETED
username: admin
While civo kubernetes list
shows the new name:
$ civo kubernetes list
+--------------------------------------+----------+---------+----------+---------+------------+
| ID | Name | # Nodes | Size | Version | Status |
+--------------------------------------+----------+---------+----------+---------+------------+
| DELETED | civoplay | 3 | g2.small | 1.0.0 | INSTALLING |
+--------------------------------------+----------+---------+----------+---------+------------+
Using the most recent Docker CLI image (6fc7d41d6aa4
), though not the most recent version:
$ civo version
You are running v0.5.6 of Civo CLI, but are out of date because v0.5.7 is available
``
After updating today:
sudo gem install civo civo_cli
I got this error:
civo k8s create --nodes=3
Traceback (most recent call last):
12: from /usr/local/bin/civo:23:in `<main>'
11: from /usr/local/bin/civo:23:in `load'
10: from /usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/exe/civo:6:in `<top (required)>'
9: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
8: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
7: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
6: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
5: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
4: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
3: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
2: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
1: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/lib/kubernetes.rb:117:in `create': undefined method `split' for nil:NilClass (NoMethodError)
civo k8s create --nodes 3
Traceback (most recent call last):
12: from /usr/local/bin/civo:23:in `<main>'
11: from /usr/local/bin/civo:23:in `load'
10: from /usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/exe/civo:6:in `<top (required)>'
9: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
8: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
7: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
6: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
5: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
4: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
3: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
2: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
1: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/lib/kubernetes.rb:117:in `create': undefined method `split' for nil:NilClass (NoMethodError)
I even get it with no arguments:
civo k8s create
Traceback (most recent call last):
12: from /usr/local/bin/civo:23:in `<main>'
11: from /usr/local/bin/civo:23:in `load'
10: from /usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/exe/civo:6:in `<top (required)>'
9: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
8: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
7: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
6: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
5: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
4: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
3: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
2: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
1: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/lib/kubernetes.rb:117:in `create': undefined method `split' for nil:NilClass (NoMethodError)
Or when giving a name:
civo k8s create market
Traceback (most recent call last):
12: from /usr/local/bin/civo:23:in `<main>'
11: from /usr/local/bin/civo:23:in `load'
10: from /usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/exe/civo:6:in `<top (required)>'
9: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
8: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
7: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
6: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
5: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
4: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
3: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
2: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
1: from /usr/local/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/civo_cli-0.3.15/lib/kubernetes.rb:117:in `create': undefined method `split' for nil:NilClass (NoMethodError)
Not sure what is causing this, but it looks like valid usage?
civo k8s
Commands:
civo kubernetes config ID/NAME [--save] # get or save the ~/.kube/config for a Kubernetes cluster by ID or name
civo kubernetes create [NAME] [...] # create a new kubernetes cluster with the specified name and provided options
civo kubernetes help [COMMAND] # Describe subcommands or one specific subcommand
civo kubernetes list # list all kubernetes clusters
civo kubernetes remove ID/NAME # removes an entire Kubernetes cluster with ID/name entered (use with caution!)
civo kubernetes rename ID/NAME [--name] # rename Kubernetes cluster
civo kubernetes scale ID/NAME [--nodes] # rescale the Kubernetes cluster to a new node count
civo kubernetes show ID/NAME # show a Kubernetes cluster by ID or name
Currently (0.3.2) only shows first N instances, not all of them if user has more than N instances.
k3sup-civo-tutorial$ ./add-agents.sh
The IP of the server is: 91.211.152.189
Adding nodes 2, 3, and 4
Building new instance k3sup-agent-2: Done
Created instance k3sup-agent-2 - [email protected] in 00 min 43 sec
Building new instance k3sup-agent-3: Done
Created instance k3sup-agent-3 - [email protected] in 01 min 57 sec
Building new instance k3sup-agent-4: Traceback (most recent call last):
13: from /usr/local/bin/civo:23:in `<main>'
12: from /usr/local/bin/civo:23:in `load'
11: from /var/lib/gems/2.5.0/gems/civo_cli-0.3.10/exe/civo:6:in `<top (required)>'
10: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
9: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
8: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
7: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
6: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
5: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
4: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
3: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
2: from /var/lib/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
1: from /var/lib/gems/2.5.0/gems/civo_cli-0.3.10/lib/instance.rb:115:in `create'
/var/lib/gems/2.5.0/gems/civo_cli-0.3.10/lib/instance.rb:159:in `rescue in create': undefined method `colorize' for nil:NilClass (NoMethodError)
I was simply adding 3 instances with a similar command to #34
Currently using kubernetes create --wait --save
saves the config file and switches context automatically to it. Could implement a --switch
boolean option to make it do it only when required.
When playing with civo-cli I got a traceback when running the civo apikey current
command just after setting my first key
$ civo apikey add demo-key xxxxxxxxx
Saved the API Key xxxxxxxxx as demo-key
$ civo apikey current
Traceback (most recent call last):
14: from /Users/luc/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'
13: from /Users/luc/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
12: from /Users/luc/.rvm/gems/ruby-2.6.3/bin/civo:23:in `<main>'
11: from /Users/luc/.rvm/gems/ruby-2.6.3/bin/civo:23:in `load'
10: from /Users/luc/.rvm/gems/ruby-2.6.3/gems/civo_cli-0.4.4/exe/civo:6:in `<top (required)>'
9: from /Users/luc/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
8: from /Users/luc/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
7: from /Users/luc/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
6: from /Users/luc/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
5: from /Users/luc/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
4: from /Users/luc/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
3: from /Users/luc/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
2: from /Users/luc/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
1: from /Users/luc/.rvm/gems/ruby-2.6.3/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
/Users/luc/.rvm/gems/ruby-2.6.3/gems/civo_cli-0.4.4/lib/apikey.rb:42:in `current':
It does not happen once I've setup a current key
$ civo apikey current demo-key
The current API Key is now demo-key
$ civo apikey current
The current API Key is demo-key
The version I use:
$ civo version
You are running the current v0.4.4 of Civo CLI
Currently, even if a user only has one kubernetes cluster and they run civo apps add app_name
on its own the CLI errors out hard.
Options: Either,
Add a --save option to kubectl k8s config which will merge the downloaded configuration with their existing ~/.kube/config file.
This relies on them already having kubectl installed and is a simple matter of shelling out like this:
KUBECONFIG=~/.kube/this-config:~/.kube/other-config \
kubectl config view --flatten > ~/.kube/config
Of course if no ~/.kube/config file exists, simply create the folder and file.
API guide https://www.civo.com/api/loadbalancer
Have a way for a user to see the post-install information currently visible on the dashboard when Kubernetes apps are installed on the CLI
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.