Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ We are hiring. Please check out our [about page](https://www.bytebase.com/about)

1. Clone this repository

```text
```bash
git clone [email protected]:bytebase/bytebase.com.git
```

1. Install dependencies

```text
```bash
pnpm install
```

1. Run website locally

```text
```bash
pnpm run dev
```

Expand Down Expand Up @@ -93,13 +93,13 @@ Use animated recording judicious. Sometimes you have to use animation to showcas

Additional commands:

```text
```bash
pnpm run lint
```

Run it to check the current status of eslint issues across project.

```text
```bash
pnpm run lint:fix
```

Expand All @@ -111,7 +111,7 @@ Run it to fix all possible issues.

Additional commands:

```text
```bash
pnpm run format
```

Expand Down
4 changes: 2 additions & 2 deletions content/blog/global-variable-support-in-nuxt.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: We recently introduced a global version variable in our Nuxt docs t

On our doc site, we have a few pages with instructions on installing Bytebase, like this one: [Deploy Bytebase in Docker within 5 seconds](https://docs.bytebase.com/get-started/deploy-with-docker). On these pages, we teach users how to install the latest version of Bytebase by showing command snippets.

```text
```bash
docker run --init \
--name bytebase \
--restart always \
Expand Down Expand Up @@ -188,7 +188,7 @@ In markdown files, insert the placeholder `$$bb_version$$` into where we are put
````markdown
Run the following command to start Bytebase on [http://bytebase.example.com](http://bytebase.example.com/)

```text
```bash
docker run --init \
--name bytebase \
--restart always \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ For the Linux platform
- Compiling from x64 to x64 requires a gcc/g++ toolchain, which we usually use.
- Compiling from x64 to arm64 requires a well-maintained toolchain, "aarch64-linux-gnu-gcc". You can get it directly from the Ubuntu package manager:

```text
```bash
sudo apt-get -y install gcc-aarch64-linux-gnu
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ This blog post gives an overview of how to install Bytebase CLI `bb` and how to

Install `bb` into the folder /usr/local/bin on macOS or Linux by entering the command below:

```text
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/bytebase/install/HEAD/install.sh)"
```

![installation](/content/blog/introducing-bb-bytebase-cli-to-manage-database-operations/bb-installing.webp)

Enter the following command to verify the installation:

```text
```bash
bb --help
```

Expand All @@ -52,7 +52,7 @@ Let's take database schema change as an example.

First of all, enter the following command to display the database schema:

```text
```bash
bb dump --dsn mysql://root:passwd@localhost:3306/bytebase_test_todo --schema-only
```

Expand All @@ -62,15 +62,15 @@ You should see there is a table named "author":

Then, add a column named "phone_no" into the table "author" with the following `migrate` command:

```text
```bash
bb migrate \
--dsn mysql://root:passwd@localhost:3306/bytebase_test_todo \
--command "ALTER TABLE author ADD COLUMN phone_no VARCHAR(15);"
```

Finally, verify database schema with the following `dump` command:

```text
```bash
bb dump --dsn mysql://root:passwd@localhost:3306/bytebase_test_todo --schema-only
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Terraform is an Infrastructure-as-Code tool that defines and configures infra re

For example, the following code creates a TiDB Cloud Serverless resource:

```text
```hcl
terraform {
required_providers {
tidbcloud = {
Expand All @@ -65,7 +65,7 @@ provider "tidbcloud" {

For example, the following code adds the specified TiDB Cloud instance into Bytebase:

```text
```hcl
# Configure the Bytebase Provider
terraform {
required_providers {
Expand Down
2 changes: 1 addition & 1 deletion content/blog/top-postgres-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ The statistics gathered by the module are made available via a view named `pg_st

Note that the pg_stat_statements extension only tracks queries that have been executed since it was enabled. If you want to track all queries, you should enable the extension at server start-up by adding the following line to your postgresql.conf file:

```text
```ini
shared_preload_libraries = 'pg_stat_statements'
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ We will generate the following certificate chain:

To generate Root CA certificate and other peer's certificate request, you need to set up a configure file as below:

```text
```bash
cat >req.conf <<EOF
[ req ]
distinguished_name = req_distinguished_name
Expand Down Expand Up @@ -73,27 +73,27 @@ Note, it uses IP address directly here in order to keep this example simple. You

Generate Root CA Key. To simplify the test, you can skip specifying the passphrase.

```text
```bash
openssl genrsa -out ca.key 2048
```

Now, use this key and OpenSSL config above to generate the CA certificate:

```text
```bash
openssl req -x509 -new -key ca.key -sha256 -days 36500 -out ca.pem -extensions 'v3_ca' -config req.conf
```

### Generate Server Key and Certificate

Generate Server Key without the passphrase, too:

```text
```bash
openssl genrsa -out server.key 2048
```

Use the server key and OpenSSL config above to generate the server certificate like what you have done for CA. But the difference is that at this time you need to request the CA's Key for signing.

```text
```bash
openssl req -new -sha256 -key server.key -out server.csr -subj "/C=CN/ST=GD/O=Bytebase/CN=YOUR_SERVER_IP"
openssl x509 -req -days 36500 -sha256 -extensions v3_req -CA ca.pem -CAkey ca.key -CAcreateserial -in server.csr -out server.pem
```
Expand All @@ -104,7 +104,7 @@ openssl x509 -req -days 36500 -sha256 -extensions v3_req -CA ca.pem -CAkey ca.ke

From the SSL authentication perspective, Client and Server are equal partners, so you use the same steps as the server to generate client-related SSL files.

```text
```bash
openssl genrsa -out client.key 2048
openssl req -new -sha256 -key client.key -out client.csr -subj "/C=CN/ST=GD/O=Bytebase/CN=dev.testssl.com"
openssl x509 -req -days 36500 -sha256 -extensions v3_req -CA ca.pem -CAkey ca.key -CAcreateserial -in client.csr -out client.pem
Expand Down Expand Up @@ -140,7 +140,7 @@ From ClickHouse config, you can see:

you need to generate dhparams by using the command below:

```text
```bash
openssl dhparam -out /etc/clickhouse-server/dhparam.pem 4096
```

Expand Down Expand Up @@ -220,7 +220,7 @@ Uncommenting the `listen_host` tag:

Then, restart the ClickHouse server. For example, on Ubuntu:

```text
```bash
sudo service clickhouse-server restart
```

Expand All @@ -234,7 +234,7 @@ You don't need to do anything in this step if you only test it on the machine th

On another machine, set-up the ClickHouse client config that you will use later:

```text
```bash
cat >clickhouse-client-ssl.xml <<EOF
<config>
<user>default</user>
Expand All @@ -256,7 +256,7 @@ EOF

Run the following command, and you are expected to get some output like below:

```text
```bash
clickhouse-client –-config=clickhouse-client-ssl.xml
```

Expand All @@ -266,7 +266,7 @@ clickhouse-client –-config=clickhouse-client-ssl.xml

Use MySQL client to connect the ClickHouse server via SSL. Run the following command, and you are expected to get some output like below:

```text
```bash
mysql -u default -p -h YOUR_SERVER_IP -P 9004 --ssl-ca=/etc/ssl/ca.pem --ssl-cert=/etc/ssl/client.pem --ssl-key=/etc/ssl/client.key --execute="STATUS"
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ Install [docker](https://docs.docker.com/get-docker/) before you continue.

Run the following command to start a ClickHouse server in a docker container.

```text
```bash
docker run -d --name tutorial-clickhouse-server --ulimit nofile=262144:262144 --volume=$HOME/tutorial_clickhouse_database:/var/lib/clickhouse yandex/clickhouse-server
```

### Client

Run the following command to connect to ClickHouse server with the default user.

```text
```bash
docker run -it --rm --link tutorial-clickhouse-server:clickhouse-server yandex/clickhouse-client --host clickhouse-server
```

Expand All @@ -34,7 +34,7 @@ By default, the ClickHouse server provides the default user account which is not

Run

```text
```bash
docker cp <container>:/etc/clickhouse-server/users.xml .
```

Expand All @@ -56,7 +56,7 @@ After the change, the file structure should be something like

And then run

```text
```bash
docker cp users.xml <container>:/etc/clickhouse-server/users.xml
```

Expand Down Expand Up @@ -88,7 +88,7 @@ GRANT ALL PRIVILEGES ON db1.* TO user1

Now we can connect to the server with the created user.

```text
```bash
docker run -it --rm --link tutorial-clickhouse-server:clickhouse-server yandex/clickhouse-client --host clickhouse-server -u user1 --password pass1
```

Expand Down Expand Up @@ -170,15 +170,15 @@ By default, it should be`<mysql_port>9004</mysql_port>`.

We start a ClickHouse server with the following command, notice that port 9004 is exposed this time.

```text
```bash
docker run -d --name tutorial-clickhouse-server -p 9004:9004 --ulimit nofile=262144:262144 --volume=$HOME/tutorial_clickhouse_database:/var/lib/clickhouse yandex/clickhouse-server
```

### Client

Example of connecting using command-line tool `mysql`:

```text
```bash
mysql --protocol tcp -u default -P 9004
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Ensure you have [MongoDB](https://docs.mongodb.com/manual/installation/) and [Op

Set up the configuration file:

```text
```bash
cat >req.conf <<EOF
[ req ]
distinguished_name = req_distinguished_name
Expand Down
Loading