Skip to content

Commit

Permalink
link config.md to index.md
Browse files Browse the repository at this point in the history
Change-Id: I56bedfa5f781d655214857ea42542251759a28a1
  • Loading branch information
xiaosong yang committed Oct 28, 2024
1 parent dde9500 commit 12dbec7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 30 deletions.
4 changes: 3 additions & 1 deletion docs/cloudwego/Getting Started/_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ weight: 2
keywords: ["Monolake", "Rust", "Proxy", "Configuration"]
description: "This page provides a brief guide for Monolake configuration"
---

## Configuration

This chapter provides a brief guide for Monolake configuration.
Expand Down Expand Up @@ -132,3 +131,6 @@ path = '/'
upstreams = [ { weight = 10, version = "HTTP1_1", endpoint = { type = "uri", value = "http://127.0.0.1:10082" } }]
```

### Parameter Values

Please check [Config Reference](../Reference/_index.md) for more details.
59 changes: 30 additions & 29 deletions docs/cloudwego/Getting Started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ weight: 2
keywords: ["Monolake", "Rust", "Proxy", "Getting Started"]
description: "This page provides a quick start guide for setting up and running Monolake"
---

## Prerequisites

- **Linux Kernel Support**: IO-uring requires a Linux kernel version that includes IO-uring support. Generally, kernel versions 5.1 and above provide the necessary support. Ensure that your target system has an appropriate kernel version installed. Monolake will fall back to epoll on Mac OS.
- **Rust nightly**: See the "Rust installation section" below

## Quick Start

This chapter will get you started with Monolake using a simple example config
This chapter will get you started with Monolake using a simple example config

### Rust installation
### Rust installation

To download and install Rust, and set `rustup` to nightly, you can follow these instructions:

Expand All @@ -26,35 +25,30 @@ To download and install Rust, and set `rustup` to nightly, you can follow these
```

This command will download the Rust installation script and initiate the installation process.

3. Close the terminal and open a new terminal window to ensure the changes take effect.

4. Set `rustup` to nightly by running the following command:
2. Close the terminal and open a new terminal window to ensure the changes take effect.
3. Set `rustup` to nightly by running the following command:

```markup
$ rustup default nightly
```

This command sets the default Rust toolchain to the nightly version.

5. Verify the installation and check the Rust version by running:
4. Verify the installation and check the Rust version by running:

```markup
$ rustc --version
```

This command will display the installed Rust version, which should now be set to nightly.

### Setup a HTTP upstream server
### Setup a HTTP upstream server

1. **Install Nginx**: Install Nginx using the package manager of your Linux distribution.

2. **Start Nginx**: Start Nginx using the following command:

```shell
sudo service nginx start
```

3. **Configure Port**: Open the Nginx configuration file using a text editor:

```shell
Expand All @@ -75,40 +69,47 @@ To download and install Rust, and set `rustup` to nightly, you can follow these
```

Save the changes and exit the text editor.

4. **Restart Nginx**: Restart Nginx for the changes to take effect:

```shell
sudo service nginx restart
```

### Build Monolake
### Build Monolake

1. Clone the monolake repository `git clone https://github.com/cloudwego/monolake.git`.
2. Build the binary:

```markup
$ cargo build --release
```
3. Generate the certificates
3. Generate the certificates

```markup
$ sh examples/gen_cert.sh
```

### Run the example
1. Make sure your endpoints are up and certificates are generated
2. Start the proxy

```markup
$ ./target/release/monolake -c examples/config.toml
```
3. Send a request to the socket based listener on server_basic.
1. Make sure your endpoints are up and certificates are generated
2. Start the proxy

```markup
$ ./target/release/monolake -c examples/config.toml
```

3. Send a request to the socket based listener on server_basic.

```markup
$ curl -vvv http://127.0.0.1:9081/
```

4. Send a request to the server_tls.

```markup
$ curl --resolve gateway.monolake.rs:8081:127.0.0.1 --cacert examples/certs/rootCA.crt -vvv https://gateway.monolake.rs:8081/
```

```markup
$ curl -vvv http://127.0.0.1:9081/
```
4. Send a request to the server_tls.
### Detail configuration

```markup
$ curl --resolve gateway.monolake.rs:8081:127.0.0.1 --cacert examples/certs/rootCA.crt -vvv https://gateway.monolake.rs:8081/
```

Please check [Configuration](_config.md) for more details.

0 comments on commit 12dbec7

Please sign in to comment.