You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Wondering what's new with HarperDB 4.4? Take a look at our latest [Release Notes
13
13
14
14
## Getting Started
15
15
16
-
<tabledata-column-title-hiddendata-view="cards"><thead><tr><th></th><th></th><thdata-hidden></th><thdata-hiddendata-card-targetdata-type="content-ref"></th></tr></thead><tbody><tr><td><ahref="getting-started.md"><strong>Getting Started Guide</strong></a></td><td>Get up and running with HarperDB</td><td></td><td><ahref="getting-started.md">getting-started.md</a></td></tr><tr><td><ahref="deployments/install-harperdb/"><strong>Quick Install HarperDB</strong></a></td><td>Run HarperDB on your on hardware</td><td></td><td><ahref="deployments/install-harperdb/">install-harperdb</a></td></tr><tr><td><ahref="deployments/harperdb-cloud/"><strong>Try HarperDB Cloud</strong></a></td><td>Spin up an instance in minutes to going fast</td><td></td><td><ahref="deployments/harperdb-cloud/">harperdb-cloud</a></td></tr></tbody></table>
16
+
<tabledata-column-title-hiddendata-view="cards"><thead><tr><th></th><th></th><thdata-hidden></th><thdata-hiddendata-card-targetdata-type="content-ref"></th></tr></thead><tbody><tr><td><ahref="getting-started.md"><strong>Getting Started Guide</strong></a></td><td>Get up and running with HarperDB</td><td></td><td><ahref="getting-started.md">getting-started.md</a></td></tr><tr><td><ahref="deployments/install-harperdb/"><strong>Quick Install HarperDB</strong></a></td><td>Run HarperDB on your on hardware</td><td></td><td><ahref="deployments/install-harperdb/">install-harperdb</a></td></tr><tr><td><ahref="deployments/harperdb-cloud/"><strong>Try HarperDB Cloud</strong></a></td><td>Spin up an instance in minutes to get going fast</td><td></td><td><ahref="deployments/harperdb-cloud/">harperdb-cloud</a></td></tr></tbody></table>
Copy file name to clipboardExpand all lines: docs/deployments/configuration.md
+33-2Lines changed: 33 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -206,15 +206,21 @@ replication:
206
206
207
207
`routes` - _Type_: array;
208
208
209
-
An array of routes to connect to other nodes. Each element in the array can be either a string or an object with `hostname` and `port` properties.
209
+
An array of routes to connect to other nodes. Each element in the array can be either a string or an object with `hostname`, `port` and optionally `startTime` properties.
210
+
211
+
`startTime` - _Type_: string; ISO formatted UTC date string.
212
+
213
+
Replication will attempt to catch up on all remote data upon setup. To start replication from a specific date, set this property.
210
214
211
215
```yaml
212
216
replication:
217
+
copyTablesToCatchUp: true
213
218
hostname: server-one
214
219
routes:
215
220
- wss://server-two:9925 # URL based route
216
221
- hostname: server-three # define a hostname and port
217
222
port: 9930
223
+
startTime: 2024-02-06T15:30:00Z
218
224
```
219
225
220
226
`port` - _Type_: integer;
@@ -227,7 +233,11 @@ The port to use for secure replication connections.
When false, HarperDB will not verify certificates against the Node.js bundled CA store. The bundled CA store is a snapshot of the Mozilla CA store that is fixed at release time.
236
+
When true, HarperDB will verify certificates against the Node.js bundled CA store. The bundled CA store is a snapshot of the Mozilla CA store that is fixed at release time.
Replication will first attempt to catch up using the audit log. If unsuccessful, it will perform a full table copy. When set to `false`, replication will only use the audit log.
`harperdb sql sql='select * from dev.dog where id="1"'`
161
+
162
+
## Remote Operations
163
+
164
+
The CLI can also be used to run operations on remote HarperDB instances. To do this, pass the `target` parameter with the HTTP address of the remote instance. You generally will also need to provide credentials and specify the `username` and `password` parameters, or you can set environment variables `CLI_TARGET_USERNAME` and `CLI_TARGET_PASSWORD`, for example:
The same set of operations API are available for remote operations as well.
172
+
173
+
### Remote Component Deployment
174
+
175
+
When using remote operations, you can deploy a local component to the remote instance. If you omit the `package` parameter, you can deploy the current directory. This will package the current directory and send it to the target server (also `deploy` is allowed as an alias to `deploy_component`):
176
+
```bash
177
+
harperdb deploy target=https://server.com:9925
178
+
```
179
+
If you are interacting with a cluster, you may wish to include the `replicated=true` parameter to ensure that the deployment operation is replicated to all nodes in the cluster. You will also need to restart afterwards to apply the changes (here seen with the replicated parameter):
Copy file name to clipboardExpand all lines: docs/developers/operations-api/clustering.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ _Operation is restricted to super_user roles only_
14
14
* hostname or url _(required)_ - one of these fields is required. You must provide either the `hostname` or the `url` of the node you want to add
15
15
* verify_tls _(optional)_ - a boolean which determines if the TLS certificate should be verified. This will allow the HarperDB default self-signed certificates to be accepted. Defaults to `true`
16
16
* authorization _(optional)_ - an object or a string which contains the authorization information for the node being added. If it is an object, it should contain `username` and `password` fields. If it is a string, it should use HTTP `Authorization` style credentials
17
+
* retain_authorization _(optional)_ - a boolean which determines if the authorization credentials should be retained/stored and used everytime a connection is made to this node. If `true`, the authorization will be stored on the node record. Generally this should not be used, as mTLS/certificate based authorization is much more secure and safe, and avoids the need for storing credentials. Defaults to `false`.
17
18
* subscriptions _(optional)_ - The relationship created between nodes. If not provided a fully replicated cluster will be setup. Must be an object array and include `database`, `table`, `subscribe` and `publish`:
Copy file name to clipboardExpand all lines: docs/developers/operations-api/components.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,9 +27,9 @@ _Operation is restricted to super_user roles only_
27
27
---
28
28
## Deploy Component
29
29
30
-
Will deploy a component using either a base64-encoded string representation of a `.tar` file (the output from `package_component`) or a package value, which can be any valid NPM reference, such as a GitHub repo, an NPM package, a tarball, a local directory or a website.\
30
+
Will deploy a component using either a base64-encoded string representation of a `.tar` file (the output from `package_component`) or a package value, which can be any valid NPM reference, such as a GitHub repo, an NPM package, a tarball, a local directory or a website.
31
31
32
-
If deploying with the `payload` option, HarperDB will decrypt the base64-encoded string, reconstitute the .tar file of your project folder, and extract it to the component root project directory.\
32
+
If deploying with the `payload` option, HarperDB will decrypt the base64-encoded string, reconstitute the .tar file of your project folder, and extract it to the component root project directory.
33
33
34
34
If deploying with the `package` option, the package value will be written to `harperdb-config.yaml`. Then npm install will be utilized to install the component in the `node_modules` directory located in the hdb root. The value is a package reference, which should generally be a [URL reference, as described here](https://docs.npmjs.com/cli/v10/configuring-npm/package-json#urls-as-dependencies) (it is also possible to include NPM registerd packages and file paths). URL package references can directly reference tarballs that can be installed as a package. However, the most common and recommended usage is to install from a Git repository, which can be combined with a tag to deploy a specific version directly from versioned source control. When using tags, we highly recommend that you use the `semver` directive to ensure consistent and reliable installation by NPM. In addition to tags, you can also reference branches or commit numbers. Here is an example URL package reference to a (public) Git repository that doesn't require authentication:
35
35
```
@@ -62,8 +62,9 @@ _Operation is restricted to super_user roles only_
62
62
* project _(required)_ - the name of the project you wish to deploy
63
63
* package _(optional)_ - this can be any valid GitHub or NPM reference
64
64
* payload _(optional)_ - a base64-encoded string representation of the .tar file. Must be a string
65
-
* restart _(optional)_ - if true, HarperDB will restart after deploying the component. Must be a boolean
65
+
* restart _(optional)_ - must be either a boolean or the string `rolling`. If set to `rolling`, a rolling restart will be triggered after the component is deployed, meaning that each node in the cluster will be sequentially restarted (waiting for the last restart to start the next). If set to `true`, the restart will not be rolling, all nodes will be restarted in parallel. If `replicated` is `true`, the restart operations will be replicated across the cluster.
66
66
* replicated _(optional)_ - if true, HarperDB will replicate the component to all nodes in the cluster. Must be a boolean.
67
+
* install_command _(optional)_ - A command to use when installing the component. Must be a string. This can be used to install dependencies with pnpm or yarn, for example, like: `"install_command": "npm install -g pnpm && pnpm install"`
67
68
68
69
### Body
69
70
@@ -133,6 +134,7 @@ _Operation is restricted to super_user roles only_
133
134
* project _(required)_ - the name of the project you wish to delete or to delete from if using the `file` parameter
134
135
* file _(optional)_ - the path relative to your project folder of the file you wish to delete
135
136
* replicated _(optional)_ - if true, HarperDB will replicate the component deletion to all nodes in the cluster. Must be a boolean.
137
+
* restart _(optional)_ - if true, HarperDB will restart after dropping the component. Must be a boolean.
136
138
137
139
### Body
138
140
@@ -463,4 +465,4 @@ _Operation is restricted to super_user roles only_
Copy file name to clipboardExpand all lines: docs/developers/operations-api/utilities.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,7 @@ _Operation is restricted to super_user roles only_
29
29
30
30
* operation _(required)_ - must always be `restart_service`
31
31
* service _(required)_ - must be one of: `http_workers`, `clustering_config` or `clustering`
32
+
* replicated _(optional)_ - must be a boolean. If set to `true`, HarperDB will replicate the restart service operation across all nodes in the cluster. The restart will occur as a rolling restart, ensuring that each node is fully restarted before the next node begins restarting.
32
33
33
34
### Body
34
35
```json
@@ -52,7 +53,7 @@ Returns detailed metrics on the host system.
52
53
_Operation is restricted to super_user roles only_
53
54
54
55
* operation _(required)_ - must always be `system_information`
55
-
* attributes _(optional)_ - string array of top level attributes desired in the response, if no value is supplied all attributes will be returned. Available attributes are: ['system', 'time', 'cpu', 'memory', 'disk', 'network', 'harperdb_processes', 'table_size', 'replication']
56
+
* attributes _(optional)_ - string array of top level attributes desired in the response, if no value is supplied all attributes will be returned. Available attributes are: ['system', 'time', 'cpu', 'memory', 'disk', 'network', 'harperdb_processes', 'table_size', 'metrics', 'threads', 'replication']
56
57
57
58
### Body
58
59
```json
@@ -364,7 +365,8 @@ _Operation is restricted to super_user roles only_
Copy file name to clipboardExpand all lines: docs/developers/replication/README.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,13 @@ HarperDB supports the highest levels of security through public key infrastructu
76
76
77
77
#### Provide your own certificates
78
78
79
-
If you want to secure your HarperDB connections with your own signed certificates, you can easily do so. Whether you have certificates from a public authority (like Let's Encrypt or Digicert) or a corporate certificate authority, you can use them to authenticate nodes securely. Just make sure the certificate’s common name (CN) matches the node's hostname.
79
+
If you want to secure your HarperDB connections with your own signed certificates, you can easily do so. Whether you have certificates from a public authority (like Let's Encrypt or Digicert) or a corporate certificate authority, you can use them to authenticate nodes securely. You can then allow nodes to authorize each other by checking the certificate against the standard list of root certificate authorities by enabling the `enableRootCAs` option in the config:
80
+
```
81
+
replication
82
+
enableRootCAs: true
83
+
```
84
+
85
+
And then just make sure the certificate’s common name (CN) matches the node's hostname.
0 commit comments