If you want the dataset to be available on every host, you could use a
DaemonSet to update it (again via a hostpath) independently of the
individual processes. This is assuming they don't need to be told that it's
new.

Alternatively, you could use init containers and sidecars to do the
updating from inside the application pods, but then you need to coordinate
between the pods somehow.

Your Dockerfile can be rather simple, just package up everything you need.
The pod spec lets you set the command and mount the volumes.

/MR

On Mon, Jul 3, 2017 at 6:14 AM <thst...@gmail.com> wrote:

> On Friday, June 30, 2017 at 3:15:30 PM UTC-7, Michelle Au wrote:
> > For the RocksDB pod, hostpath should work.  Hostpath volumes are not
> automatically cleaned up, so it should be able to work for your use case.
> Note that you will need to specifically use a node selector in your pods if
> you want to access that particular DB instance.  If you want a more
> scalable solution, there is a new alpha local storage PV feature, where you
> can expose each SSD as a PV, and you no longer need to manually schedule
> your pods to specific nodes.
> https://github.com/kubernetes-incubator/external-storage/tree/master/local-volume
> >
> >
> > I'm not familiar with RocksDB, is it accessible over the network, or
> only locally?  If only locally, then your app pods will also need to use
> the same hostpath or local PV mechanism.
> >
>
> The deployment is local on two physical nodes in our datacenter. The
> server hard drives are SSD not specific for RocksDB. This local storage PV
> feature looks like what I need but where to get an example how to use it?
>
> There is two more issues:
> 1) about RocksDB data update. It is updated weekly and it needs to be
> switched to the new version.
> Say Pod01 is using RocksDB01. Next week RocksDB02 is ready and should
> become live and RocksDB01
> deleted. Now - the simplest solution should be one RocksDB with two
> replicated Pods using the same
> RocksDB. So the question is how to switch DB01 to DB02 and users to
> continue uninterrupted. If it is
> only Pod01 and Pod02 I know Kubernetes can update the versions of the
> executable so Pod01 and Pod02
> to go from version 1 to version 2 if needed. In my case Pod versions will
> stay the same for a long time but
> the DB versions should be updated every week.
>
> 2) how should I design the Docker files? I am using a Golang web service
> which is started from bash file with an argument a path the DB.
>
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Jun 30, 2017 at 9:26 AM,  <ths...@gmail.com> wrote:
> > I have the following setup:
> >
> >
> >
> > One node with
> >
> > 1) Golang app using read only RocksDB.
> >
> > 2) Docker image with RocksDB mounted to host node’s filesystem
> >
> > Need to create at least two Pods using same RocksDB (it is big and needs
> to be just one copy).
> >
> > Also later I need to create one more node with exactly the same
> configuration. The two nodes to be load balanced.
> >
> >
> >
> > The node's disk is SSD and I want the  RocksDB data to be stored locally
> on the same node.
> >
> > For RocksDB data storage I am exploring hostPath. From the documentation:
> >
> > "A hostPath volume mounts a file or directory from the host node’s
> filesystem into your pod."
> >
> > Host-based storage is similar to Docker volumes, where a portion of the
> host’s storage becomes available to the pod.
> >
> >
> >
> > What concerns me is the following:
> >
> > Once a pod is terminated, the volume gets automatically deleted.
> >
> >
> >
> > Because it is a database I need to remain on the node's filesystem.
> >
> >
> >
> > How to solve those challenges with Kubernetes?
> >
> >
> >
> > --
> >
> > You received this message because you are subscribed to the Google
> Groups "Kubernetes user discussion and Q&A" group.
> >
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to kubernetes-use...@googlegroups.com.
> >
> > To post to this group, send email to kubernet...@googlegroups.com.
> >
> > Visit this group at https://groups.google.com/group/kubernetes-users.
> >
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes user discussion and Q&A" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kubernetes-users+unsubscr...@googlegroups.com.
> To post to this group, send email to kubernetes-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/kubernetes-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to kubernetes-users+unsubscr...@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to