Powered By Blogger

Monday, November 2, 2015

Real-world Docker Series: NFS Tree/Hierarchy considerations

When building out the directory structure/tree design, it is important to do this in a sensible way.
Something like:

NFS1
|
|_HOST1
| |_Container1
| | |_webapp
| | |_logs
| |_Container2
| | |_webapp
| | |_logs
|_HOST2
| |_Container3
| | |_webapp
| | |_logs
| |_Container4
| | |_webapp
| | |_logs
|_HOST3
| |_Container5
| | |_webapp
| | |_logs
| |_Container6
| | |_webapp
| | |_logs
|_HOST4
| |_Container7
| | |_webapp
| | |_logs
| |_Container8
| | |_webapp
| | |_logs
|_SharedContent



In the tree design of this example, we're assuming each container will have a different code base for each container's running web application.  If they were all running the same application, you could for example, omit the webapp directory for each container, and mount up the same application with content placed in the SharedContent directory off the root of the NFS mount to the necessary web root of the container. 

Think this through when building out your environment.  Systems that perform orchestration are much better suited for what we're showing here, and you should definitely read about kubernetes.

No comments:

Post a Comment