Skip to content

Commit 4705cdb

Browse files
imnasnainaecclaude
andauthored
Update READMEs and User Guide (#4297)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1180326 commit 4705cdb

10 files changed

Lines changed: 99 additions & 67 deletions

File tree

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ A rapid word collection tool. See the [User Guide](https://sillsdev.github.io/Th
128128
- If manually installing from the FFmpeg website, install both `ffmpeg` and `ffprobe`
129129
130130
9. [dotnet-reportgenerator](https://github.com/danielpalme/ReportGenerator)
131-
`dotnet tool update --global dotnet-reportgenerator-globaltool --version 5.0.4`
131+
`dotnet tool update --global dotnet-reportgenerator-globaltool`
132132
10. [nuget-license](https://github.com/sensslen/nuget-license) `dotnet tool update --global nuget-license`
133133
11. Tools for generating the self installer (Linux only):
134134
- [makeself](https://makeself.io/) - a tool to make self-extracting archives in Unix
@@ -156,6 +156,8 @@ A rapid word collection tool. See the [User Guide](https://sillsdev.github.io/Th
156156
157157
2. Run `npm start` from the project directory to install dependencies and start the project.
158158
159+
> Note: To install frontend dependencies separately, use `npm run i` — not `npm install` or `npm i`.
160+
159161
3. Consult our [C#](docs/style_guide/c_sharp_style_guide.md) and [TypeScript](docs/style_guide/ts_style_guide.md) style
160162
guides for best coding practices in this project.
161163
@@ -278,8 +280,8 @@ In the project directory, you can run:
278280

279281
#### `npm start`
280282

281-
> Note: To avoid browser tabs from being opened automatically every time the frontend is launched, set
282-
> [`BROWSER=none`](https://create-react-app.dev/docs/advanced-configuration/) environment variable.
283+
> Note: To avoid browser tabs from being opened automatically every time the frontend is launched, set the
284+
> `BROWSER=none` environment variable (Parcel's `--open` flag controls browser opening).
283285
284286
Installs the necessary packages and runs the app in the development mode.
285287

@@ -307,7 +309,7 @@ The build is minified and the filenames include the hashes.
307309

308310
Your app is ready to be deployed!
309311

310-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
312+
The project uses Parcel and outputs to the `dist/` folder.
311313

312314
#### `npm run build:analyze`
313315

@@ -326,7 +328,7 @@ First, you must install the Java Runtime Environment (JRE) 8 or newer as mention
326328

327329
- For Windows: Install [OpenJDK](https://www.microsoft.com/openjdk)
328330
- For Ubuntu: `sudo apt install default-jre`
329-
- For macOS: `brew install adoptopenjdk`
331+
- For macOS: `brew install --cask temurin`
330332

331333
After that, run the following script in your Python virtual environment to regenerate the frontend OpenAPI bindings in
332334
place:
@@ -355,8 +357,7 @@ npm run test-backend -- --filter FullyQualifiedName~Backend.Tests.Models.Project
355357

356358
#### `npm run test-frontend`
357359

358-
Launches the test runners in the interactive watch mode. See the section about
359-
[running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
360+
Launches the test runners in the interactive watch mode. Tests run via Jest (`scripts/jestTest.js`).
360361

361362
To run a subset of tests, pass in the name of a partial file path to filter:
362363

@@ -485,8 +486,8 @@ The dictionary files for spell-check functionality in _The Combine_ are split in
485486
sake of devices with limited bandwidth. There are scripts for generating these files in `public/dictionaries/` and
486487
`src/resources/dictionaries/`; files in this directory should _not_ be manually edited.
487488

488-
The bash script `scripts/fetch_wordlists.sh` is used to fetch dictionary files for a given language (e.g., `es`) from
489-
the [LibreOffice dictionaries](https://github.com/LibreOffice/dictionaries) and convert them to raw wordlists (e.g.,
489+
The bash script `scripts/fetch_wordlist.sh` is used to fetch dictionary files for a given language (e.g., `es`) from the
490+
[LibreOffice dictionaries](https://github.com/LibreOffice/dictionaries) and convert them to raw wordlists (e.g.,
490491
`src/resources/dictionaries/es.txt`). Execute the script with no arguments for its usage details. Any language not
491492
currently supported can be manually added as a case in this script.
492493

@@ -931,7 +932,7 @@ Combine_ is set up as five deployments:
931932
- backend
932933
- database
933934
- maintenance
934-
- otel/opentelemetry-collector
935+
- otel-opentelemetry-collector
935936

936937
Each deployment definition is used to create a _pod_ that runs the docker image.
937938

@@ -944,7 +945,7 @@ database 1/1 1 1 3h41m
944945
maintenance 1/1 1 1 3h41m
945946
backend 1/1 1 1 3h41m
946947
frontend 1/1 1 1 3h41m
947-
otel/opentelemetry-collector 1/1 1 1 3h46m
948+
otel-opentelemetry-collector 1/1 1 1 3h46m
948949
```
949950

950951
Similarly, you can view the state of the pods:
@@ -957,7 +958,7 @@ install-fonts-fvrb4 0/1 Completed 0
957958
maintenance-85644b9c76-55pz8 1/1 Running 0 130m
958959
backend-69b77c46c5-8dqlv 1/1 Running 0 130m
959960
frontend-c94c5747c-pz6cc 1/1 Running 0 60m
960-
otel/opentelemetry-collector-5cd6b9c867-6j5zb 1/1 Running 0 4h03m
961+
otel-opentelemetry-collector-5cd6b9c867-6j5zb 1/1 Running 0 4h03m
961962
```
962963

963964
Use the `logs` command to view the log file of a pod; you can specify the pod name listed in the output of the

docs/deploy/README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,18 @@ The host tools required to install _The Combine_ on a QA or Production server ar
7777
[Install Kubernetes Tools](https://github.com/sillsdev/TheCombine#install-kubernetes-tools) in the project README.md
7878
file.
7979

80+
The table below summarizes the key differences between the QA and Production deployments.
81+
82+
| Aspect | QA | Production |
83+
| ------------------------- | ------------------------------------- | -------------------------------------------------------- |
84+
| Kubernetes cluster | `LTOPS_K8S_STAGING_CONTEXT` | `LTOPS_K8S_PRODUCTION_CONTEXT` |
85+
| Server name | `qa-kube.thecombine.app` | `thecombine.app` |
86+
| Image registry | Private ECR, with IAM refresh CronJob | Public ECR (`public.ecr.aws/thecombine`), no pull secret |
87+
| `aws-login` subchart | Enabled | Disabled |
88+
| `cert-proxy-server` chart | Not deployed | Deployed in `combine-cert-proxy` namespace |
89+
| Backup CronJob | Not scheduled | Daily |
90+
| Font-update CronJob | Not scheduled | Weekly |
91+
8092
#### Steps to Install on a QA/Production Server
8193

8294
To install _The Combine_ on one of these systems, follow the steps in
@@ -250,7 +262,7 @@ The `setup_target.py` script will do the following:
250262
- Copy your SSH public key to the NUC
251263

252264
Note that if an SSH key exists, you will have the option to overwrite it or skip the key generation. When your SSH key
253-
is copied to the NUC, it will copy the default key, `${HOME}/.ssh/id_rsa.pub`.
265+
is copied to the NUC, `ssh-copy-id` is used to copy the default SSH public key.
254266

255267
## Install Kubernetes Engine on Target
256268

@@ -409,10 +421,9 @@ Notes:
409421
- When the `./setup_combine.py` script is used to install _The Combine_ on a NUC, it will install the fonts required for
410422
Arabic, English, French, Portuguese, and Spanish. If additional fonts will be required, call the `setup_combine.py`
411423
commands with the `--langs` option. Use the `--help` option to see the argument syntax.
412-
- The database image contains a script that will initialize the `SemanticDomains` and the `SemanticDomainTree`
413-
collections on _first use_ of the database. The script will not be run automatically when the database is restarted or
414-
updated. If the Semantic Domain data are updated, for example, adding a new language, then the script needs to be
415-
rerun manually:
424+
- The database pod has a `postStart` lifecycle hook that runs `update-semantic-domains.sh` automatically on every pod
425+
start, but only imports data if the `SemanticDomainTree` or `SemanticDomains` collections are empty. If the Semantic
426+
Domain data are updated, for example, adding a new language, then the script needs to be rerun manually:
416427

417428
```console
418429
kubectl -n thecombine exec deployment/database -- /opt/thecombine/update-semantic-domains.sh
@@ -461,19 +472,19 @@ Notes:
461472

462473
### Checking Certificate Expiration
463474

464-
The `check_cert.py` will print the expiration timestamp for _The Combine's_ TLS certificate.
475+
The `check_certs.py` will print the expiration timestamp for _The Combine's_ TLS certificate.
465476

466477
If using the Docker image, [open the Docker image terminal](#open-docker-image-terminal) and run:
467478

468479
```console
469-
python3 ~/scripts/check_cert.py -n thecombine
480+
python3 ~/scripts/check_certs.py -n thecombine
470481
```
471482

472483
If using local tools, open a terminal window and run:
473484

474485
```console
475486
cd <COMBINE>/deploy/scripts
476-
./check_cert.py -n thecombine
487+
./check_certs.py -n thecombine
477488
```
478489

479490
The `-n thecombine` option may be omitted if the default namespace for the kubeconfig file has been set to `thecombine`

docs/deploy/kubernetes_design/README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ repository.
4646

4747
#### Additional Backend Resources
4848

49-
| Resource | Kind | Description |
50-
| ------------------ | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
51-
| env-backend | ConfigMap | `env-backend` defines the runtime configuration for backend services. |
52-
| env-backend-secret | Secret | `env-backend-secret` defines the sensitive runtime configuration items for the backend services |
53-
| backend-data | PersistentVolumeClaim | `backend-data` defines the persistent storage requirements for the backend services. The persistent storage is used for the backend files stored in `/home/app/.CombineFiles` |
49+
| Resource | Kind | Description |
50+
| ------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
51+
| env-backend | ConfigMap | `env-backend` defines the runtime configuration for backend services. |
52+
| env-backend-secrets | Secret | `env-backend-secrets` defines the sensitive runtime configuration items for the backend services |
53+
| backend-data | PersistentVolumeClaim | `backend-data` defines the persistent storage requirements for the backend services. The persistent storage is used for the backend files stored in `/home/app/.CombineFiles` |
5454

5555
### Database Deployment
5656

@@ -81,8 +81,8 @@ backup/restore _The Combine_ data, remove projects, add a user to a project, and
8181
#### `combine_maint` Image
8282

8383
The `combine_maint` container image is stored in AWS ECR. It provides a number of utility and administrative functions
84-
and is used in multiple scenarios. `combine_maint` is built off of `sillsdev/aws-kubectl` and has the following
85-
features:
84+
and is used in multiple scenarios. `combine_maint` is built off of `public.ecr.aws/thecombine/aws-kubectl` and has the
85+
following features:
8686

8787
- _aws-cli ver. 2_ - version 2 of the AWS Command Line Interface (from `sillsdev/aws-kubectl`)
8888
- _kubectl_ - a command line tool used by maintenance scripts to manage Kubernetes resources (from
@@ -100,6 +100,8 @@ features:
100100
- `update_cert.py` - a script to be used by the cert proxy clients on the NUCs. `update_cert.py` will update a TLS
101101
certificate if the NUC is connected to the internet and if the certificate is ready for renewal. If these conditions
102102
are met, it will update the certificate from AWS S3 storage.
103+
- `get_fonts.py` - generates font support data for SIL fonts used in the language picker. Runs weekly via the
104+
`update-fonts` CronJob.
103105

104106
### Daily Backup CronJob
105107

@@ -157,7 +159,7 @@ server. To solve this problem, there are two additional functions that are added
157159
will generate the TLS Secrets for each of the configured NUCs and then push the secrets to an AWS S3 bucket where they
158160
can be retrieved by the NUCs
159161
- _Cert Proxy Client_ runs on each NUC in the `thecombine` namespace. Like the _AWS Login_, there is a one-time job,
160-
`update-cert-oneshot`, and a cron job, `update-cert-cron` that keep the TLS secret up to date when the NUC has
162+
`update-cert-oneshot`, and a cron job, `update-cert-cronjob` that keep the TLS secret up to date when the NUC has
161163
internet access.
162164

163165
### Cert Proxy Server
@@ -194,13 +196,13 @@ The design of the _Cert Proxy Client_ is shown in the following diagram:
194196

195197
The _Cert Proxy Client_ uses the following resources to update the NUCs SSL Certificate from AWS S3 storage:
196198

197-
| Resource | Kind | Description |
198-
| ----------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
199-
| update-cert-oneshot | Job | A one-time job to create/update the TLS secret when the Cluster is created or updated. The job uses the `combine_maint` image and runs the `update_cert.py` script. (see the [combine_maint Image](#combine_maint-image) section) |
200-
| update-cert-cron | CronJob | Performs the same task as `update-cert-oneshot` on a regular schedule. |
201-
| env-cert-proxy | ConfigMap | `env-cert-proxy` defines the configuration environment variables for the `update-cert-oneshot` and `update-cert-cron`. They include the location of the AWS S3 bucket where the certificates are stored as well as details about the certificate to be checked. |
202-
| aws-s3-credentials | Secret | `aws-s3-credentials` defines the access accounts and credentials to access the configures AWS S3 resources. |
203-
| nuc1-thecombine-app-tls | Secret | `nuc1-thecombine-app-tls` is a `kubernetes.io/tls` secret that is created by `update-cert-oneshot` and `update-cert-cron` from the data stored in the AWS S3 bucket. |
199+
| Resource | Kind | Description |
200+
| ----------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
201+
| update-cert-oneshot | Job | A one-time job to create/update the TLS secret when the Cluster is created or updated. The job uses the `combine_maint` image and runs the `update_cert.py` script. (see the [combine_maint Image](#combine_maint-image) section) |
202+
| update-cert-cronjob | CronJob | Performs the same task as `update-cert-oneshot` on a regular schedule. |
203+
| env-cert-proxy | ConfigMap | `env-cert-proxy` defines the configuration environment variables for the `update-cert-oneshot` and `update-cert-cronjob`. They include the location of the AWS S3 bucket where the certificates are stored as well as details about the certificate to be checked. |
204+
| aws-s3-credentials | Secret | `aws-s3-credentials` defines the access accounts and credentials to access the configures AWS S3 resources. |
205+
| nuc1-thecombine-app-tls | Secret | `nuc1-thecombine-app-tls` is a `kubernetes.io/tls` secret that is created by `update-cert-oneshot` and `update-cert-cronjob` from the data stored in the AWS S3 bucket. |
204206

205207
## Service Accounts
206208

@@ -212,18 +214,16 @@ listed here use the default service account for the namespace where they run.
212214
The `account-ecr-login` account is used by the `ecr-cred-helper` and `ecr-cred-helper-cron` resources. The
213215
`account-ecr-login` has the following access to Kubernetes resources:
214216

215-
| Resources | Abilities |
216-
| ------------------------------------- | ----------------------------------------------- |
217-
| pods, pods/attach | list, get, watch, create, update, patch |
218-
| secrets, jobs, cronjobs, namespaces\* | list, get, watch, create, update, patch, delete |
219-
| serviceaccounts | list, get, update, patch |
220-
221-
[*] - abilities to access `namespaces` are not allowed on the Production server.
217+
| Resources | Abilities |
218+
| ----------------------- | ----------------------------------------------- |
219+
| pods, pods/attach | list, get, watch, create, update, patch |
220+
| secrets, jobs, cronjobs | list, get, watch, create, update, patch, delete |
221+
| serviceaccounts | list, get, update, patch |
222222

223223
### Service Account: `account-maintenance`
224224

225225
The `account-maintenance` account is used by the `maintenance`, `daily-backup`, `update-cert-oneshot`,
226-
`update-cert-cron` resources. The `account-maintenance` has the following access to Kubernetes resources:
226+
`update-cert-cronjob` resources. The `account-maintenance` has the following access to Kubernetes resources:
227227

228228
| Resource | Permissions |
229229
| --------------- | ----------------------------------------------- |

0 commit comments

Comments
 (0)