Skip to content

Commit

Permalink
Replace `shell with `bash
Browse files Browse the repository at this point in the history
Fix #1501
  • Loading branch information
yahonda committed Dec 27, 2021
1 parent 726b56c commit c8496eb
Show file tree
Hide file tree
Showing 140 changed files with 1,264 additions and 1,264 deletions.
2 changes: 1 addition & 1 deletion en/access-dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ TiDB Dashboard is built in the PD component in TiDB 4.0 and later versions. You

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl port-forward svc/basic-discovery -n ${namespace} 10262:10262
```

Expand Down
6 changes: 3 additions & 3 deletions en/access-tidb.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You can obtain TiDB Service information by running the following command:

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl get svc ${serviceName} -n ${namespace}
```

Expand Down Expand Up @@ -47,7 +47,7 @@ To view the Node Port assigned by Service, run the following commands to obtain

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl -n ${namespace} get svc ${cluster_name}-tidb -ojsonpath="{.spec.ports[?(@.name=='mysql-client')].nodePort}{'\n'}"
```

Expand All @@ -58,7 +58,7 @@ To check you can access TiDB services by using the IP of what nodes, see the fol

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl -n ${namespace} get pods -l "app.kubernetes.io/component=tidb,app.kubernetes.io/instance=${cluster_name}" -ojsonpath="{range .items[*]}{.spec.nodeName}{'\n'}{end}"
```

