# Rancher CLI not working as expected

**URL:** <https://forums.suse.com/t/rancher-cli-not-working-as-expected/11123>\
**Category:** SUSE Rancher Prime\
**Created:** [July 13, 2018, 11:53pm UTC](https://forums.suse.com/t/rancher-cli-not-working-as-expected/11123 "2018-07-13T23:53:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan\_Poboril](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jan_poboril/32/2778_2.png) [@Jan\_Poboril](https://forums.suse.com/u/Jan_Poboril)\
**Post date:** [July 13, 2018, 11:53pm UTC](https://forums.suse.com/t/rancher-cli-not-working-as-expected/11123/1 "2018-07-13T23:53:27Z")

</div>

For Rancher 1.x I am used to deploy stacks defined by docker-compose.yml by running: `rancher up` The I printed some progress and then it was done.

Now I installed Rancher 2 cluster. I UI it seems working well, co I tried to use also CLI (because I am going to use it in a GitLab CI):

```auto
 $ rancher login https://rancher.example.com/v3 --token token-xxx
INFO[0000] Only 1 project available: Default            
INFO[0000] Saving config to /Users/Bobik/.rancher/cli2.json 
 $ rancher up
FATA[0000] open : no such file or directory             
 $ rancher up -h
apply compose config

Usage: 
  rancher up [OPTIONS] [arg...]

Options:
   --file value, -f value The location of compose config file
 $ rancher up --file ci/docker-compose.production.yml 
 $ rancher ps
NAMESPACE NAME TYPE STATE IMAGE SCALE
 $ rancher up --file ci/docker-compose.production.yml --verbose
Incorrect Usage: flag provided but not defined: -verbose

apply compose config

Usage: 
  rancher up [OPTIONS] [arg...]

Options:
   --file value, -f value The location of compose config file
FATA[0000] flag provided but not defined: -verbose      
 $

```

Nothing happened in console and in web UI.

I thing it is not clever to change behavior if some CLI tool without clear reason and if yes then it should it least print helpful error messages.

Also I was looking for some docs on how to use the new CLI, but new docs on [https://rancher.com/docs/rancher/v2.x/en/](https://rancher.com/docs/rancher/v2.x/en/) does not have CLI section like the version for 1.6.

---

<div class="post-metadata">

**Author:** ![Fraser\_Goffin](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/fraser_goffin/32/6608_2.png) [@Fraser\_Goffin](https://forums.suse.com/u/Fraser_Goffin)\
**Post date:** [July 20, 2018, 2:34pm UTC](https://forums.suse.com/t/rancher-cli-not-working-as-expected/11123/2 "2018-07-20T14:34:32Z")

</div>

I don’t think with a major version upgrade it’s reasonable for you to expect backwards compatibility, for a minor version maybe … so ‘clever’ or not, there is a clear rationale.

As far as documentation, by all means lobby for improvements, that helps the community as a whole.

---

<div class="post-metadata">

**Author:** ![Jan\_Poboril](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jan_poboril/32/2778_2.png) [@Jan\_Poboril](https://forums.suse.com/u/Jan_Poboril)\
**Post date:** [July 20, 2018, 4:09pm UTC](https://forums.suse.com/t/rancher-cli-not-working-as-expected/11123/3 "2018-07-20T16:09:58Z")

</div>

I am ok with not having compatibility in CLI usage, if reasonable errors are print. But printing nothing means in UNIX world that it was successful.

I expect compatibility with external standard - Docker Compose YAML because both versions were marketed having it.

---

<div class="post-metadata">

**Author:** ![iamsteadman](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/iamsteadman/32/4413_2.png) [@iamsteadman](https://forums.suse.com/u/iamsteadman)\
**Post date:** [August 27, 2018, 7:37pm UTC](https://forums.suse.com/t/rancher-cli-not-working-as-expected/11123/4 "2018-08-27T19:37:03Z")

</div>

What’s the word on this? Just installed Rancher and currently the CLI doesn’t work, so this would seem a critical issue that needs addressing. Am I wrong?

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [August 28, 2018, 4:44am UTC](https://forums.suse.com/t/rancher-cli-not-working-as-expected/11123/5 "2018-08-28T04:44:28Z")

</div>

The 2.x and 1.x are basically entirely unrelated, including the CLI. 2.x supports kubernetes manifests, not docker-compose files. This is not going to change. You provided a YAML file which has no kubernetes resources in it, so `up` does nothing.

---

<div class="post-metadata">

**Author:** ![iamsteadman](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/iamsteadman/32/4413_2.png) [@iamsteadman](https://forums.suse.com/u/iamsteadman)\
**Post date:** [August 29, 2018, 12:58pm UTC](https://forums.suse.com/t/rancher-cli-not-working-as-expected/11123/6 "2018-08-29T12:58:22Z")

</div>

That makes sense, thanks @vincent. I’ll dig back in and if I get it working, I’ll shut my big mouth 🙊

---

<div class="post-metadata">

**Author:** ![Jan\_Poboril](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jan_poboril/32/2778_2.png) [@Jan\_Poboril](https://forums.suse.com/u/Jan_Poboril)\
**Post date:** [August 29, 2018, 1:26pm UTC](https://forums.suse.com/t/rancher-cli-not-working-as-expected/11123/7 "2018-08-29T13:26:00Z")

</div>

So we have to use [http://kompose.io](http://kompose.io)
