- Notifications
You must be signed in to change notification settings - Fork4
rchain/rsong
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A client facing REST layer to proxy RSong requests to RSongs Rholang contracts.
RSong is implemented as a combination of multiple microservices and their interactions. These microservices are:
- acq, this is the RSong Acquisition service responsible for Acquiring assets
- proxy, RSong Proxy provides RChain rnode REST layer
- microbatch, tbd
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system
git clone git@github.com:rchain/rsong.gitcd rsongsbt compile
To run the project locally:
- set the environment variables
- run the docker
Alternatively you may build and run the project from source code.
To run the project locally, configure your environment variables:
##export LOCAL_GRPC='localhost'export GCP_GRPC='dd.dd.dd.dd'export AWS_GRPC='dd.dd.dd.dd'export DOCKER_GRPC='172.17.0.2'export HTTP_PORT=9000export GRPC_SERVER=$LOCAL_GRPCexport GRPC_PORT_INTERNAL=40404export GRPC_PORT_EXTERNAL=40401export PRD_K8='http://prd-rchain.com'export DEV_K8='http://dev-rchain.com'export LOCAL_K8='http://localhost'export HOST_URL=$LOCAL_K8
You may consider usingdirenv to manage projects environment variables
Circle CI build process publishes thersong-proxy docker image to docker hub. To run the image:
sccripts/docker-run.sh
sbt clean compile run## to create a local dokcer imagesbt clean compile docker:stage docker:publishLocaldocker images | grep 'rsong-proxy'
tests are:
- unit tests
- integration tests
sbt clean test
- configure .envrc for both rsong-proxy and rsong-acquisition are configured for the same node instance
- executersong-acquisition to migrate the song data to node
- build rsong-proxy and run integration tests
cd ../rsong-acquisition## make sure rsong-acquisition & rsong-proxy are using the same nodesbt clean compile universal:packageBincd target/universal && unzip ./rsong-acquisition-1.2-SNAPSHOT && cd rsong-acquisition-1.2-SNAPSHOT./bin/rsong-acquisition
Integration tests are run by the python scriptrsong-int-tests.py.
The scripts assumesrequests is installed.
sbt clean compile run## from a different terminal:./scripts/rsong-int-tests.py localhost:9000
host='localhost:9000'## create a new user curl -X POST $host/v1/user/<user_id>## retrieve user objectcurl $host/v1/user/<user_id>## retrive a user's songcurl -v GET $host/v1/song/song1?userId=123 | jq## retrive user's songscurl -v GET $host/v1/song\?userId=user123\&perPage=10\&page=1 | jq
curlGET$host/v1/song/song1?userId=123|jq
- rnode
- rsong-proxy
rnode is build from the latestrchain dev branch deployed to GCP.This is a single instance at this time.
rsong-proxy runs onkubernetes-cluster on GCPSeedeployment-prd-spec for more detail
About
Rchain music dApp
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.