Git Product home page Git Product logo

big-dust / space-agent Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ao-space/space-agent

0.0 0.0 0.0 1.89 MB

space-agent, as the carrier of AO.space (open source version) all-in-one, mainly provides a unified entrance for AO.space server to start.

Home Page: https://ao.space

License: Apache License 2.0

Shell 0.46% JavaScript 0.61% Go 91.88% TypeScript 0.14% CSS 2.04% Makefile 0.13% HTML 0.13% Smarty 1.43% Batchfile 0.42% Vue 2.17% Dockerfile 0.20% SCSS 0.40%

space-agent's Introduction

space-agent

English | 简体中文

Introduce

space-agent, as the carrier of AO.space (open source version) all-in-one, mainly provides a unified entrance for AO.space server to start.

space-agent is responsible for binding AO.space server and client, launching AO.space microservices and unified management.

Feature

  • Device Discovery and Binding
  • Device Initialization
  • Key Exchange
  • Microservice Initiation and Management
  • Decentralized Identity (DID) generation and management
  • AO.space service upgrade and other functions

Build

We will build a docker image of AO.space (Open Source) related services and make it available for download.

If you want to try to compile and build locally yourself

you can use our [Dockerfile](. /Dockerfile) to compile and build the container image

Prepare Environment

  • docker (>=18.09)
  • git
  • golang 1.18 +

Download source code

git clone [email protected]:ao-space/space-agent.git

Build image

go into project root directory , run this command

docker build -t local/space-agent:{tag} . 

The tag parameter can be modified to be consistent with the docker-compose.yml that is running on the server as a whole.

Run

Arch

  • X86_64
  • Arm64

OS

  • Linux:
    • EulixOS/OpenEuler
    • Ubuntu
    • Others
  • Windows
  • MacOS

Docker

  • Docker Engine >= 18.09
  • Docker Desktop

Recommended Hardware Configuration

  • RAM: 4G
  • CPU: 2 cores

special hint

You can also run AO.space (open source version) on some development boards such as Raspberry Pi etc.

Getting start

After ensuring that docker is properly installed and running in your environment

To check if docker is running correctly you can use the following command:

docker version

run container

$AOSPACE_HOME_DIR is the directory where you want the data to be stored

You can replace it yourself at startup

  • Linux
DATADIR="$HOME/aospace"
sudo docker run -d --name aospace-all-in-one  \
        --restart always  \
        --network=ao-space  \
        --publish 5678:5678  \
        --publish 127.0.0.1:5680:5680  \
        -v $DATADIR:/aospace  \
        -v /var/run/docker.sock:/var/run/docker.sock:ro  \
        -e AOSPACE_DATADIR=$DATADIR \
        -e RUN_NETWORK_MODE="host"  \
        ghcr.io/ao-space/space-agent:latest

if you want to run ao.space on other os, refer to ao.space self-hosting doc

Notes

get aospace agent version

system-agent -version

Query Status

To see if the aospace agent service is working, call the following interface.

/agent/status

{
  "status": "OK",
  "version": "dev"
}

how to enable swagger doc service?

modify /opt/tmp/system-agent.yml , change debugmode: false to debugmode: trueand restart agent

restart command

docker restart aospace-all-in-one

Open the swagger interface by accessing the address http://{your-host-ip}:5678/swagger/index.html in your computer's browser, where the ip address is the LAN address of your box.

Contribution Guidelines

Contributions to this project are very welcome. Here are some guidelines and suggestions to help you get involved in the project.

Contribution Guidelines

Contact us

Thanks for your contribution

Finally, thank you for your contribution to this project. We welcome contributions in all forms, including but not limited to code contributions, issue reports, feature requests, documentation writing, etc. We believe that with your help, this project will become more perfect and stronger.

space-agent's People

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.