Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC-428][doc] Fix Linux yugabyted examples #26104

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ This function is helpful while implementing [Row-level geo-partitioning](../../.
```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP1>/yugabyte-data \
--listen=<IP1> \
--advertise_address=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-west-1,placement_zone=us-west-1c" \
--tserver_flags "placement_cloud=aws,placement_region=us-west-1,placement_zone=us-west-1c"

./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP2>/yugabyte-data \
--listen=<IP2> \
--advertise_address=<IP2> \
--join=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-2,placement_zone=us-east-2c" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-2,placement_zone=us-east-2c"

./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP3>/yugabyte-data \
--listen=<IP3> \
--advertise_address=<IP3> \
--join=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@ Do the following to create a 3-node multi-region cluster and a geo-partitioned t
```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP1>/yugabyte-data \
--listen=<IP1> \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are making changes to replace --listen to --advertise_address. We should also go ahead and replace this

--master_flags "placement_cloud=aws,placement_region=us-east-2,placement_zone=us-east-2c" \
      --tserver_flags "placement_cloud=aws,placement_region=us-east-2,placement_zone=us-east-2c"

with


 ./bin/yugabyted start                           \
      --base_dir=/home/yugabyte/<IP2>/yugabyte-data \
      --advertise_address=<IP2>                     \
      --cloud_location=aws.us-east-2.us-east-2c     \
      --join=<IP1>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sudhanshu456 can you make these changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, will do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the changes please take a look!

--advertise_address=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-west-1,placement_zone=us-west-1c" \
--tserver_flags "placement_cloud=aws,placement_region=us-west-1,placement_zone=us-west-1c"

./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP2>/yugabyte-data \
--listen=<IP2> \
--advertise_address=<IP2> \
--join=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-2,placement_zone=us-east-2c" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-2,placement_zone=us-east-2c"

./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP3>/yugabyte-data \
--listen=<IP3> \
--advertise_address=<IP3> \
--join=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a"
Expand Down
2 changes: 1 addition & 1 deletion docs/content/preview/develop/gitdev/codespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ RUN echo "CREATE DATABASE todo;" > $STORE/init-db.sql \
&& echo "CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";" >> $STORE/init-db.sql

RUN echo "/usr/local/yugabyte/bin/post_install.sh 2>&1" >> ~/.bashrc
RUN echo "yugabyted start --base_dir=$STORE/ybd1 --listen=$LISTEN" >> ~/.bashrc
RUN echo "yugabyted start --base_dir=$STORE/ybd1 --advertise_address=$LISTEN" >> ~/.bashrc
RUN echo "[[ ! -f $STORE/.init-db.sql.completed ]] && " \
"{ for i in {1..10}; do (nc -vz $LISTEN $PORT >/dev/null 2>&1); [[ \$? -eq 0 ]] && " \
"{ ysqlsh -f $STORE/init-db.sql; touch $STORE/.init-db.sql.completed; break; } || sleep \$i; done }" >> ~/.bashrc
Expand Down
2 changes: 1 addition & 1 deletion docs/content/preview/develop/gitdev/gitpod.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ tasks:
- name: db-run
before: /usr/local/yugabyte/bin/post_install.sh
init: |
yugabyted start --base_dir=$STORE/ybd1 --listen=$LISTEN && \
yugabyted start --base_dir=$STORE/ybd1 --advertise_address=$LISTEN && \
[[ ! -f $STORE/.init-db.sql.completed ]] && { for i in {1..10}; do (nc -vz $LISTEN $PORT >/dev/null 2>&1); [[ $? -eq 0 ]] && { ysqlsh -f $STORE/init-db.sql; touch $STORE/.init-db.sql.completed; break; } || sleep $i; done } && \
[[ ! -f $STORE/.init-db.sql.completed ]] && echo 'YugabyteDB is not running!'
- name: app-run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ To create a local cluster with the preceding configuration, use the following yu
```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP1>/yugabyte-data \
--listen=<IP1> \
--advertise_address=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a"
```

```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP2>/yugabyte-data \
--listen=<IP2> \
--advertise_address=<IP2> \
--join=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1b" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1b"
Expand All @@ -20,7 +20,7 @@ To create a local cluster with the preceding configuration, use the following yu
```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP3>/yugabyte-data \
--listen=<IP3> \
--advertise_address=<IP3> \
--join=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1c" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1c"
Expand All @@ -29,31 +29,31 @@ To create a local cluster with the preceding configuration, use the following yu
```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP4>/yugabyte-data \
--listen=<IP4> \
--advertise_address=<IP4> \
--join=<IP1> \
--tserver_flags "placement_cloud=aws,placement_region=ap-south-1,placement_zone=ap-south-1a"
```

```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP5>/yugabyte-data \
--listen=<IP5> \
--advertise_address=<IP5> \
--join=<IP1> \
--tserver_flags "placement_cloud=aws,placement_region=eu-west-2,placement_zone=eu-west-2c"
```

```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP6>/yugabyte-data \
--listen=<IP6> \
--advertise_address=<IP6> \
--join=<IP1> \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a"
```

```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP7>/yugabyte-data \
--listen=<IP7> \
--advertise_address=<IP7> \
--join=<IP1> \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a"
```
Expand Down
6 changes: 3 additions & 3 deletions docs/content/preview/explore/going-beyond-sql/tablespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,19 +232,19 @@ The example below expects the following servers to be added to the cluster:
```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP8>/yugabyte-data \
--listen=<IP8> \
--advertise_address=<IP8> \
--join=<IP1> \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1b"

./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP9>/yugabyte-data \
--listen=<IP9> \
--advertise_address=<IP9> \
--join=<IP1> \
--tserver_flags "placement_cloud=aws,placement_region=us-east-2,placement_zone=us-east-2a"

./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP10>/yugabyte-data \
--listen=<IP10> \
--advertise_address=<IP10> \
--join=<IP1> \
--tserver_flags "placement_cloud=aws,placement_region=us-west-1,placement_zone=us-west-1a"
```
Expand Down
2 changes: 1 addition & 1 deletion docs/content/preview/integrations/cdc/debezium.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Use the following steps to run change data capture (CDC) with Debezium on a loca
1. Start a cluster using yugabyted. Note that you need to run yugabyted with the IP of your machine; otherwise, it would consider localhost (which would be mapped to the docker host instead of your machine).

```sh
./bin/yugabyted start --listen $IP
./bin/yugabyted start --advertise_address $IP
```

1. Connect using ysqlsh and create a table:
Expand Down
4 changes: 3 additions & 1 deletion docs/content/preview/tutorials/quick-start/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,11 @@ Use the [yugabyted](../../../reference/configuration/yugabyted/) utility to crea
To create a single-node local cluster with a replication factor (RF) of 1, run the following command:

```sh
./bin/yugabyted start
./bin/yugabyted start --advertise_address 127.0.0.1
```

Note: By default, yugabyted on Linux-based machines binds to the internal IP address. If it fails to do so, set the --advertise_address flag.

{{< readfile "/preview/tutorials/quick-start/include-connect.md" >}}

## Build an application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ This function is helpful while implementing [Row-level geo-partitioning](../../.
```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP1>/yugabyte-data \
--listen=<IP1> \
--advertise_address=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-west-1,placement_zone=us-west-1c" \
--tserver_flags "placement_cloud=aws,placement_region=us-west-1,placement_zone=us-west-1c"

./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP2>/yugabyte-data \
--listen=<IP2> \
--advertise_address=<IP2> \
--join=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-2,placement_zone=us-east-2c" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-2,placement_zone=us-east-2c"

./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP3>/yugabyte-data \
--listen=<IP3> \
--advertise_address=<IP3> \
--join=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@ Do the following to create a 3-node multi-region cluster and a geo-partitioned t
```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP1>/yugabyte-data \
--listen=<IP1> \
--advertise_address=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-west-1,placement_zone=us-west-1c" \
--tserver_flags "placement_cloud=aws,placement_region=us-west-1,placement_zone=us-west-1c"

./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP2>/yugabyte-data \
--listen=<IP2> \
--advertise_address=<IP2> \
--join=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-2,placement_zone=us-east-2c" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-2,placement_zone=us-east-2c"

./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP3>/yugabyte-data \
--listen=<IP3> \
--advertise_address=<IP3> \
--join=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a"
Expand Down
2 changes: 1 addition & 1 deletion docs/content/stable/develop/gitdev/codespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ RUN echo "CREATE DATABASE todo;" > $STORE/init-db.sql \
&& echo "CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";" >> $STORE/init-db.sql

RUN echo "/usr/local/yugabyte/bin/post_install.sh 2>&1" >> ~/.bashrc
RUN echo "yugabyted start --base_dir=$STORE/ybd1 --listen=$LISTEN" >> ~/.bashrc
RUN echo "yugabyted start --base_dir=$STORE/ybd1 --advertise_address=$LISTEN" >> ~/.bashrc
RUN echo "[[ ! -f $STORE/.init-db.sql.completed ]] && " \
"{ for i in {1..10}; do (nc -vz $LISTEN $PORT >/dev/null 2>&1); [[ \$? -eq 0 ]] && " \
"{ ysqlsh -f $STORE/init-db.sql; touch $STORE/.init-db.sql.completed; break; } || sleep \$i; done }" >> ~/.bashrc
Expand Down
2 changes: 1 addition & 1 deletion docs/content/stable/develop/gitdev/gitpod.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ tasks:
- name: db-run
before: /usr/local/yugabyte/bin/post_install.sh
init: |
yugabyted start --base_dir=$STORE/ybd1 --listen=$LISTEN && \
yugabyted start --base_dir=$STORE/ybd1 --advertise_address=$LISTEN && \
[[ ! -f $STORE/.init-db.sql.completed ]] && { for i in {1..10}; do (nc -vz $LISTEN $PORT >/dev/null 2>&1); [[ $? -eq 0 ]] && { ysqlsh -f $STORE/init-db.sql; touch $STORE/.init-db.sql.completed; break; } || sleep $i; done } && \
[[ ! -f $STORE/.init-db.sql.completed ]] && echo 'YugabyteDB is not running!'
- name: app-run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ To create a local cluster with the preceding configuration, use the following yu
```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP1>/yugabyte-data \
--listen=<IP1> \
--advertise_address=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a"
```

```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP2>/yugabyte-data \
--listen=<IP2> \
--advertise_address=<IP2> \
--join=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1b" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1b"
Expand All @@ -20,7 +20,7 @@ To create a local cluster with the preceding configuration, use the following yu
```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP3>/yugabyte-data \
--listen=<IP3> \
--advertise_address=<IP3> \
--join=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1c" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1c"
Expand All @@ -29,31 +29,31 @@ To create a local cluster with the preceding configuration, use the following yu
```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP4>/yugabyte-data \
--listen=<IP4> \
--advertise_address=<IP4> \
--join=<IP1> \
--tserver_flags "placement_cloud=aws,placement_region=ap-south-1,placement_zone=ap-south-1a"
```

```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP5>/yugabyte-data \
--listen=<IP5> \
--advertise_address=<IP5> \
--join=<IP1> \
--tserver_flags "placement_cloud=aws,placement_region=eu-west-2,placement_zone=eu-west-2c"
```

```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP6>/yugabyte-data \
--listen=<IP6> \
--advertise_address=<IP6> \
--join=<IP1> \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a"
```

```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP7>/yugabyte-data \
--listen=<IP7> \
--advertise_address=<IP7> \
--join=<IP1> \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a"
```
Expand Down
6 changes: 3 additions & 3 deletions docs/content/stable/explore/going-beyond-sql/tablespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,19 +232,19 @@ The example below expects the following servers to be added to the cluster:
```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP8>/yugabyte-data \
--listen=<IP8> \
--advertise_address=<IP8> \
--join=<IP1> \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1b"

./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP9>/yugabyte-data \
--listen=<IP9> \
--advertise_address=<IP9> \
--join=<IP1> \
--tserver_flags "placement_cloud=aws,placement_region=us-east-2,placement_zone=us-east-2a"

./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP10>/yugabyte-data \
--listen=<IP10> \
--advertise_address=<IP10> \
--join=<IP1> \
--tserver_flags "placement_cloud=aws,placement_region=us-west-1,placement_zone=us-west-1a"
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ This function is helpful while implementing [Row-level geo-partitioning](../../.
```sh
./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP1>/yugabyte-data \
--listen=<IP1> \
--advertise_address=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-west-1,placement_zone=us-west-1c" \
--tserver_flags "placement_cloud=aws,placement_region=us-west-1,placement_zone=us-west-1c"

./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP2>/yugabyte-data \
--listen=<IP2> \
--advertise_address=<IP2> \
--join=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-2,placement_zone=us-east-2c" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-2,placement_zone=us-east-2c"

./bin/yugabyted start \
--base_dir=/home/yugabyte/<IP3>/yugabyte-data \
--listen=<IP3> \
--advertise_address=<IP3> \
--join=<IP1> \
--master_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a" \
--tserver_flags "placement_cloud=aws,placement_region=us-east-1,placement_zone=us-east-1a"
Expand Down
Loading