Expand Down
4 changes: 2 additions & 2 deletions en/advanced-statefulset.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The [advanced StatefulSet controller](https://github.com/pingcap/advanced-statef

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl apply -f https://raw.githubusercontent.com/pingcap/tidb-operator/master/manifests/advanced-statefulset-crd.v1beta1.yaml
```

Expand Down Expand Up @@ -61,7 +61,7 @@ The data format of `AdvancedStatefulSet` is the same as that of `StatefulSet`, b

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl get -n ${namespace} asts
```

Expand Down
4 changes: 2 additions & 2 deletions en/aggregate-multiple-cluster-monitor-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Thanos provides [Thanos Query](https://thanos.io/tip/components/query.md/) compo

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl -n ${namespace} apply -f https://raw.githubusercontent.com/pingcap/tidb-operator/master/examples/monitor-with-thanos/tidb-monitor.yaml
```

Expand Down Expand Up @@ -59,7 +59,7 @@ To access the Thanos Query panel, execute the following command, and then access
{{< copyable "shell-regular" >}}
```shell
```bash
kubectl port-forward -n ${thanos_namespace} svc/thanos-query 9090
```
Expand Down
20 changes: 10 additions & 10 deletions en/backup-and-restore-using-helm-charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ To configure a scheduled full backup, modify the `scheduledBackup` section in th

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl create secret generic backup-secret -n ${namespace} --from-literal=user=${user} --from-literal=password=${password}
```

5. Create a new TiDB cluster with the scheduled full backup task by running `helm install`, or enable the scheduled full backup for the existing cluster by `helm upgrade`:

{{< copyable "shell-regular" >}}

```shell
```bash
helm upgrade ${release_name} pingcap/tidb-cluster -f values.yaml --version=${version}
```

Expand All @@ -88,15 +88,15 @@ Follow the steps below to perform an ad-hoc full backup task:
{{< copyable "shell-regular" >}}
```shell
```bash
kubectl create secret generic backup-secret -n ${namespace} --from-literal=user=${user} --from-literal=password=${password}
```
3. Run the following command to perform an ad-hoc backup task:
{{< copyable "shell-regular" >}}
```shell
```bash
helm install ${backup_name} pingcap/tidb-backup --namespace=${namespace} -f values.yaml --version=${version}
```
Expand All @@ -106,7 +106,7 @@ For backups stored in PV, you can view them by using the following command:
{{< copyable "shell-regular" >}}
```shell
```bash
kubectl get pvc -n ${namespace} -l app.kubernetes.io/component=backup,pingcap.com/backup-cluster-name=${cluster_name}
```
Expand All @@ -124,15 +124,15 @@ The `pingcap/tidb-backup` helm chart helps restore a TiDB cluster using backup d
{{< copyable "shell-regular" >}}
```shell
```bash
kubectl create secret generic backup-secret -n ${namespace} --from-literal=user=${user} --from-literal=password=${password}
```
3. Restore the backup:
{{< copyable "shell-regular" >}}
```shell
```bash
helm install ${restore_name} pingcap/tidb-backup --namespace=${namespace} -f values.yaml --version=${version}
```
Expand All @@ -152,15 +152,15 @@ To scale in Pump, for each Pump node, make the node offline and then run the `he
{{< copyable "shell-regular" >}}
```shell
```bash
kubectl run offline-pump-${ordinal_id} --image=pingcap/tidb-binlog:${version} --namespace=${namespace} --restart=OnFailure -- /binlogctl -pd-urls=http://${release_name}-pd:2379 -cmd offline-pump -node-id ${release_name}-pump-${ordinal_id}:8250
```
Then, check the log output of Pump. If Pump outputs `pump offline, please delete my pod`, the state of the Pump node is successfully switched to `offline`.
{{< copyable "shell-regular" >}}
```shell
```bash
kubectl logs -f -n ${namespace} ${release_name}-pump-${ordinal_id}
```
Expand All @@ -170,6 +170,6 @@ To scale in Pump, for each Pump node, make the node offline and then run the `he
{{< copyable "shell-regular" >}}
```shell
```bash
helm upgrade ${release_name} pingcap/tidb-cluster -f values.yaml --version=${chart_version}
```
8 changes: 4 additions & 4 deletions en/backup-restore-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ This section introduces the fields in the `Backup` CR.

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl create secret generic ${secret_name} --namespace=${namespace} --from-file=tls.crt=${cert_path} --from-file=tls.key=${key_path} --from-file=ca.crt=${ca_path}
```

Expand Down Expand Up @@ -246,7 +246,7 @@ This section introduces the fields in the `Restore` CR.

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl create secret generic ${secret_name} --namespace=${namespace} --from-file=tls.crt=${cert_path} --from-file=tls.key=${key_path} --from-file=ca.crt=${ca_path}
```

Expand Down Expand Up @@ -296,7 +296,7 @@ You can delete the `Backup` CR or `BackupSchedule` CR by running the following c

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl delete backup ${name} -n ${namespace}
kubectl delete backupschedule ${name} -n ${namespace}
```
Expand All @@ -311,7 +311,7 @@ To address this issue, delete `finalizers` by running the following command:

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl edit backup ${name} -n ${namespace}
```

Expand Down
22 changes: 11 additions & 11 deletions en/backup-to-aws-s3-using-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Before you perform ad-hoc backup, AWS account permissions need to be granted. Th

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl apply -f backup-rbac.yaml -n test1
```

Expand All @@ -44,7 +44,7 @@ Before you perform ad-hoc backup, AWS account permissions need to be granted. Th

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl create secret generic backup-demo1-tidb-secret --from-literal=password=${password} --namespace=test1
```

Expand All @@ -58,7 +58,7 @@ Before you perform ad-hoc backup, AWS account permissions need to be granted. Th

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl apply -f backup-aws-s3.yaml
```

Expand Down Expand Up @@ -105,7 +105,7 @@ Before you perform ad-hoc backup, AWS account permissions need to be granted. Th

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl apply -f backup-aws-s3.yaml
```

Expand Down Expand Up @@ -153,7 +153,7 @@ Before you perform ad-hoc backup, AWS account permissions need to be granted. Th

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl apply -f backup-aws-s3.yaml
```

Expand Down Expand Up @@ -208,7 +208,7 @@ After you create the `Backup` CR, view the backup status by running the followin

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl get bk -n test1 -o wide
```

Expand All @@ -226,7 +226,7 @@ The prerequisites for the scheduled full backup is the same as the [prerequisite

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl apply -f backup-scheduler-aws-s3.yaml
```

Expand Down Expand Up @@ -276,7 +276,7 @@ The prerequisites for the scheduled full backup is the same as the [prerequisite

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl apply -f backup-scheduler-aws-s3.yaml
```

Expand Down Expand Up @@ -327,7 +327,7 @@ The prerequisites for the scheduled full backup is the same as the [prerequisite

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl apply -f backup-scheduler-aws-s3.yaml
```

Expand Down Expand Up @@ -377,15 +377,15 @@ After creating the scheduled full backup, use the following command to check the

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl get bks -n test1 -o wide
```

You can use the following command to check all the backup items:

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl get bk -l tidb.pingcap.com/backup-schedule=demo1-backup-schedule-s3 -n test1
```

Expand Down
14 changes: 7 additions & 7 deletions en/backup-to-gcs-using-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This document provides examples in which the data of the `demo1` TiDB cluster in

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl apply -f backup-rbac.yaml -n test1
```

Expand All @@ -37,7 +37,7 @@ This document provides examples in which the data of the `demo1` TiDB cluster in

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl create secret generic backup-demo1-tidb-secret --from-literal=password=<password> --namespace=test1
```

Expand All @@ -51,7 +51,7 @@ This document provides examples in which the data of the `demo1` TiDB cluster in

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl apply -f backup-gcs.yaml
```

Expand Down Expand Up @@ -107,7 +107,7 @@ This document provides examples in which the data of the `demo1` TiDB cluster in

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl get bk -n test1 -owide
```

Expand All @@ -125,7 +125,7 @@ The prerequisites for the scheduled full backup is the same with the [prerequisi

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl apply -f backup-schedule-gcs.yaml
```

Expand Down Expand Up @@ -175,15 +175,15 @@ The prerequisites for the scheduled full backup is the same with the [prerequisi

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl get bks -n test1 -owide
```

Use the following command to check all the backup items:

{{< copyable "shell-regular" >}}

```shell
```bash
kubectl get bk -l tidb.pingcap.com/backup-schedule=demo1-backup-schedule-gcs -n test1
```

Expand Down
Loading

0 comments on commit c8496eb

Please sign in to comment.