-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure Analytics and update examples and documentation (#24)
# What was done - Update readme documentation - Update documentation and examples based on the latest Couchbase documentation - Add missing semi-colons to NodeJS file - Add ability to configure the Analytics service - Add ability to set the cluster name - Add ability to set Eventing service RAM
- Loading branch information
Showing
12 changed files
with
129 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"statements": [ | ||
"CREATE DATAVERSE `sample` IF NOT EXISTS;", | ||
"USE `sample`; CREATE DATASET IF NOT EXISTS users ON `sample` WHERE `type` = 'user';", | ||
"USE `sample`; CONNECT LINK Local;" | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"statements": [ | ||
"USE `sample`; CREATE INDEX `idx_users` IF NOT EXISTS ON `users` (id: string);" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
bucketName=$1 | ||
|
||
# Run Analytics Dataset scripts | ||
|
||
if [ -e "/startup/$bucketName/analytics/dataset.json" ]; then | ||
echo "Creating datasets on $bucketName..." | ||
|
||
while read statement | ||
do | ||
echo "Dataset Statement: $statement" | ||
curl -Ss -u $CB_USERNAME:$CB_PASSWORD http://localhost:8095/analytics/service --data-urlencode "statement=$statement" | ||
done < <(cat /startup/$bucketName/analytics/dataset.json | jq -r '.statements | .[]') | ||
fi | ||
|
||
# Run Analytics index scripts | ||
|
||
if [ -e "/startup/$bucketName/analytics/indexes.json" ]; then | ||
echo "Building analytics indexes on $bucketName..." | ||
|
||
while read statement | ||
do | ||
echo "Index Statement: $statement" | ||
curl -Ss -u $CB_USERNAME:$CB_PASSWORD http://localhost:8095/analytics/service --data-urlencode "statement=$statement" | ||
done < <(cat /startup/$bucketName/analytics/indexes.json | jq -r '.statements | .[]') | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters