Giter VIP home page Giter VIP logo

dfs2018's Introduction

DFS2018

sha1sum - f78e38ed30a0473f85b96d0593800e6a39512bb1

DFS system for Lab assignment by Damir, Atadjan and Luis.

Screenshot

Index

Features

A distributed file system (DFS) is a file system with data stored on a server. The data is accessed and processed as if it was stored on the local client machine. The DFS makes it convenient to share information and files among users on a network in a controlled and authorized way. The server allows the client users to share files and store data just like if they were storing the information locally.

Architecture

Screenshot

Installation

DFS can be tested on the Docker container , it can be pushed from docker cloud or from github repository . To start using, script should be run. This script starts with name server. Storage Servers are running by command. Client needs command. Docker images:

push for storage server
$docker push domer/dsproj-storsrv

push client
$docker push domer/dsproj-client

push nameserver
$docker push domer/dsproj-namesrv

Running Locally

Make sure you have Python, pyftpdlib, PyOpenSSL and pip installed.

  1. Clone or Download the repository

    $ git clone https://github.com/Dzhan85/DFS2018.git
    $ cd DFS2018/
    
  2. Install Dependencies

    $ pip install
    
  3. Generate PKI in folder with your credentials(see Setup Configurations).

  4. Got to Storageserver folder and Run script Storage Server(as Admin)

    $ python ftpssrv.py
    
    
  5. Got to Nameserver folder and Run script (as Admin)

    $ python nameserver.py
    

By specifing IP addresses of storage servers. After succesfull connection you will see IP address and port.

  1. Got to Client folder and Run script (as Admin)
    $ python client.py
    

After succesfull connection you will specify IP address and port, which appeared in nameserver initialization.

  1. Start the application

    $ python ....
    

How It Works

###Client The client welcomes the user with the command line with the answer: “Type command”, this command line interface is very similar to native Linux Command Line but has some differences, for example this command interface will recognize only the commands defined in the application, to get a list of supported commands simply needs to type ‘gethelp’ in the command line and user will see the supported command list like in the Table 1:

Functionality Command Description
Help gethelp List of commands
Space frspace know avalaible space
List fllist To list folder contains
File delete makedir To make new directory
Directory chngdir Switch directory
Read file readfile To read/download file
Write file writefile To write/upload file
Delete file filedel To delete file
Size filesize To know size of file
Remove remdir To remove folder
Exit from DFS ftpsquit To close client and DFS

Setup Configurations

Database

Configuration and run in Docker

Local host preparations.

Storage service use it use default FTP 21 port for file transfer and rsync over SSH for synchronization, hosts SSH port 22, and FTP port 21 should be changed if they used.

Run image /bin/sh with command:

```
#docker run -it --rm --net=host domer/dsproj-storsrv /bin/sh
```

install dependencies #apt update

during ssh installation you will be asked about config file, choose second variant:

#apt install ssh

Screenshot

#apt install rsync

Start ssh service:

    # service ssh start
    [ ok ] Starting OpenBSD Secure Shell server: sshd.

Start server:

Server has next arguments
--secsrv, default="127.0.0.1" – server for synchronization
--homedir, default="/ftpsrv/share/" – FTP home directory
--user, default="user" – FTP user name
--passwd, default="12345" – FTP user password

Run server with: #python ftpssrv.py --secsrv <IPv4 of second srver>

Screenshot

Server started:

Screenshot

When client connected message will displayed:

Screenshot

When disconnected:

Screenshot

To stop server press CTRL-Z:

Screenshot

dfs2018's People

Contributors

dzhan85 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.