Working with rancher-compose

I ran rancher-compose, but it is not clear what commands I need to give that I could connect to my online Rancher? Help me please.

Have you looked at our docs that go over how to use Rancher Compose?

If you don’t set environment variables, at a minimum, you need your rancher-compose command to contain these details to connect to Rancher.

rancher-compose --url URL_of_Rancher --access-key username_of_api_key --secret-key password_of_api_key

I entered the command but nothing happened

Those are just the options to tell it what Rancher to talk to. You haven’t given an actual command (like up) after them, so it just prints the usage info.

rancher-compose --url --access-key 4995..a6d151 --secret-key cbb7dc2..eda16a0375 up

vincent, write command should look like, please

I am a beginner, I want to understand how to start, thank you for your understanding

@111 Please look into as rancher-compose commands are almost the same. The only difference is that rancher-compose launches the services into Rancher instead of in your local docker instance. After reading through docker-compose information, you should read the rancher-compose docs which outline small differences and Rancher specific services.

A simple command to get services into Rancher would be:

rancher-compose up

Note: This would need the url, access-key and Secret key.

I can not understand how I get to the server

As I mentioned, you need to include the url, access key and secret key in your command. Alternatively, you can make them environment variables.

So, in your example, you would do the first command (That has everything you need to pass to the Rancher server) and the word up to make it a valid command.

Please read the documentation links that I’ve sent over as they help explain these things.

@111 You can execute rancher-compose like this

rancher-compose -f “/path/to/docker-compose.yml” --url 79.xx.xx.37 --access-key XYZABCPQR --secret-key CNSKMKDSKDMMDKMDKS up

If you notice, I’ve put the ‘up’ after the --url and other flags.

Also, make sure you pass in the path to a docker-compose.yml file as another flag.

Did not happen, or that did I wrote something wrong?

The URL cannot be just an IP address. Please prefix it with the scheme, and suffix it with the path

so your command should be

rancher-compose -f “/path/to/DOCKER-COMPOSE.YML” --url http://79.XX.XX.37/v1/ --access-key ajnfjkdnfkjd --secret-key alsndafnldsnfl up

Please note that -f expects a docker-compose.yml.

Secondly, can you elaborate what purpose rancher serves you? Understanding that would let us help you better :smile:

I have website - business community. Each user community (site wordpress (buddypress)) has own environment Rancher (project).

  1. For example: there are 100 users and they have 100 environments Rancher.
  2. Each user can through Rancher UI, Rancher CLI to deploy the application Odoo (other applications) on own host.
  3. User can:
    • scale;
    • clone;
    • do a dump;
    • to transfer to another host;
    • create instances for the presentation, development, production;
    • to make changes to a copy of the development;
    • stop, start;
    • other features Rancher.
  4. Wish: have the list of templates applications that can be deployed by one click through Rancher UI.
  5. Wish: create own templates of applications that can then be deployed on the hosts.
  6. Wish: to be able to limit the number of applications that users can deploy specific.
  7. Wish: OpenLDAP used to login the Rancher.
    Now I try to deploy applications via Rancher UI, Rancher CLI - is not very successful.

THANKS!!! many thanks denise vincent and wlan0. wlan0 special thanks!
that’s correct command:

rancher-compose -f "C:/test/docker-compose.yml" --url --access-key 17907E826C08DE0 --secret-key mZSwmZ7DkbhZFSH3GF1JXqyML up