Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the same data only container as sidekick and be able to load balance to all service containers using the data only container. #2159

Closed
pwFoo opened this issue Sep 28, 2015 · 15 comments
Labels
area/workload kind/feature Issues that represent larger new pieces of functionality, not enhancements to existing functionality status/autoclosed

Comments

@pwFoo
Copy link

pwFoo commented Sep 28, 2015

Moved feature from request #2025 (comment) to a new issue.

A service with one data container an two app containers (apache, sshd) works, but they not share the same data container!

To get it work the data only container have to be the primary service and sshd / apache added as sidekick, but apache and sshd should be reachable by loadbalancer! As sidekicks that wouldn't work...

Is there a way to get it work with data only container as sidekick of sshd / apache? Another way could be convoy (share a convoy volume), but convoy volume plugin isn't added to RancherOS yet.

Would be great to have service containers with loadbalancer which use the same data only container / sidekick as storage.

LB -> apache container | sshd container -> shared data only container as sidekick.

@deniseschannon deniseschannon added area/workload kind/feature Issues that represent larger new pieces of functionality, not enhancements to existing functionality labels Sep 28, 2015
@pwFoo
Copy link
Author

pwFoo commented Sep 29, 2015

If a (data only) container is used with --volumes-from as sidekick each container should share the same volumes instead of create independent data only containers for each.

Would be important for me.

@pwFoo
Copy link
Author

pwFoo commented Oct 8, 2015

Any plans to make shared data only containers possible via sidekicks in the near future?

Would need it for testung in a dev env.

@aburnett
Copy link

+1 - needing to make the data container the primary definitely gets in the way of setting up the LBs to the actual services.

@deniseschannon deniseschannon changed the title Use the same data only container as sidekick with service containers Use the same data only container as sidekick and be able to load balance to all service containers using the data only container. Dec 18, 2015
@pwFoo
Copy link
Author

pwFoo commented Jan 2, 2016

Any progress with that feature request?

There should be two ways to build my service.

  1. shared data only container
    As above that isn't possible with to load balanced containers inside the service (ssh and http/s).
  2. share convoy volumes (but convoy with vfs backend to use local directory!)
    Here is a RancherOS convoy plugin (system-docker container?) needed. The catalog convoy-nfs uses vfs backend but requires nfs server... But a RancherOS system-docker service would be great and I miss such a RancherOS feature in the past.

@kilpatty
Copy link

+1 Trying to make a simple web server, and I have the current configuration: Nginx container, php-fpm contianer, both with volumes from an "app" container which is simply the data for the app (html pages, etc). I have an external Load Balancer that is directed towards the Nginx container, which links to the php container which links to the mysql container. If I use sidekicks I need Nginx to be the main container, but then I can't link the php container to mysql.

@jschilperoord
Copy link

+1 I have a data only container with 3 sidekicks running tomcat using configuration files located inside that data container. There is currently no way for me to use the builtin load balancer or create a nginx reverse proxy and point to those sidekicks using links

@cjellick
Copy link

@jschilperoord could a named volume solve this? Ie, instead of using volumes-from, put the data in named volumes and always reference the volume by name in your tomcat container like:

tomcat:
  volumes:
  - config:/etc/tomcat/config

If I'm oversimplifying let me know.

@jschilperoord
Copy link

@cjellick Thanks for your response 👍 Would using named volumes make the same volume available to all containers using it. In my case 3 tomcat processes using some configuration from a shared volume ?

@cjellick
Copy link

@jschilperoord yes, all containers on the same host would use the same exact volume and have access to the same data.

@jschilperoord
Copy link

@cjellick This works. However what volumes-from offered me is the assurance my tomcat containers where using the volumes of that container. Is it possible to change the config: part to something unique for the stack being launched ? I don't want another tomcat service using the same config somehow

@cjellick
Copy link

@jschilperoord you mean something that is dynamically generated each time you deploy the stack? If that's what you mean, then no, not at this time. You'd have to change the value in the yaml file.

@pwFoo
Copy link
Author

pwFoo commented Apr 18, 2016

@cjellick
Is a additional file with variables possible? So we could use the same docker-compose file with different env vraiable files.

@cjellick
Copy link

So I was a bit mistake. rancher-compose does support environment variable interpolation: http://docs.rancher.com/rancher/rancher-compose/environment-interpolation/

This may or may not be exactly what you're looking for, but its at least an option.

@EugenMayer
Copy link

EugenMayer commented Oct 3, 2016

@deniseschannon is there any reason this item has low priority? Are those use-cases covered by Convoy?

In my case, i am coming from 2 angles:

  • i want to horizontally scale the-app service using the lb service, but i need to share the data-storage. I cannot use sidekicks, since they are scaled with the numbers of apps and data would be split. If i use a named volume, i can only deploy this stack once on a host. Having a production and a preproduction stack is very common but would be blocked by this
  • I want to keep data persistent accross stack-upgrades, which right now, as far as i undestand, forces me into using named-volumes. This though forces me to only deploy a stack once on a server, which is a huge issue, since i rather have powerful servers with a lot of containers. Sure, there is the option using KVM + docker to split this up, but thats feels like a huge overhead / overcomplicating things

I would be glad to know why...

a) this issue has a low prio - are there alternatives / workarrounds ?
b) do other people not run into this case because they use named-volumes + a host per stack?
c) is a "host per stack" what you guys design for ( sounds not reasonable )

Thanks!

@deniseschannon
Copy link

With the release of Rancher 2.0, development on v1.6 is only limited to critical bug fixes and security patches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/workload kind/feature Issues that represent larger new pieces of functionality, not enhancements to existing functionality status/autoclosed
Projects
None yet
Development

No branches or pull requests

8 participants