Issues for new Rancher CLI in Github?

I really like the new rancher-cli (https://github.com/rancher/cli) and have been playing around with the pre-release. I noticed that the github page doesn’t have an issues section and looking through the forums there isn’t much information.

Will this repo have an issues section after it’s first release so we can submit any bugs we may find?

I’ve run into a few issues, or maybe I’m just not understanding how the cli works and will post them here as well (using https://github.com/rancher/cli/releases/tag/v0.0.1)

  1. I created an Account API Key for account which has access to all our environments. However, when I set the RANCHER* env vars to keys and endpoint displayed in the GUI (RANCHER_URL=https://rancher.mycompany.com/v1), and then try to list available environments nothing comes back.

    :whale: ./rancher env ls
    ID NAME ORCHESTRATION STATE CREATED
    /var/tmp/rancher-v0.0.1

  2. When troubleshooting the first issue with listing environments, I used the --env flag to specify and environment, which works

    :whale: ./rancher --env 1a2668 hosts
    ID HOSTNAME STATE IP DETAIL
    1h160 ip-10-10-1-135.mycompany.com active 10.10.1.135
    1h161 ip-10-10-3-194.mycompany.com active 10.10.3.194
    1h162 ip-10-10-3-193.mycompany.com active 10.10.3.193
    1h163 ip-10-10-1-134.mycompany.com active 10.10.1.134

but trying to use the actual environment name, or a “fuzzy” match that was described in the recent Rancher Meetup, it doesn’t work,

🐳  ./rancher --env development hosts
FATA[0000] Failed to find the current environment
  1. Another issue I ran into, which isn’t a Rancher thing, but a Docker thing, is when running with a newer version of Docker on the system rancher-cli is on than what’s on your Rancher cluster, it gives something akin to:

Error response from daemon: client is newer than server (client API version: 1.24, server API version: 1.22)

This is fixed by changing your local environment to match the server API version,

export DOCKER_API_VERSION=1.22

I’m not sure if that is something that can be handled within the rancher-cli or if it should be added to the general documentation on using it.

I’ve added some notes on how to file bugs in the README, but basically, it should be done in rancher/rancher repo (like most of our other repos).

how did you set up the RANCHER_URL? can you run rancher config to set it up?

I haven’t had any issues with the ./rancher env ls. Mine returns correctly, so I’m wondering if it has something to do with your configuration.

@denise here are my ENV vars:

RANCHER_ACCESS_KEY=XXXXXXXXXXXXXXXXXX
RANCHER_SECRET_KEY=YYYYYYYYYYYYYYYYYYYYYYYYYYYY
RANCHER_URL=https://rancher.mycompany.com/v1

The URL is an AWS ELB setup for webproxy forwarding to our internal Rancher master that is running on http://rancher.internal.mycompany.com:8080.

I switched the RANCHER_URL to use this internal address and env ls now works. I switched back to the ELB and it now also works. Before I wrote this I thought I had verified everything, but it could have been an unexported ENV var or had the wrong key.

I’ll report any additional bugs per the documentation, thank you. I’m really enjoying the new CLI so far.

Micheal