-
Notifications
You must be signed in to change notification settings - Fork 167
docs: restructure binary installation to match VictoriaMetrics Quick Start #1610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jespino
wants to merge
4
commits into
master
Choose a base branch
from
binary-install-docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
7cf121e
docs: restructure binary installation to match VictoriaMetrics Quick …
jespino c6464de
Merge branch 'master' into binary-install-docs
jespino 887b558
Merge remote-tracking branch 'origin/master' into binary-install-docs
jespino 071ee8b
updating the version
jespino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -165,30 +165,259 @@ of VictoriaLogs first. | |
|
|
||
| The following options are available: | ||
|
|
||
| - [To run pre-built binaries](https://docs.victoriametrics.com/victorialogs/quickstart/#pre-built-binaries) | ||
| - [To run VictoriaLogs single node from a binary](https://docs.victoriametrics.com/victorialogs/quickstart/#pre-built-binaries) | ||
| - [To run VictoriaLogs cluster from binaries](https://docs.victoriametrics.com/victorialogs/quickstart/#starting-vl-cluster-from-binaries) | ||
| - [To run Docker image](https://docs.victoriametrics.com/victorialogs/quickstart/#docker-image) | ||
| - [To run in Kubernetes with Helm charts](https://docs.victoriametrics.com/victorialogs/quickstart/#helm-charts) | ||
| - [To run in Kubernetes with VictoriaMetrics Operator (VLSingle / VLCluster CRDs)](https://docs.victoriametrics.com/operator/resources/) | ||
| - [To build VictoriaLogs from source code](https://docs.victoriametrics.com/victorialogs/quickstart/#building-from-source-code) | ||
|
|
||
| ### Pre-built binaries | ||
| ### Starting VictoriaLogs Single Node from a Binary {id="pre-built-binaries"} | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is overwriting the id intentionally to ensure not breaking links from other documents here. |
||
|
|
||
| Pre-built binaries for VictoriaLogs are available at the [releases](https://github.com/VictoriaMetrics/VictoriaLogs/releases/) page. | ||
| Just download the archive for the needed operating system and architecture, unpack it, and run `victoria-logs-prod` from it. | ||
| 1. Download the archive for your OS and architecture from the [releases page](https://github.com/VictoriaMetrics/VictoriaLogs/releases/latest). | ||
| For example, on Linux with `amd64` architecture: | ||
|
|
||
| ```sh | ||
| curl -L -O https://github.com/VictoriaMetrics/VictoriaLogs/releases/download/v1.52.0/victoria-logs-linux-amd64-v1.52.0.tar.gz | ||
| ``` | ||
|
|
||
| 2. Extract the archive to /usr/local/bin by running: | ||
|
|
||
| ```sh | ||
| sudo tar xzf victoria-logs-linux-amd64-v1.52.0.tar.gz -C /usr/local/bin | ||
| ``` | ||
|
|
||
| 3. Create a VictoriaLogs user on the system: | ||
|
|
||
| ```sh | ||
| sudo useradd -s /usr/sbin/nologin victorialogs | ||
| ``` | ||
|
|
||
| 4. Create a folder for storing VictoriaLogs data: | ||
|
|
||
| ```sh | ||
| sudo mkdir -p /var/lib/victoria-logs && sudo chown -R victorialogs:victorialogs /var/lib/victoria-logs | ||
| ``` | ||
|
|
||
| 5. Create a Linux Service by running the following: | ||
|
|
||
| ```sh | ||
| sudo bash -c 'cat <<END >/etc/systemd/system/victorialogs.service | ||
| [Unit] | ||
| Description=VictoriaLogs service | ||
| After=network.target | ||
|
|
||
| [Service] | ||
| Type=simple | ||
| User=victorialogs | ||
| Group=victorialogs | ||
| ExecStart=/usr/local/bin/victoria-logs-prod -storageDataPath=/var/lib/victoria-logs | ||
| SyslogIdentifier=victorialogs | ||
| Restart=always | ||
|
|
||
| PrivateTmp=yes | ||
| ProtectHome=yes | ||
| NoNewPrivileges=yes | ||
|
|
||
| ProtectSystem=full | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target | ||
| END' | ||
| ``` | ||
|
|
||
| Extra [command-line flags](https://docs.victoriametrics.com/victorialogs/#list-of-command-line-flags) can be added to the `ExecStart` line. | ||
|
|
||
| > Please note, `victorialogs` service is listening on `:9428` for HTTP connections (see `-httpListenAddr` flag). | ||
|
|
||
| 6. Start and enable the service by running the following command: | ||
|
|
||
| ```sh | ||
| sudo systemctl daemon-reload && sudo systemctl enable --now victorialogs.service | ||
| ``` | ||
|
|
||
| For example, the following commands download VictoriaLogs archive for Linux/amd64, unpack and run it: | ||
| 7. Check that the service started successfully: | ||
|
|
||
| ```sh | ||
| sudo systemctl status victorialogs.service | ||
| ``` | ||
|
|
||
| 8. After VictoriaLogs is in `Running` state, verify the [Web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui) is working | ||
| by going to `http://<ip_or_hostname>:9428/select/vmui`. | ||
|
|
||
| ### Starting VictoriaLogs Cluster from Binaries {id="starting-vl-cluster-from-binaries"} | ||
|
|
||
| VictoriaLogs cluster consists of [3 components](https://docs.victoriametrics.com/victorialogs/cluster/#architecture) - | ||
| `vlinsert`, `vlselect` and `vlstorage`. All of them share the same single-node VictoriaLogs executable, | ||
| and the role of every node is defined by its command-line flags. | ||
| It is recommended to run these components in the same private network (for [security reasons](https://docs.victoriametrics.com/victorialogs/#security)), | ||
| but on separate physical nodes for the best performance. | ||
|
|
||
| On all nodes, you will need to do the following: | ||
|
|
||
| 1. Download the archive for your OS and architecture from the [releases page](https://github.com/VictoriaMetrics/VictoriaLogs/releases/latest). | ||
| For example, on Linux with `amd64` architecture: | ||
|
|
||
| ```sh | ||
| curl -L -O https://github.com/VictoriaMetrics/VictoriaLogs/releases/download/v1.52.0/victoria-logs-linux-amd64-v1.52.0.tar.gz | ||
| tar xzf victoria-logs-linux-amd64-v1.52.0.tar.gz | ||
| ./victoria-logs-prod -storageDataPath=victoria-logs-data | ||
| ``` | ||
|
|
||
| VictoriaLogs is ready for [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/) | ||
| and [querying](https://docs.victoriametrics.com/victorialogs/querying/) at the TCP port `9428` now! | ||
| It has no external dependencies, so it can run in various environments without additional setup or configuration. | ||
| VictoriaLogs automatically adapts to the available CPU and RAM resources. It also automatically sets up and creates | ||
| the needed indexes during [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/). | ||
| 2. Extract the archive to /usr/local/bin by running: | ||
|
|
||
| ```sh | ||
| sudo tar xzf victoria-logs-linux-amd64-v1.52.0.tar.gz -C /usr/local/bin | ||
| ``` | ||
|
|
||
| 3. Create a user account for VictoriaLogs: | ||
|
|
||
| ```sh | ||
| sudo useradd -s /usr/sbin/nologin victorialogs | ||
| ``` | ||
|
|
||
| See recommendations for installing each type of cluster component below. | ||
|
|
||
| > Please note, every cluster component is listening on `:9428` for HTTP connections by default (see `-httpListenAddr` flag). | ||
|
|
||
| #### Installing vlstorage | ||
|
|
||
| 1. Create a folder for storing `vlstorage` data: | ||
|
|
||
| ```sh | ||
| sudo mkdir -p /var/lib/vlstorage && sudo chown -R victorialogs:victorialogs /var/lib/vlstorage | ||
| ``` | ||
|
|
||
| 2. Create a Linux Service for `vlstorage` by running the following command: | ||
|
|
||
| ```sh | ||
| sudo bash -c 'cat <<END >/etc/systemd/system/vlstorage.service | ||
| [Unit] | ||
| Description=VictoriaLogs vlstorage service | ||
| After=network.target | ||
|
|
||
| [Service] | ||
| Type=simple | ||
| User=victorialogs | ||
| Group=victorialogs | ||
| Restart=always | ||
| ExecStart=/usr/local/bin/victoria-logs-prod -storageDataPath=/var/lib/vlstorage | ||
|
|
||
| PrivateTmp=yes | ||
| ProtectHome=yes | ||
| NoNewPrivileges=yes | ||
| ProtectSystem=full | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target | ||
| END' | ||
| ``` | ||
|
|
||
| 3. Start and Enable `vlstorage`: | ||
|
|
||
| ```sh | ||
| sudo systemctl daemon-reload && sudo systemctl enable --now vlstorage | ||
| ``` | ||
|
|
||
| 4. Check that the service started successfully: | ||
|
|
||
| ```sh | ||
| sudo systemctl status vlstorage | ||
| ``` | ||
|
|
||
| 5. After `vlstorage` is in `Running` state, confirm the service is healthy by visiting `http://<ip_or_hostname>:9428/health` link. | ||
| It should return `OK`. | ||
|
|
||
| #### Installing vlinsert | ||
|
|
||
| 1. Create a Linux Service for `vlinsert` by running the following command: | ||
|
|
||
| ```sh | ||
| sudo bash -c 'cat <<END >/etc/systemd/system/vlinsert.service | ||
| [Unit] | ||
| Description=VictoriaLogs vlinsert service | ||
| After=network.target | ||
|
|
||
| [Service] | ||
| Type=simple | ||
| User=victorialogs | ||
| Group=victorialogs | ||
| Restart=always | ||
| ExecStart=/usr/local/bin/victoria-logs-prod -storageNode=<list of vlstorages> -select.disable | ||
|
|
||
| PrivateTmp=yes | ||
| ProtectHome=yes | ||
| NoNewPrivileges=yes | ||
| ProtectSystem=full | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target | ||
| END' | ||
| ``` | ||
|
|
||
| Replace `<list of vlstorages>` with comma-separated addresses of previously configured `vlstorage` services | ||
| (e.g. `vlstorage-1:9428,vlstorage-2:9428`). See more details in the `-storageNode` flag description | ||
| in [cluster docs](https://docs.victoriametrics.com/victorialogs/cluster/#architecture). | ||
| The `-select.disable` flag makes this node serve the [insert APIs](https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-apis) only. | ||
|
|
||
| 2. Start and Enable `vlinsert`: | ||
|
|
||
| ```sh | ||
| sudo systemctl daemon-reload && sudo systemctl enable --now vlinsert.service | ||
| ``` | ||
|
|
||
| 3. Check that the service started successfully: | ||
|
|
||
| ```sh | ||
| sudo systemctl status vlinsert.service | ||
| ``` | ||
|
|
||
| 4. After `vlinsert` is in `Running` state, confirm the service is healthy by visiting `http://<ip_or_hostname>:9428/health` link. | ||
| It should return `OK`. | ||
|
|
||
| #### Installing vlselect | ||
|
|
||
| 1. Create a Linux Service for `vlselect` by running the following command: | ||
|
|
||
| ```sh | ||
| sudo bash -c 'cat <<END >/etc/systemd/system/vlselect.service | ||
| [Unit] | ||
| Description=VictoriaLogs vlselect service | ||
| After=network.target | ||
|
|
||
| [Service] | ||
| Type=simple | ||
| User=victorialogs | ||
| Group=victorialogs | ||
| Restart=always | ||
| ExecStart=/usr/local/bin/victoria-logs-prod -storageNode=<list of vlstorages> -insert.disable | ||
|
|
||
| PrivateTmp=yes | ||
| ProtectHome=yes | ||
| NoNewPrivileges=yes | ||
| ProtectSystem=full | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target | ||
| END' | ||
| ``` | ||
|
|
||
| Replace `<list of vlstorages>` with comma-separated addresses of previously configured `vlstorage` services, | ||
| the same way as for `vlinsert`. The `-insert.disable` flag makes this node serve | ||
| the [select APIs](https://docs.victoriametrics.com/victorialogs/querying/#http-api) only. | ||
|
|
||
| 2. Start and Enable `vlselect`: | ||
|
|
||
| ```sh | ||
| sudo systemctl daemon-reload && sudo systemctl enable --now vlselect.service | ||
| ``` | ||
|
|
||
| 3. Check that the service started successfully: | ||
|
|
||
| ```sh | ||
| sudo systemctl status vlselect.service | ||
| ``` | ||
|
|
||
| 4. After `vlselect` is in `Running` state, confirm the service is healthy by visiting `http://<ip_or_hostname>:9428/select/vmui` link. | ||
| It should open the [Web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui) page. | ||
|
|
||
| See also: | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.