nixelsolutions / rancher-glusterfs-server

Gluster FS Cluster for being used with Rancher Server
24 stars 32 forks source link

concrete example in the readme would be awesome :) #1

Open gregory opened 9 years ago

ebuildy commented 9 years ago

Run this container with Docker, without exposing ports since the Rancher IP will be used.

Here the possible env. vars: ENV ROOT_PASSWORD ChangeMe ENV SSH_PORT 2222 ENV SSH_USER root ENV SSH_OPTS -p ${SSH_PORT} -o ConnectTimeout=20 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ENV GLUSTER_VOL ranchervol ENV GLUSTER_BRICK_PATH /gluster_volume ENV GLUSTER_CONF_FLAG /etc/gluster.env ENV SERVICE_NAME gluster ENV DEBUG 0

There is a "dig" somewhere, I guess the container will look up automatically for peers.

So nothing to do, just run it & have fun!

nixelsolutions commented 9 years ago

Sorry guys didn't have time to write the readme, but as @ebuildy says you only need to set the ROOT_PASSWORD env var. Follow this example where you'll find how to use it:

http://rancher.com/building-microservices-with-docker-on-the-new-rancher-beta/

In a few days I'll write the readme with examples.

Thanks

abhijeetka commented 9 years ago

@nixelsolutions hey, i am facing the same issues while building all your images. Don't know why its there. i worked with your images present on Docker hub and its working fine. If possible please update the latest Dockerfile to Github.

nixelsolutions commented 9 years ago

@abhijeetka Hey! which errors are you getting when building? The repo is updated with last changes.

abhijeetka commented 9 years ago

thanks @nixelsolutions for the updat, however i am facing issues while running Wordpress file with some modification i am facing issues with ENV GLUSTER_HOST storage.

please find below the error log from the container.

ERROR: Could not determine which containers are part of Gluster service. Invalid Date Invalid Date* Is Gluster service linked with the alias "storage"? Invalid Date Invalid Date* If not, please link gluster service as "storage" Invalid Date Invalid Date*\ Exiting ...

when i set GLUSTER_HOST with Ip address of gluster container which in my case 10.42.42.200,10.42.199.83, getting following error

Invalid Date Invalid Date* ERROR: Could not determine which containers are part of Gluster service. Invalid Date Invalid Date* Is Gluster service linked with the alias "10.42.42.200,10.42.199.83"? Invalid Date Invalid Date* If not, please link gluster service as "10.42.42.200,10.42.199.83" Invalid Date Invalid Date* Exiting ..

for further investigation if you require my Dockerfile and run.sh please comment so that i can forward you.

Thanks.

nixelsolutions commented 9 years ago

@abhijeetka Which version of image are you using? Please use nixel/rancher-glusterfs-server :v3.7.4

With this version you only need to set this ENV VAR:

ROOT_PASSWORD=XXXXXX (replace XXXXXX with a random string that Gluster will use to connect to other peers in the cluster)

Also make sure that the service name is "gluster" or, if not, set "SERVICE_NAME" env var and set its value with the current service name. The containers will execute this command to find other peers in the service:

GLUSTER_PEERS=dig +short ${SERVICE_NAME} | sort

So you need to make sure that the service name is known by the containers.

nixelsolutions commented 9 years ago

Also remember to:

abhijeetka commented 9 years ago

Thanks again @nixelsolutions we are facing issues in wordpress images that you have created. Currently we are using the latest tag for all the images.

abhijeetka commented 9 years ago

@nixelsolutions hey i would like to discuss about the percona cluster that you have created and the complete flow, i followed the blog present on rancher website http://rancher.com/setting-up-a-scalable-and-highly-available-wordpress-environment-with-rancher-and-docker/ however i feel that this blog is too old to follow. please let me know a medium to contact you either by mail or chat. Awaiting your response.