Skip to content

This example shows how to mount an NFS share to Industrial Edge Device as a volume.

License

Notifications You must be signed in to change notification settings

industrial-edge/mounting-an-nfs-share-to-ied

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mounting an NFS share to IED

Description

Overview

This is a tutorial on how to use a Network File System protocol (NFS for short) to connect a shared folder located on a server to a Industrial Edge Device and use it as a volume for Docker container.

Network File System is a file system protocol allowing a user on a client computer to access files over a network like a local storage.

This application example uses OpenSSH-server image made by LinuxServer.io. More info can be found at the following website: OpenSSH-server website.

General Task

Network topology

The client is connected through SSH in Terminal to the OpenSSH-server container running on Industrial Edge Device. The server shares an NFS folder with Industrial Edge Device and the OpenSSH-server container uses this folder as a volume.

Requirements

Used components

  • Docker Engine 18.09.6
  • Docker-compose 1.25.0
  • Ubuntu Server
    • nfs-kernel-server package

Installation

A step by step installation guide can be found in the docs

If installed correctly, the shared folder at the server will be mounted to the nfs folder at the Industrial Edge Device.

Usage

After installing the app to Industrial Edge Device, you should be able to SSH to the OpenSSH-server container to test that everything works correctly. Use the following credentials on your machine to connect to the Edge device to see how the NFS Docker volumes work.

    ssh edge@192.168.178.20 -p 45555
    password: edge

Explanation

  1. This is the server side. As we can see, there is no file in nfs/shared folder. We create new file called hello.txt and write "Hello, IED!" into it.

server

Note: You may need to change folder permission to access the nfs/shared folder as the server user and to use the echo command to create and write to the hello.txt file. If that is the case, change the folder permission to be accessible to your user or use

  sudo chmod 777 -R nfs/

for testing purposes.

  1. This is the client side. After changing directory to nfs, we can see that there is a file called hello.txt and it contains the message "Hello, IED!" written by the server. We then reply to this message with "Hello, Server!" and pass it to the hello.txt file.

client

  1. When we take a look back at the server and read the file, we can see that the message successfully arrived and the hello.txt file now contains "Hello, Server!"

client

Documentation

Contribution

Thank you for your interest in contributing. Anybody is free to report bugs, unclear documentation, and other problems regarding this repository in the Issues section. Additionally everybody is free to propose any changes to this repository using Pull Requests.

If you haven't previously signed the Siemens Contributor License Agreement (CLA), the system will automatically prompt you to do so when you submit your Pull Request. This can be conveniently done through the CLA Assistant's online platform. Once the CLA is signed, your Pull Request will automatically be cleared and made ready for merging if all other test stages succeed.

Licence and Legal Information

Please read the Legal information.

About

This example shows how to mount an NFS share to Industrial Edge Device as a volume.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published