StreamMachine Archiver
This is an experiment that may eventually become part of StreamMachine's core functionality.
Archiver connects to StreamMachine master as a slave, but instead of serving data up to clients it writes HLS segments to disk or S3.
So far, waveform data is kept in memory and is regenerated on restart.
While running, StreamMachine Archiver can be found at http://localhost:9000(1).
Requirements
- Node.js(2)
- libgroove(3)
- Docker(4)
Running
Locally
Installing
npm install
Starting
npm start -- --config config/dev.json
Debug Mode
npm run start:debug -- --config config/dev.json
With Docker
Building
docker build -t sm-archiver .
Installing
npm run docker -- npm install
Starting
npm run docker:start -- -- --config config/dev.json
Debug Mode
npm run docker:start:debug -- -- --config config/dev.json
Notes
- Unless running with Docker via boot2docker or docker-machine, in which case localhost should be replaced with the Docker VM's IP.
- Not required if running with Docker.
- Not required if running with Docker.
- Not required if running locally.
Google Cloud Stackdriver tools
Required config.json parameters:
{
...
"gCloudProjectId": "project_id",
"gCloudKeyFilename": "./config/credentials.json"
}
See also https://github.com/GoogleCloudPlatform/cloud-trace-nodejs#running-elsewhere