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

Update gke.md #2155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all 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
5 changes: 5 additions & 0 deletions docs/source/gke.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ In order for the example to work you need to modify the cluster definition in th
sed -i "s/<gcp_region>/${GCP_REGION}/g;s/<gcp_zone>/${GCP_ZONE}/g" examples/gke/cluster.yaml
```

#### Mac users
```
sed -i '' "s/<gcp_region>/${GCP_REGION}/g;s/<gcp_zone>/${GCP_ZONE}/g" examples/gke/cluster.yaml
Copy link
Member

Choose a reason for hiding this comment

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

Does sed -i -e "s/<gcp_region>/${GCP_REGION}/g;s/<gcp_zone>/${GCP_ZONE}/g" examples/gke/cluster.yaml" work on Mac?

Copy link
Contributor Author

@b8kings0ga b8kings0ga Oct 15, 2024

Choose a reason for hiding this comment

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

yes,
sed -i -e "s/<gcp_region>/${GCP_REGION}/g;s/<gcp_zone>/${GCP_ZONE}/g" examples/gke/cluster.yaml"
works too

Copy link
Member

Choose a reason for hiding this comment

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

thx, then we can just update the existing one to work on both platforms

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I will update this

Copy link
Contributor

Choose a reason for hiding this comment

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

sed -i -e "s/<gcp_region>/${GCP_REGION}/g;s/<gcp_zone>/${GCP_ZONE}/g" examples/gke/cluster.yaml"

Will not work on Mac. It will create a new cluster.yaml-e and also have too many quotes.

You can use:
sed -i '' 's/<gcp_region>/${GCP_REGION}/g;s/<gcp_zone>/${GCP_ZONE}/g' examples/gke/cluster.yaml
or
sed -i '' -e 's/<gcp_region>/${GCP_REGION}/g;s/<gcp_zone>/${GCP_ZONE}/g' examples/gke/cluster.yaml

Additional information:
https://stackoverflow.com/questions/4247068/sed-command-with-i-option-failing-on-mac-but-works-on-linux/4247319#4247319

Copy link
Member

@tnozicka tnozicka Oct 15, 2024

Choose a reason for hiding this comment

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

not sure how the ending quote got into my answer but you need double quotes to substitute the variables - thanks for the -i difference explanation

```

This will inject your region and zone into the cluster definition so that it matches the kubernetes cluster you just created.

### Deploying ScyllaDB
Expand Down