Rancher-compose on invalid credentials

Ok,

So with the load balancer debacle out of the way, I’m getting my feet wet with rancher-compose.

It didn’t take long for me to run into issues, though :wink:

I thought I’d try the simplest possible thing to get started, but alas, something is amiss. I created a new stack, with a single service alias in it (pointing at an IP address), and exported its config. Next I tried to run rancher-compose create using the exported config to see what happens, but it fails when attempting to create the environment…

Ah, and now, as I was about to paste all the info, I notice that my API key has changed due to a complete reinstall of rancher at some point.

So, in essence, the issue was a misleading error message due to bad credentials.

$ rancher-compose --debug -p test create
DEBU[0000] Opening compose file: docker-compose.yml     
DEBU[0000] Opening rancher-compose file: /Users/.../Downloads/compose/rancher-compose.yml 
INFO[0000] Creating environment test                    
ERRO[0000] Failed to open project test: Resource type [environment] is not creatable 
2015/08/04 10:12:38 Failed to read project: Resource type [environment] is not creatable

It doesn’t help that the API/CLI are reverse terminology of the UI. :smile:

Basically, creating environment test is really saying Creating Stack test. So rancher-compose is about to start creating the stack test.

Failed to read project really means Failed to read environment. By being unable to read the environment (UI term, upper right corner), it’s saying that it’s unable to find an environment for the API keys.

Hope that clears things up a little? :wink: But I agree that the error messaging isn’t great for this scenario (outside of the mixed up terms).

Yes, agreed. I figured as much, but posted it anyway to remind you so that you won’t forget to look at the messaging in this area :wink: