-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into dependabot/pip/ansibl…
…e-7.0.0 Signed-off-by: Florent Poinsard <[email protected]>
- Loading branch information
Showing
183 changed files
with
10,941 additions
and
49,563 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Copyright 2023 The Vitess Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM golang:1.21.1-bookworm AS build-stage | ||
|
||
WORKDIR /build | ||
|
||
COPY go.mod go.sum ./ | ||
|
||
RUN go mod download | ||
|
||
COPY . . | ||
|
||
# Build arewefastyet | ||
RUN CGO_ENABLED=0 GOOS=linux go build -o /arewefastyetcli ./go/main.go | ||
|
||
FROM debian:bookworm AS run-stage | ||
|
||
# Install Git, Golang, and Python | ||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
python3 \ | ||
python3-pip \ | ||
python3-venv \ | ||
wget \ | ||
gnutls-bin | ||
|
||
# Set up Python virtual environment | ||
RUN python3 -m venv /venv | ||
ENV PATH="/venv/bin:$PATH" | ||
|
||
# Upgrade pip and install requirements | ||
RUN pip3 install --upgrade pip | ||
COPY requirements.txt . | ||
RUN pip3 install -r requirements.txt | ||
|
||
# Install ansible add-ons | ||
RUN ansible-galaxy install cloudalchemy.node_exporter && ansible-galaxy install cloudalchemy.prometheus | ||
|
||
# Copy the source code to the working directory | ||
COPY --from=build-stage /arewefastyetcli /arewefastyetcli | ||
|
||
EXPOSE 8080 | ||
|
||
# Needed for Ansible to execute sub-processes | ||
ENV OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES | ||
|
||
# Make sure all directories are created | ||
RUN mkdir -p /config /exec | ||
|
||
# Configuration files MUST be attached to the container using a volume. | ||
# The configuration files are not mounted on the Docker image for obvious | ||
# security reasons. | ||
CMD ["/arewefastyetcli", "api", "--config", "/config/config.yaml", "--secrets", "/config/secrets.yaml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Copyright 2023 The Vitess Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM golang:1.21.1-bookworm AS build-stage | ||
|
||
WORKDIR /build | ||
|
||
COPY go.mod go.sum ./ | ||
|
||
RUN go mod download | ||
|
||
COPY . . | ||
|
||
# Build arewefastyet | ||
RUN CGO_ENABLED=0 GOOS=linux go build -o /arewefastyetcli ./go/main.go | ||
|
||
FROM debian:bookworm AS run-stage | ||
|
||
# Copy the source code to the working directory | ||
COPY --from=build-stage /arewefastyetcli /arewefastyetcli | ||
|
||
EXPOSE 8181 | ||
|
||
# Configuration files MUST be attached to the container using a volume. | ||
# The configuration files are not mounted on the Docker image for obvious | ||
# security reasons. | ||
CMD ["/arewefastyetcli", "ghapp", "--config", "/config/config.yaml", "--secrets", "/config/secrets.yaml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,42 @@ | ||
# [AreWeFastYet](https://benchmark.vitess.io) | ||
Uses sysbench to run a benchmark on vitess. | ||
The following codebase: | ||
1. Creates a VPS | ||
2. Runs the ansibles on the VPS | ||
3. reads results from the VPS and stores in the database | ||
4. Kills the VPS | ||
# [Arewefastyet](https://benchmark.vitess.io) | ||
## Background | ||
|
||
## [Docs](docs/README.md) | ||
With the codebase of Vitess becoming larger and complex changes getting merged, we need to ensure our changes are not degrading the performance of Vitess. | ||
|
||
## Benchmarking Tool | ||
|
||
To solve the aforementioned issue, we use a tool named arewefastyet that automatically tests the performance of Vitess. The performance are measured through a set of benchmarks divided into two categories: `micro` and `macro`, the former focuses on unit-level functions, and the latter targets system-wide performance changes. | ||
|
||
The GitHub repository where lies all of arewefastyet's code can be found [here: vitessio/arewefastyet](https://github.com/vitessio/arewefastyet). | ||
|
||
## CRON Schedule | ||
|
||
Our benchmarks run frequently based on three different CRON schedules that are defined in [this file](https://github.com/vitessio/arewefastyet/blob/main/config/prod/config.yaml) under the `web-cron-*` keys. | ||
|
||
### Pull Request needing benchmarks | ||
|
||
When a pull request affect the performance of Vitess, one might wish to benchmark it before merging it. This can be done by setting the `Benchmark me` label to your pull request. | ||
The corresponding CRON schedule will be used to start benchmarking the head commit of your pull request and to compare against the pull request's base. | ||
|
||
## Website | ||
|
||
The performances of Vitess can be observed throughout different releases, git SHAs, and nightly builds on arewefastyet's website at [https://benchmark.vitess.io](https://benchmark.vitess.io). | ||
|
||
The website lets us: | ||
|
||
* See previous benchmarks. | ||
* Search results for a specific git SHA. | ||
* Compare two results for two git SHAs. | ||
* See micro and macro benchmarks results throughout different releases. | ||
* Compare performance between VTGate's v3 planner and Gen4 planner. | ||
|
||
## Read more | ||
|
||
Read more in our [docs](docs/README.md) section. | ||
|
||
## Architecture | ||
|
||
![arewefastyet architecture](./docs/architecture/arewefastyet_architecture.png) | ||
|
||
### SQL Schema | ||
## SQL Schema | ||
![arewefastyet schema](./docs/architecture/sql/arewefastyet_schema.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2023 The Vitess Authors. | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
--- | ||
- name: Clean host | ||
become: yes | ||
become_user: root | ||
block: | ||
- name: Remove tmp directories | ||
shell: | | ||
rm -Rf /tmp/ | ||
mkdir /tmp | ||
chmod 1777 /tmp | ||
rm -Rf /root/.ansible/tmp/* | ||
changed_when: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.