Comments (5)
Good question. Some of this has changed after we added multi-instance support, and I don't think we've updated all the documents here, but you're also the first external company to fork the code and dig in, so thank you for that!
I've started to document the REST API that CommitStream has in a branch under my own ID. It should help with understanding the model more thoroughly: https://github.com/JogoShugh/CommitStream.Web/blob/API_docs/doc/api.md
Also, we have some test library code that drives the API in a very clean way, utilizing the HAL responses to make it easy. Here's an example of a script that creates a new instance, then creates a digest, then multiple inboxes, and then populates each inbox with X number of commits: https://github.com/openAgile/CommitStream.Web/blob/develop/src/app/smoke-test/es6/create-demo-data.js#L44-L73 I think by default it will run against the localhost:6565 instance.
Example in Git-Bash
Here's how I normally get everything off the ground locally. My way is a little verbose and the grunt dev
approach documented in the repo also works, but I'm not as familiar with it. This way has worked well for a while for me to do local testing.
Using different windows makes it easy to kill CommitStream with Ctrl+C
without killing EventStore.
Step 1: Start EventStore with . ./es.sh
in a new Git-Bash Window
Assuming you have EventStore installed in the standard location, we have a script that can start it by itself in in-memory mode.
cd src/app
. ./es.sh
Expected result
EventStore should boot up and sit there patiently:
Step 2: Start CommitStream in a new Git-Bash Window
Next, start CommitStream in a new window with these commands:
cd src/app
. ./smoke-test.vars.sh
npm start
The `smoke-test.vars.sh just sets some environment variables to default values needed for local development.
Expected result
CommitStream should boot and create the projections inside of EventStore:
Step 3: Run the create-demo-data.js
script in a new Git-Bash Window
Finally, I run the create-demo-data.js
script in a new window.
Expected result
It creates data and reports the instanceId
and apiKey
. Unforuntately, it's not reporting the digestId, but that could be tweaked into the script easily.
The script has some options you can specify with command line switches:
$ node create-demo-data.js --help
Usage: create-demo-data [options]
Options:
-h, --help output usage information
-V, --version output the version number
-u, --url [url] The base URL for the CommitStream Service API, default: http://localhost:6565/api
-i, --instances [number] Number of instances to create, default: 1
-r, --repos [number] Number of repos creation iterations to run (creates one repo per family type during each iteration), default 1
-m, --mentions [number] Number of times to post a commit with each mention (one story, 5 tasks
, 5 tests in each group of workitems), default 1
-d, --debug Show results of each commit, not just summary information
-j, --json Log only the JSON output with all the query URLs needed for the performance client
If you're interested in getting that running locally, I'd be happy to help.
For your specific question
It's the API key for the "instance" of CommitStream that you want to read from. The above API doc explains how
For example, here I am looking at where that gets loaded in one of our test instances:
This instance has admin / admin for creds:
https://www9.v1host.com/DanielDemo/TeamRoom.mvc/Show/1170
When loading that page, and inspecting the network tab, you will see that the Web Panel that gets loaded in the CommitStream tab has a URL with three relevant parameters:
- instanceId : The CommitStream internal ID that associates a specific VersionOne instance to a specific CommitStream instance
- digestId : An ID that associates a grouping up one or more repositories (we call them "inboxes" in the code) that is specific to a given
instanceId
- apiKey : The unique value that grants access to a given
instanceId
.- Note: Currently there is just one apiKey, and its both read/write. We've thought about supporting a separate read-only key, but haven't had anyone ask about that, so it hasn't been a priority.
So, if you open this URL directly, you'll see a full-screen view of what otherwise would be confined to the TeamRoom Web Panel:
from commitstream.web.
Also, we're in the Gitter chat here if you have other ideas or questions that come up: https://gitter.im/openAgile/CommitStream.Web
from commitstream.web.
Hi Josh,
Thank you for the quick response and the detailed instructions. I realized the documentation was kind of outdated when the install powershell scripts kept giving errors and I had to debug them. Grunt dev works for me although i haven't used it. Eventstore also up and running with nssm.exe ensuring that it start automatically.
I am stuck on finding create-demo-data.js1
script that you speak of. I searched the repo and cannot find it. Where can I get that script?
We are using CommitStream at CB now and everyone likes it a lot. We wanted to see if there was a possibility to make CommitStream link to the AT-# numbers directly from the messages with the AT-#. So the AT-# in the commit message in CommitStream will be href-links to the AT-# assets.
from commitstream.web.
The location for that script is:
https://github.com/openAgile/CommitStream.Web/blob/develop/src/app/smoke-test/create-demo-data.js
Note, however, that this is the generated script that results from grunt dev
or grunt babel
. The original source is in ES2015 syntax so that it can take advantage of all that good stuff, including async / await ->
I'll look at the HREF idea and comment in Gitter, then update here when I know more.
from commitstream.web.
apiKey can be sent as a fake bearer token now as Authorization: Bearer
from commitstream.web.
Related Issues (12)
- Use res.json instead of stringify
- Azure internally uses http even when initial request is HTTPS
- Test HOT 1
- Discovery: Support TFS TFVC tfvc.checkin payload HOT 2
- When no stream for asset found return clean response not crash
- Update partition-commits-for-instance-by-versionone-workitem
- testing...
- If the query for the commits fails, the error is silently swallowed and nothing is presented to the user.
- 10/10 Notes HOT 3
- Handle eventStore connection refused (not running?) with clear error message
- Remove Repository HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from commitstream.web.