Skip to content

Commit

Permalink
revise docs proxysql
Browse files Browse the repository at this point in the history
Signed-off-by: TasdidurRahman <[email protected]>
  • Loading branch information
TasdidurRahman committed Dec 12, 2022
1 parent ee9efc2 commit 1e8bb7b
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 23 deletions.
2 changes: 1 addition & 1 deletion docs/guides/proxysql/clustering/overview/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Replication means there are multiple proxy server who are doing proxy with the t

## Next Steps

- [Deploy ProxySQL Cluster](/docs/guides/proxysql/clustering/proxysql-cluster) using KubeDB.
- [Deploy ProxySQL Cluster](/docs/guides/proxysql/clustering/proxysql-cluster/index.md) using KubeDB.
12 changes: 6 additions & 6 deletions docs/guides/proxysql/clustering/proxysql-cluster/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ This guide will show you how to use `KubeDB` Enterprise operator to set up a `Pr
- Install `KubeDB` Community and Enterprise operator in your cluster following the steps [here](/docs/setup/README.md).

- You should be familiar with the following `KubeDB` concepts:
- [ProxySQL](/docs/guides/proxysql/concepts/proxysql)
- [ProxySQL Cluster](/docs/guides/proxysql/clustering/overview)
- [ProxySQL](/docs/guides/proxysql/concepts/proxysql/index.md)
- [ProxySQL Cluster](/docs/guides/proxysql/clustering/overview/index.md)

To keep everything isolated, we are going to use a separate namespace called `demo` throughout this tutorial.

Expand Down Expand Up @@ -172,7 +172,7 @@ Let's check the proxysql_servers table inside the ProxySQL pods.
```bash
#first node
$ kubectl exec -it -n demo proxy-server-0 -- bash
root@proxy-server-0:/# mysql -uadmin -padmin -h127.0.0.1 -P6032 --prompt "ProxySQLAdmin >"
root@proxy-server-0:/# mysql -uadmin -padmin -h127.0.0.1 -P6032 --prompt "ProxySQLAdmin > "
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 316
Server version: 8.0.27 (ProxySQL Admin Module)
Expand All @@ -191,7 +191,7 @@ ProxySQLAdmin > select * from runtime_proxysql_servers;
+---------------------------------------+------+--------+---------+
3 rows in set (0.000 sec)
ProxySQLAdmin >exit
ProxySQLAdmin > exit
Bye
```
```bash
Expand Down Expand Up @@ -248,7 +248,7 @@ Bye

From the above output we can see that the proxysql_servers tables has been successfuly set up.

## Create test user in proxysql
## Create test user in proxysql server

Let's insert the test user inside the proxysql server

Expand Down Expand Up @@ -278,7 +278,7 @@ Query OK, 0 rows affected (0.009 sec)

Now lets check the load balancing through the cluster.

First we need to create a script to sent load over the ProxySQL. We will use the test user and the test table to check send the load.
First we need to create a script to sent load over the ProxySQL. We will use the test user and the test table to check and send the load.

```bash
$ kubectl exec -it -n demo proxy-server-1 -- bash
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/proxysql/concepts/appbinding/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ menu:
identifier: guides-proxysql-concepts-appbinding
name: AppBinding
parent: guides-proxysql-concepts
weight: 25
weight: 17
menu_name: docs_{{ .version }}
section_menu_id: guides
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ menu:
identifier: guides-proxysql-concepts-declarativeconfiguration
name: Declarative Configuration
parent: guides-proxysql-concepts
weight: 15
weight: 12
menu_name: docs_{{ .version }}
section_menu_id: guides
---
Expand Down Expand Up @@ -85,7 +85,7 @@ spec:

### initConfig.mysqlVariables

This is a [runtime.rawExtension](https://pkg.go.dev/k8s.io/apimachinery/pkg/runtime#RawExtension) field. You can pass all the [MySQL Variables](https://proxysql.com/Documentation/global-variables/mysql-variables/) you want to configure in a key-value format under this section. You can configure almost all the mysql variables except `interfaces`, `monitor_username`, `monitor_password`, `ssl_p2s_cert`, `ssl_p2s_key`, `ssl_p2s_ca`. We have protected the `interface` variable because a lot of our operator logic depends on it. As for the `monitor_username` and `monitor_password` you can refer to [this](#edit) section how this is configured. And as for the other three, please refer to [this]#edit link.
This is a [runtime.rawExtension](https://pkg.go.dev/k8s.io/apimachinery/pkg/runtime#RawExtension) field. You can pass all the [MySQL Variables](https://proxysql.com/Documentation/global-variables/mysql-variables/) you want to configure in a key-value format under this section. You can configure almost all the mysql variables except `interfaces`, `monitor_username`, `monitor_password`, `ssl_p2s_cert`, `ssl_p2s_key`, `ssl_p2s_ca`. We have protected the `interface` variable because a lot of our operator logic depends on it.

```yaml
spec:
Expand Down
5 changes: 2 additions & 3 deletions docs/guides/proxysql/concepts/opsrequest/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ A `ProxySQLOpsRequest` object has the following fields in the `spec` section.

