Coder Social home page Coder Social logo

nirshif / pyrsia Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pyrsia/pyrsia

0.0 0.0 0.0 204 KB

Zero-Trust Decentralized Package Network

Home Page: https://pyrsia.io/

License: Apache License 2.0

Rust 99.33% Shell 0.06% Dockerfile 0.51% HCL 0.10%

pyrsia's Introduction

logo

Zero-Trust Decentralized Package Network

Current Development Phase

๐Ÿ“ข We are looking for your feedback!

This project is currently in the "sandbox" ๐Ÿ–๏ธ. We are actively exploring new concepts and tools. The code, workflows, and ideas are subject to breaking changes at any time in this early stage of development.

Primary Focus

To get off the ground the focus is strictly on the peer-to-peer distribution of Docker images backed by a blockchain of identifiers.

Contributing

Before getting started, take a moment to review our contributing guidelines.

Node and CLI

There are two components of this project

  • CLI: A basic interface which communicates with a node.
  • Node: An instance of the Pyrsia daemon which can participate in the network with other nodes.

Getting Started

For now Pyrsia only supports Docker artifacts. Follow these steps to run a Pyrsia node and use it as the registry for all Docker Hub content.

  1. Setup rust on your local machine as described in Rust's getting started guide

  2. Clone this repo git clone https://github.com/pyrsia/pyrsia.git

  3. cd pyrsia/pyrsia_node

  4. cargo run

  5. configure Docker to use Pyrsia, which is running on localhost port 7878
    open your Docker daemon settings and add this entry in the root JSON object:

    On Linux platforms:

      "registry-mirrors": ["http://localhost:7878"]
    

    By default you can find the Docker daemon settings here /etc/docker/daemon.json.

    On other platforms:

    You can find the Docker daemon settings in Docker Desktop -> Preferences -> Docker Engine.

    You cannot use localhost because that will point to the Docker Desktop VM. Instead you have to use the hostname of your host machine. If you don't know/have that, you can add this to /etc/hosts (on Mac) or c:\windows\system32\drivers\etc\hosts (on Windows):

    127.0.0.1       my-pyrsia-host
    

    And then use that name in the Docker configuration file like this:

    "registry-mirrors": ["http://my-pyrsia-host:7878"]
    
  6. using another terminal, use docker to pull an image from Pyrsia:

    docker pull ubuntu
    

    (or pull any other Docker image of your choice)

    Optionally, you can inspect the Pyrsia node logs to check where the image came from. This can be either:

    • locally (if it was cached by Pyrsia before)
    • from the Pyrsia network
    • or from Docker Hub (if it wasn't previously available in the Pyrsia network)
  7. Build the CLI tool

    cd ../pyrsia_cli
    cargo build
    cd ../target/debug
    
  8. Configure the CLI tool

    ./pyrsia config --add localhost:7878
    
  9. Ping the Pyrsia node and list the status

    ./pyrsia node -p
    Connection Successfull !! {}
    
    ./pyrsia node -s
    

Setting Up Visual Studio Code Debugger

How to Debug Rust with Visual Studio Code

Building and running the Pyrsia Node with Docker

  1. Install Docker
  2. Run docker compose up

The Pyrsia node will then be running on localhost:7878 both on the host and inside the VM, available to Docker Engine, in the case of Docker Desktop.

pyrsia's People

Contributors

mgrand avatar sbtaylor15 avatar mitalibo avatar efrisch avatar tiainen avatar erwin1 avatar johanvos avatar chris-crone avatar prince-chrismc avatar chb0github avatar betarelease avatar fishseabowl 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.