Hi Chamila, Thanks for looking into this. Please find my comments inline:
On Tue, Jun 7, 2016 at 6:03 AM, Chamila De Alwis <[email protected]> wrote: > > > In the push method, it's the GW manager that initiates the process. > > 1. Add a folder watcher (inotifywatch[1]) to > repository/deployment/server/synapse-configs > 2. When triggered > 1. Contact Kubernetes API and get list of WORKER_SVC container IPs > 2. for each container IP, Rsync with --delete > > It would be better if we can implement this feature without tightly coupling with the K8S API. Therefore I prefer the pull based model than this. > The pull method works the other way, i.e. initiated by the GW worker nodes > and has to be run continuously on a loop. > This approach can be applied to API-M on any container cluster manager (and also on VMs) with very few changes. AFAIU it's matter of changing how SSH server and rsync command processes are run on each GW node. K8S can use separate containers for these using pods and Mesos can use supervisord [4]. [4] https://docs.docker.com/engine/admin/using_supervisord/ Thanks > Additionally, Kubernetes supports a volume plugin named Git Volume [2], > which is basically an emptyDir volume with an initial "git clone" command > done on the provided remote repository. > > The issue with this is that there is no push functionality when the > contents are updated. This might be solved by extending the Git Repo volume > plugin and writing a Carbon Volume Plugin for Kubernetes, however IMO it > would come up with the same set of problems we have in the current SVN > based deployment synchronization, only with an additional code base. > > NFS volume based approach was also considered, however because of the > limitations in moving the mount between the nodes (solutions like Flocker > works on Block Level storage [3]), and managing read-write capability of > multiple containers it also seems to be a complex path. > > IMO out of these approaches, Rsync is the possible candidate (specifically > the push method), although it takes a few workarounds to achieve > functionality. GW Managers would need to synchronize artifacts between > themselves, as well as towards the worker nodes, and the push job should > only run from the active manager node. > > I highly appreciate any input on this. > > [1] - http://linux.die.net/man/1/inotifywatch > [2] - http://kubernetes.io/docs/user-guide/volumes/#gitrepo > [3] - > https://docs.clusterhq.com/en/latest/faq/#can-i-attach-a-single-volume-to-multiple-hosts > > Regards, > Chamila de Alwis > Committer and PMC Member - Apache Stratos > Software Engineer | WSO2 | +94772207163 > Blog: code.chamiladealwis.com > > > -- *Imesh Gunaratne* Software Architect WSO2 Inc: http://wso2.com T: +94 11 214 5345 M: +94 77 374 2057 W: https://medium.com/@imesh TW: @imesh Lean . Enterprise . Middleware
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
