Just not sure what I’m doing wrong.
I created a project in the Rancher web interface. It is a single stack consisting of various components–App for the web app, Mongo, and a couple additional services. Unfortunately I noticed an issue with my App container and, tired of mucking around a web interface, I dumped my config and decided to start working with the docker-compose files directly. This is with rancher-compose 0.26 and 0.37RC1 of Rancher.
First, I pushed a change to my image. I wanted to then restart my App service with the fixes in place. Unfortunately, there was no
rancher-compose pull, and stopping/starting the service didn’t appear to perform a pull. How do I trigger a new image pull?
Next, I ran into some issues with my existing App container, so I decided to completely recreate it. I did
rancher-compose rm App, but it didn’t appear to disappear from the web interface until I deleted it myself via the web interface. The deletion didn’t appear to fail from rancher-compose. Further, I can repeatedly
rm App with no apparent consequences or errors.
Then I thought I’d recreate this service from my docker-compose.yml, so I made a few minor tweaks and did
rancher-compose create App. No output. If I pass --debug I see:
←[37mDEBU←[0m Opening compose file: docker-compose.yml ←[37mDEBU←[0m Opening rancher-compose file: rancher-compose.yml ←[37mDEBU←[0m [0/5] [App]: Adding ←[37mDEBU←[0m Found stack: Perceptron(1e4) ←[37mDEBU←[0m Launching action for App ←[37mDEBU←[0m Project [perceptron]: Creating project ←[37mDEBU←[0m Finding service App ←[37mDEBU←[0m [0/5] [App]: Creating ←[34mINFO←[0m Creating service App ←[37mDEBU←[0m Finding service Janus ←[37mDEBU←[0m Found service Janus ←[37mDEBU←[0m Finding service Mongo ←[37mDEBU←[0m Found service Mongo ←[37mDEBU←[0m [0/5] [App]: Created
If I don’t pass --debug, the output is empty. App does not appear in the web interface.
Actually, I take that back. App does appear, but it took several minutes. It didn’t appear after a page reload.
Also, I’m trying to configure service discovery in my docker-compose.yml. Rancher apparently has some service discovery capabilities. How are these handled? Are they traditional Docker-based service links, or something else? I.e. if I link my Mongo container to my app and call it “Mongo”, is its hostname simply “mongo” or something else? I’m getting “connection refused” errors when trying to address it like a normal link so I wonder if I’m missing something. For instance:
links: - Janus:Janus - Mongo:Mongo
How do I then address Mongo? Is it simply “mongo” in the container or is there some other DNS magic happening?