Skip to content

Commit 2c679fc

Browse files
updated readme
ISSUE: CLDSRVCLT-1
1 parent ba0aebd commit 2c679fc

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,31 @@
11
# cloudserverclient
2-
Client for custom cloudserver routes
2+
3+
This repository contains the Smithy-based TypeScript/JavaScript client for Cloudserver's custom internal APIs. The client is generated from the .smithy model files that we defined in the /models folder.
4+
5+
If you need to work on it, install Smithy first : https://smithy.io/2.0/guides/smithy-cli/cli_installation.html
6+
7+
## Architecture
8+
9+
Each .smithy file in /models defines one api, and we have the Cloudserver service defined in service/cloudserver.smithy using these apis.
10+
The client generation is performed this way :
11+
12+
```bash
13+
# Generate TypeScript from .smithy model files, and compile TypeScript to JavaScript
14+
yarn build
15+
```
16+
17+
### Local testing
18+
19+
1. Install dependencies & build the smithy client: `yarn build`
20+
2. Start CloudServer: `S3VAULT=mem S3METADATA=mem S3DATA=mem REMOTE_MANAGEMENT_DISABLE=true yarn start`
21+
Some tests require different cloudserver setup :
22+
For example : tests/testIndexesApis.test.ts : `S3METADATA=mongodb`
23+
You may change the credentials and endpoint in `tests.testSetup.ts` to target your Artesca lab.
24+
Others (Raft apis) need Metadata to run :
25+
In cloudserver, you can start metadata-standalone from
26+
.github/docker/docker-compose.sse.yaml :
27+
`docker compose -f docker-compose.sse.yaml up metadata-standalone`. In that case, Cloudserver should be run with `S3METADATA=scality`
28+
3. Run :
29+
- All tests: `yarn test`
30+
- From a specific file `yarn test testLifecycleApis`
31+
- A specific test `yarn test testLifecycleApis -t "should test ListLifecycleCurrents"`

0 commit comments

Comments
 (0)