Skip to content

Commit

Permalink
Updated the cluster command to the new syntax with a ,
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobht committed Feb 7, 2025
1 parent e67d287 commit f102ac6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/docs/03-concepts/08-cross-dc-replication.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ The best way is to use Cadence [docker-compose](https://github.com/uber/cadence/

## Running in Production

Enable global domain feature needs to be enabled in [static config](/docs/operation-guide/setup/#static-configs).
Enable global domain feature needs to be enabled in [static config](/docs/operation-guide/setup/#static-configs).

Here we use clusterDCA and clusterDCB as an example. We pick clusterDCA as the primary(used to called "master") cluster.
The only difference of being a primary cluster is that it is responsible for domain registration. Primary can be changed later but it needs to be the same across all clusters.
Expand Down Expand Up @@ -173,13 +173,13 @@ clusterMetadata:
After the configuration is deployed:
1. Register a global domain
`cadence --do <domain_name> domain register --global_domain true --clusters clusterDCA clusterDCB --active_cluster clusterDCA`
`cadence --do <domain_name> domain register --global_domain true --clusters clusterDCA,clusterDCB --active_cluster clusterDCA`


2. Run some workflow and failover domain from one to another
`cadence --do <domain_name> domain update --active_cluster clusterDCB`

Then the domain should be failed over to clusterDCB. Now worklfows are read-only in clusterDCA. So your workers polling tasks from clusterDCA will become idle.
Then the domain should be failed over to clusterDCB. Now worklfows are read-only in clusterDCA. So your workers polling tasks from clusterDCA will become idle.

Note 1: that even though clusterDCA is standy/read-only for this domain, it can be active for another domain. So being active/standy is per domain basis not per clusters. In other words, for example if you use XDC in case of DC failure of clusterDCA, you need to failover all domains from clusterDCA to clusterDCB.

Expand Down
20 changes: 10 additions & 10 deletions src/docs/06-cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ After the installation is done, you can use CLI:
```
cadence --help
```
This will always install the latest version. Follow [this instructions](https://github.com/uber/cadence/discussions/4457) if you need to install older versions of Cadence CLI.
This will always install the latest version. Follow [this instructions](https://github.com/uber/cadence/discussions/4457) if you need to install older versions of Cadence CLI.

### Docker
The Cadence :CLI: can be used directly from the Docker Hub image *ubercadence/cli* or by building the :CLI: tool
Expand All @@ -36,9 +36,9 @@ docker run -it --rm ubercadence/cli:master --address <frontendAddress> --domain
```bash
docker run -it --rm ubercadence/cli:<version> --address <frontendAddress> --domain samples-domain domain describe
```
For example `docker run --rm ubercadence/cli:0.21.3 --domain samples-domain domain describe` will be the CLI that is released as part of the [v0.21.3 release](https://github.com/uber/cadence/releases/tag/v0.21.3).
See [docker hub page](https://hub.docker.com/r/ubercadence/cli/tags?page=1&ordering=last_updated) for all the CLI image tags.
Note that CLI versions of 0.20.0 works for all server versions of 0.12 to 0.19 as well. That's because [the CLI version doesn't change in those versions](https://stackoverflow.com/questions/68217385/what-is-clientversionnotsupportederror-and-how-to-resolve-it).
For example `docker run --rm ubercadence/cli:0.21.3 --domain samples-domain domain describe` will be the CLI that is released as part of the [v0.21.3 release](https://github.com/uber/cadence/releases/tag/v0.21.3).
See [docker hub page](https://hub.docker.com/r/ubercadence/cli/tags?page=1&ordering=last_updated) for all the CLI image tags.
Note that CLI versions of 0.20.0 works for all server versions of 0.12 to 0.19 as well. That's because [the CLI version doesn't change in those versions](https://stackoverflow.com/questions/68217385/what-is-clientversionnotsupportederror-and-how-to-resolve-it).

NOTE: On Docker versions 18.03 and later, you may get a "connection refused" error when connecting to local server. You can work around this by setting the host to "host.docker.internal" (see [here](https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds) for more info).

Expand All @@ -55,17 +55,17 @@ docker exec -it docker_cadence_1 /bin/bash
# cadence --address $(hostname -i):7933 --do samples domain register
```

### Build it yourself
### Build it yourself
To build the :CLI: tool locally, clone the [Cadence server repo](https://github.com/uber/cadence), check out the version tag (e.g. `git checkout v0.21.3`) and run
`make tools`. This produces an executable called `cadence`. With a local build, the same command to
describe a :domain: would look like this:
```bash
cadence --domain samples-domain domain describe
```

Alternatively, you can build the CLI image, see [instructions](docker/README.md#diy-building-an-image-for-any-tag-or-branch)
Alternatively, you can build the CLI image, see [instructions](docker/README.md#diy-building-an-image-for-any-tag-or-branch)

## Documentation
## Documentation
CLI are documented by `--help` or `-h` in ANY tab of all levels:

```
Expand Down Expand Up @@ -94,7 +94,7 @@ GLOBAL OPTIONS:
--help, -h show help
--version, -v print the version
```
And
And
```
$cadence workflow -h
NAME:
Expand Down Expand Up @@ -173,11 +173,11 @@ Run `cadence tasklist` for help on tasklist operations
```bash
cadence --domain samples-domain domain register
# OR using short alias
cadence --do samples-domain d re
cadence --do samples-domain d re
```
If your Cadence cluster has enable [global domain(XDC replication)](https://cadenceworkflow.io/docs/concepts/cross-dc-replication/), then you have to specify the replicaiton settings when registering a domain:
```bash
cadence --domains amples-domain domain register --active_cluster clusterNameA --clusters clusterNameA clusterNameB
cadence --domains amples-domain domain register --active_cluster clusterNameA --clusters clusterNameA,clusterNameB
```

- View "samples-domain" details:
Expand Down

0 comments on commit f102ac6

Please sign in to comment.