Download this Image
The image is available on cgr.dev
:
docker pull cgr.dev/chainguard/victoriametrics-fips:latest
VictoriaMetrics (Fips) can be deployed as a single node (all image tags without a "-cluster" suffix) or as a distributed cluster. See the github repository for reference: https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master as well as their public facing documentation: https://docs.victoriametrics.com/
In clustered mode, the VictoriaMetrics application itself is broken into 3 different services:
- vmstorage - stores the raw data and returns the queried data on the given time range for the given label filters
- vminsert - accepts the ingested data and spreads it among vmstorage nodes according to consistent hashing over metric name and all its labels
- vmselect - performs incoming queries by fetching the needed data from all the configured vmstorage nodes
This image group also contains several standalone services (that DO vary between clustered and single mode):
- vmagent - A lightweight metrics collection agent.
- vmauth - A service that provides authentication and authorization for VictoriaMetrics services. It acts as HTTP proxy, which can authorize, route and load balance requests across VictoriaMetrics components or any other HTTP backends.
Usage
You can install the VictoriaMetrics components using Helm. Below are the Helm install commands for each component:
Install vmagent
helm install vmagent victoria-metrics-agent --repo https://victoriametrics.github.io/helm-charts/ \
--namespace victoriametrics \
--set image.repository=cgr.dev/chainguard-private/victoriametrics-vmagent-fips \
--set image.tag=latest
Install vmauth
helm install vmauth victoria-metrics-auth --repo https://victoriametrics.github.io/helm-charts/ \
--namespace victoriametrics \
--set image.repository=cgr.dev/chainguard-private/victoriametrics-vmauth-fips \
--set image.tag=latest
Note: You will need to set the config and for sample testing purpose, you can take inspiration from this example:
cat <<YAML | kubectl apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
name: vmauth-config
namespace: victoriametrics
data:
auth.yml: |
users:
- username: "user1"
password: "pass1"
url_prefix: "http://localhost:8428/"
- username: "user2"
password: "pass2"
url_prefix: "http://localhost:8429/"
unauthorized_user:
url_prefix: "http://localhost:8428/"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: vmauth
namespace: victoriametrics
spec:
selector:
matchLabels:
app: vmauth
template:
metadata:
labels:
app: vmauth
spec:
containers:
- name: vmauth
image: cgr.dev/chainguard-private/victoriametrics-vmauth-fips:latest
args:
- "-auth.config=/config/auth.yml"
ports:
- containerPort: 8427
volumeMounts:
- name: vmauth-config
mountPath: /config
volumes:
- name: vmauth-config
configMap:
name: vmauth-config
YAML
Install vminsert
, vmselect
, vmstorage
helm install vminsert victoria-metrics-cluster --repo https://victoriametrics.github.io/helm-charts/ \
--namespace victoriametrics-cluster \
--set vminsert.image.repository=cgr.dev/chainguard-private/victoriametrics-vminsert-fips \
--set vminsert.image.tag=latest \
--set vminsert.image.variant="" \
--set vmselect.image.repository=cgr.dev/chainguard-private/victoriametrics-vmselect-fips \
--set vmselect.image.tag=latest \
--set vmselect.image.variant="" \
--set vmstorage.image.repository=cgr.dev/chainguard-private/victoriametrics-vmstorage-fips \
--set vmstorage.image.tag=latest \
--set vmstorage.image.variant=""
Note: We use vmstorage.image.variant=""
because our images are alredy coming with cluster
suffix, so we no longer need to specify it. For further reference, refer to official docs