Giter Club home page Giter Club logo

ipfs-kubo's Introduction

What is this project about?

In this project we have set up private p2p network taking advantage of InterPlanetary File System IPFS.

Client nodes in the network are able to find themselves over the internet using the bootstrap server. After clients have found other clients, bootstrap server it is not necessary anymore and clients can communicate directly with each other.

Project represents a system where there are nodes that want to occasionally share some files with each other, but keep network restricted only the nodes that have the key for the network.

We experimented with multiple network setups with Docker networking. However, we did not get the bootstrapping to work in a network where the client nodes were isolated. In this project the client nodes are running on the same local network, in which the bootstrap nodes are not needed to discover peers. We decided to include the bootstrap nodes in this setup anyway to demonstrate the structure of the network in an actual use-case.

How to run the system

  1. Run run.sh. This script will initialize and start the system. You are ready to transfer files between the nodes and create directories to your private network. When you want to stop, shutdown the system and clean up afterwards with down.sh
  2. You can execute file transfer between nodes by running simulate.sh. This script generates random files and transfers them between the nodes in the network.

The above scripts are located in the simulation directory.

If you want to access other nodes with web UI go to Settings page and change the port matching the port of the node.

Port_change.png

About project files

cleanup.sh is script which clears and creates the folders for local data of IPFS nodes.

10import-webui.sh, 20clean-bootstrap.sh and 30log-bootstrap.sh are a configuration scripts for the IPFS nodes.

swarm.key is the private key that the nodes authenticate itself to private network.

How to set up development environment

To be able to run the project you must have Docker and Docker Compose installed. Follow the installation guide in Docker documentation: https://docs.docker.com/engine/

Reboot your system after install.

Option: VM + Docker

Option is to run the Docker in virtual machine. You can automate the creation of virtual machine with Vagrant. You need to install VirtualBox for virtual machines and Vagrant for automation.

Setup tested with:

  • Vagrant 2.3.4
  • VirtualBox 6.1.40

Install virtualbox guest additions plugin to enable automatic installation of virtualbox guest additions:

vagrant plugin install vagrant-vbguest

Clone repository to some folder or copy the Vagrantfile and bootstrap.sh into folder. Open terminal in same folder and run vagrant up. Vagrant will set up the environment for you.

You can ssh to virtual machine with vagrant ssh or export the ssh profile with vagrant ssh-config and save it to your ~./ssh/config and use your preferred tools to connect to VM.

Port forwarding

If using VSCode you can use integrated port forwarding. Otherwise you need to forward the ports from the VM.

Forwarded_ports.png

ipfs-kubo's People

Contributors

eersaa avatar davy320 avatar jkontiokoski 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.