Skip to content

Commit 6b798e7

Browse files
author
Erich Smith
authored
Merge pull request #80 from JupiterOne/22-support-config-filepath
Support config filepath
2 parents adf58c5 + 65a0685 commit 6b798e7

File tree

5 files changed

+50
-8
lines changed

5 files changed

+50
-8
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
#### 🚀 Enhancement
44

5-
- Add 'jupiterone' storage engine [#79](https://github.com/JupiterOne/starbase/pull/79) ([@erichs](https://github.com/erichs))
5+
- Add 'jupiterone' storage engine
6+
[#79](https://github.com/JupiterOne/starbase/pull/79)
7+
([@erichs](https://github.com/erichs))
68

79
#### Authors: 1
810

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Starbase offers three key advantages:
3535
## Available Integrations / Connectors
3636

3737
Starbase supports
38-
[70+](https://github.com/jupiterone?q=graph-&type=all&language=&sort=) open
39-
source graph integrations!
38+
[115+](https://github.com/orgs/JupiterOne/repositories?q=graph-++in%3Aname&type=public&language=&sort=)
39+
open source graph integrations!
4040

4141
Here are some highlights:
4242

@@ -193,7 +193,8 @@ Usage: yarn starbase [options] [command]
193193
Starbase graph ingestion orchestrator
194194

195195
Options:
196-
-h, --help display help for command
196+
-c, --config <path> optional path to config file (default: "config.yaml")
197+
-h, --help display help for command
197198

198199
Commands:
199200
run collect and upload entities and relationships
@@ -206,8 +207,8 @@ Commands:
206207
2. Run `yarn starbase run` to collect data for each listed integration and then
207208
push collected data to the storage endpoint listed in `config.yaml`.
208209
209-
For additional information on using Neo4j as a storage endpoint, please see the
210-
[README.md](docker/README.md) provided.
210+
For additional information on using Neo4j or JupiterOne as a storage endpoint,
211+
please see the [README.md](docker/README.md) provided.
211212
212213
### Running Starbase - Docker
213214

docker/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,36 @@ for Windows and Mac includes Docker Composer. Linux users will need to install
3333
[Docker Engine](https://docs.docker.com/engine/install/) and
3434
[Docker Composer](https://docs.docker.com/compose/install/) manually until
3535
Docker Desktop for Linux is available.
36+
37+
# JupiterOne as a Storage Endpoint
38+
39+
In addition to a local Neo4J storage endpoint, Starbase supports a remote
40+
JupiterOne storage endpoint, allowing you to run your integrations locally (or
41+
on-premise) and persist your integration data directly to a configured
42+
JupiterOne account.
43+
44+
You may specify multiple storage endpoints in the `storage` list, for example if
45+
you also wanted to persist data to a local Neo4J storage endpoint.
46+
47+
## Configuring the JupiterOne Storage Endpoint
48+
49+
Add a configuration stanza like the following to your `config.yaml`:
50+
51+
```
52+
storage:
53+
-
54+
engine: jupiterone
55+
config:
56+
apiKey: your-unique-api-key (may be either user or account key, needs graph write permission)
57+
accountId: your-j1-account-id
58+
```
59+
60+
NOTE: if the canonical API URL for your account/region is not
61+
`https://api.us.jupiterone.io`, you will need to specify an additional storage
62+
configuration parameter, `apiBaseUrl`, with the HTTPS URL appropriate for the
63+
token and account you've provided.
64+
65+
See [JupiterOne API](https://community.askj1.com/kb/articles/794-jupiterone-api)
66+
and
67+
[Creating User and Account API Keys](https://community.askj1.com/kb/articles/785-creating-user-and-account-api-keys)
68+
docs for additional details.

src/cli/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ export function createStarbaseCli() {
77
return createCommand()
88
.name('yarn starbase')
99
.description('Starbase graph ingestion orchestrator')
10+
.option(
11+
'-c, --config <path>',
12+
'optional path to config file',
13+
'config.yaml',
14+
)
1015
.addCommand(run())
1116
.addCommand(setup())
1217
.addCommand(wipe())

src/cli/run.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ function onSkipIntegrationExecution({
2828
export function run() {
2929
return createCommand('run')
3030
.description('collect and upload entities and relationships')
31-
.action(async () => {
32-
await executeStarbase(await parseConfigYaml('config.yaml'), {
31+
.action(async (cmd) => {
32+
const config = cmd.parent.config;
33+
await executeStarbase(await parseConfigYaml(config), {
3334
onSkipIntegrationExecution,
3435
});
3536
});

0 commit comments

Comments
 (0)