`spec.type` specifies the kind of operation that will be applied to the database. Currently, the following types of operations are allowed in `ProxySQLOpsRequest`.

- `Upgrade`
- `UpdateVersion`
- `HorizontalScaling`
- `VerticalScaling`
- `Reconfigure`
Expand All @@ -187,8 +187,7 @@ If you want to upgrade your ProxySQL version, you have to specify the `spec.upgr

### spec.horizontalScaling

If you want to scale-up or scale-down your ProxySQL cluster or different components of it, you have to specify `spec.horizontalScaling` section. This field consists of the following sub-field:
- `spec.horizontalScaling.member` indicates the desired number of nodes for ProxySQL cluster after scaling. For example, if your cluster currently has 4 nodes, and you want to add additional 2 nodes then you have to specify 6 in `spec.horizontalScaling.member` field. Similarly, if you want to remove one node from the cluster, you have to specify 3 in `spec.horizontalScaling.` field.
If you want to scale-up or scale-down your ProxySQL cluster or different components of it, you have to specify `spec.horizontalScaling` section. `spec.horizontalScaling.member` indicates the desired number of nodes for ProxySQL cluster after scaling. For example, if your cluster currently has 4 nodes, and you want to add additional 2 nodes then you have to specify 6 in `spec.horizontalScaling.member` field. Similarly, if you want to remove one node from the cluster, you have to specify 3 in `spec.horizontalScaling.` field.

### spec.verticalScaling

Expand Down
6 changes: 3 additions & 3 deletions docs/guides/proxysql/concepts/proxysql-version/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ menu:
identifier: guides-proxysql-concepts-proxysqlversion
name: ProxySQLVersion
parent: guides-proxysql-concepts
weight: 15
weight: 10
menu_name: docs_{{ .version }}
section_menu_id: guides
---
Expand Down Expand Up @@ -76,5 +76,5 @@ The default value of this field is `false`. If `.spec.deprecated` is set `true`,
`spec.podSecurityPolicies.databasePolicyName` is a required field that specifies the name of the pod security policy required to get the ProxySQL pod(s) running.

## Next Steps
#TODO: edit the link
- Deploy your first ProxySQL to load balance MySQL Group Replication with KubeDB by following the guide

- Learn how to use KubeDB ProxySQL to load balance MySQL Group Replication [here](/docs/guides/proxysql/quickstart/mysqlgrp/index.md)
5 changes: 2 additions & 3 deletions docs/guides/proxysql/concepts/proxysql/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ menu:
identifier: guides-proxysql-concepts-proxysql
name: ProxySQL
parent: guides-proxysql-concepts
weight: 10
weight: 5
menu_name: docs_{{ .version }}
section_menu_id: guides
---
Expand Down Expand Up @@ -357,5 +357,4 @@ See [here](https://github.com/kmodules/offshoot-api/blob/kubernetes-1.16.3/api/v

## Next Steps

#TODO: edit the links
- Learn how to use KubeDB to load balance MySQL Group Replication
- Learn how to use KubeDB ProxySQL to load balance MySQL Group Replication [here](/docs/guides/proxysql/quickstart/mysqlgrp/index.md)
4 changes: 2 additions & 2 deletions docs/guides/proxysql/quickstart/mysqlgrp/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Proxy Load To MySQL Group Replication With KubeDB Provisioned ProxySQL
title: Load Balance To MySQL Group Replication With KubeDB Provisioned ProxySQL
menu:
docs_{{ .version }}:
identifier: guides-proxysql-quickstart-overview
Expand All @@ -24,7 +24,7 @@ This guide will show you how to use `KubeDB` Enterprise operator to set up a `Pr
- Install `KubeDB` Community and Enterprise operator in your cluster following the steps [here](/docs/setup/README.md).

- You should be familiar with the following `KubeDB` concepts:
- [ProxySQL](/docs/guides/proxysql/concepts/proxysql)
- [ProxySQL](/docs/guides/proxysql/concepts/proxysql/index.md)

To keep everything isolated, we are going to use a separate namespace called `demo` throughout this tutorial.

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/proxysql/quickstart/xtradbext/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ appbinding.appcatalog.appscode.com/xtradb-galera-appbinding created
We are ready with our backend appbinding. But before we proceed to the ProxySQL server, lets first create some test user and database so that we can use them for testing.
Let's first create a user in the backend mysql server and a database to test the proxy traffic .
Let's first create a user in the backend xtradb server and a database to test the proxy traffic .
```bash
$ kubectl exec -it -n demo mysql-server-0 -- bash
$ kubectl exec -it -n demo xtradb-galera-0 -- bash
Defaulted container "perconaxtradb" out of: perconaxtradb, px-coordinator, px-init (init)
bash-4.4$ mysql -uroot -p$MYSQL_ROOT_PASSWORD
mysql: [Warning] Using a password on the command line interface can be insecure.
Expand Down

0 comments on commit 1e8bb7b

Please sign in to comment.