Support containerized Vitastor installations
This commit is contained in:
@@ -14,8 +14,12 @@
|
||||
|
||||
{{../../installation/packages.en.md}}
|
||||
|
||||
{{../../installation/docker.en.md}}
|
||||
|
||||
{{../../installation/proxmox.en.md}}
|
||||
|
||||
{{../../installation/opennebula.en.md}}
|
||||
|
||||
{{../../installation/openstack.en.md}}
|
||||
|
||||
{{../../installation/kubernetes.en.md}}
|
||||
|
||||
@@ -14,8 +14,12 @@
|
||||
|
||||
{{../../installation/packages.ru.md}}
|
||||
|
||||
{{../../installation/docker.ru.md}}
|
||||
|
||||
{{../../installation/proxmox.ru.md}}
|
||||
|
||||
{{../../installation/opennebula.ru.md}}
|
||||
|
||||
{{../../installation/openstack.ru.md}}
|
||||
|
||||
{{../../installation/kubernetes.ru.md}}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
[Documentation](../../README.md#documentation) → Installation → Dockerized Installation
|
||||
|
||||
-----
|
||||
|
||||
[Читать на русском](docker.ru.md)
|
||||
|
||||
# Dockerized Installation
|
||||
|
||||
Vitastor may be installed in Docker/Podman. In such setups etcd, monitors and OSD
|
||||
all run in containers, but everything else looks as close as possible to a usual
|
||||
setup with packages:
|
||||
- host network is used
|
||||
- auto-start is implemented through udev and systemd
|
||||
- logs are written to journald (not docker json log files)
|
||||
- command-line wrapper scripts are installed to the host system to call vitastor-disk,
|
||||
vitastor-cli and others through the container
|
||||
|
||||
Such installations may be useful when it's impossible or inconvenient to install
|
||||
Vitastor from packages, for example, in exotic Linux distributions.
|
||||
|
||||
If you don't want just a simple containerized installation, you can also take a look
|
||||
at Vitastor Kubernetes operator: https://github.com/Antilles7227/vitastor-operator
|
||||
|
||||
## Installing Containers
|
||||
|
||||
The instruction is very simple.
|
||||
|
||||
1. Download a Docker image of the desired version: \
|
||||
`docker pull vitastor:1.10.2`
|
||||
2. Install scripts to the host system: \
|
||||
`docker run --rm -it -v /etc:/host-etc -v /usr/bin:/host-bin vitastor:1.10.2 install.sh`
|
||||
3. Reload udev rules: \
|
||||
`udevadm control --reload-rules`
|
||||
|
||||
And you can return to [Quick Start](../intro/quickstart.en.md).
|
||||
|
||||
## Upgrading Containers
|
||||
|
||||
First make sure to check the topic [Upgrading Vitastor](../usage/admin.en.md#upgrading-vitastor)
|
||||
to figure out if you need any additional steps.
|
||||
|
||||
Then, to upgrade a containerized installation, you just need to change the `VITASTOR_VERSION`
|
||||
option in `/etc/vitastor/docker.conf` and restart all Vitastor services:
|
||||
|
||||
`systemctl restart vitastor.target`
|
||||
|
||||
## QEMU
|
||||
|
||||
Vitastor Docker image also contains QEMU, qemu-img and qemu-storage-daemon built with Vitastor support.
|
||||
|
||||
However, running QEMU in Docker is harder to setup and it depends on the used virtualization UI
|
||||
(OpenNebula, Proxmox and so on). Some of them also required patched Libvirt.
|
||||
|
||||
That's why containerized installation of Vitastor doesn't contain a ready-made QEMU setup and it's
|
||||
recommended to install QEMU from packages or build it manually.
|
||||
|
||||
## fio
|
||||
|
||||
Vitastor Docker image also contains fio and installs a wrapper called `vitastor-fio` to use it from
|
||||
the host system.
|
||||
@@ -0,0 +1,60 @@
|
||||
[Документация](../../README-ru.md#документация) → Установка → Установка в Docker
|
||||
|
||||
-----
|
||||
|
||||
[Read in English](docker.en.md)
|
||||
|
||||
# Установка в Docker
|
||||
|
||||
Vitastor можно установить в Docker/Podman. При этом etcd, мониторы и OSD запускаются
|
||||
в контейнерах, но всё остальное выглядит максимально приближенно к установке из пакетов:
|
||||
- используется сеть хост-системы
|
||||
- для автозапуска используются udev и systemd
|
||||
- журналы записываются в journald (не в json-файлы журналов docker)
|
||||
- в хост-систему устанавливаются обёртки для вызова консольных инструментов vitastor-disk,
|
||||
vitastor-cli и других через контейнер
|
||||
|
||||
Такая установка полезна тогда, когда установка из пакетов невозможна или неудобна,
|
||||
например, в нестандартных Linux-дистрибутивах.
|
||||
|
||||
Если вам нужна не просто контейнеризованная инсталляция, вы также можете обратить внимание
|
||||
на Vitastor Kubernetes-оператор: https://github.com/Antilles7227/vitastor-operator
|
||||
|
||||
## Установка контейнеров
|
||||
|
||||
Инструкция по установке максимально простая.
|
||||
|
||||
1. Скачайте Docker-образ желаемой версии: \
|
||||
`docker pull vitastor:1.10.2`
|
||||
2. Установите скрипты в хост-систему командой: \
|
||||
`docker run --rm -it -v /etc:/host-etc -v /usr/bin:/host-bin vitastor:1.10.2 install.sh`
|
||||
3. Перезагрузите правила udev: \
|
||||
`udevadm control --reload-rules`
|
||||
|
||||
После этого вы можете возвращаться к разделу [Быстрый старт](../intro/quickstart.ru.md).
|
||||
|
||||
## Обновление контейнеров
|
||||
|
||||
Сначала обязательно проверьте раздел [Обновление Vitastor](../usage/admin.ru.md#обновление-vitastor),
|
||||
чтобы понять, не требуются ли вам какие-то дополнительные действия.
|
||||
|
||||
После этого для обновления Docker-инсталляции вам нужно просто поменять опцию `VITASTOR_VERSION`
|
||||
в файле `/etc/vitastor/docker.conf` и перезапустить все сервисы Vitastor командой:
|
||||
|
||||
`systemctl restart vitastor.target`
|
||||
|
||||
## QEMU
|
||||
|
||||
В Docker-образ также входят QEMU, qemu-img и qemu-storage-daemon, собранные с поддержкой Vitastor.
|
||||
|
||||
Однако настроить запуск QEMU в Docker сложнее и способ запуска зависит от используемого интерфейса
|
||||
виртуализации (OpenNebula, Proxmox и т.п.). Также для OpenNebula, например, требуется патченый
|
||||
Libvirt.
|
||||
|
||||
Поэтому по умолчанию Docker-сборка пока что не включает в себя готового способа запуска QEMU
|
||||
и QEMU рекомендуется устанавливать из пакетов или собирать самостоятельно.
|
||||
|
||||
## fio
|
||||
|
||||
fio также входит в Docker-контейнер vitastor, и в хост-систему устанавливается обёртка `vitastor-fio`
|
||||
для запуска fio в контейнер.
|
||||
@@ -26,7 +26,7 @@
|
||||
you also need small SSDs for journal and metadata (even 2 GB per 1 TB of HDD space is enough).
|
||||
- Get a fast network (at least 10 Gbit/s). Something like Mellanox ConnectX-4 with RoCEv2 is ideal.
|
||||
- Disable CPU powersaving: `cpupower idle-set -D 0 && cpupower frequency-set -g performance`.
|
||||
- [Install Vitastor packages](../installation/packages.en.md).
|
||||
- Either [install Vitastor packages](../installation/packages.en.md) or [install Vitastor in Docker](../installation/docker.en.md).
|
||||
|
||||
## Recommended drives
|
||||
|
||||
@@ -45,7 +45,8 @@ On the monitor hosts:
|
||||
}
|
||||
```
|
||||
- Create systemd units for etcd by running: `/usr/lib/vitastor/mon/make-etcd`
|
||||
- Start etcd and monitors: `systemctl enable --now etcd vitastor-mon`
|
||||
Or, if you installed Vitastor in Docker, run `systemctl start vitastor-host; docker exec vitastor make-etcd`.
|
||||
- Start etcd and monitors: `systemctl enable --now vitastor-etcd vitastor-mon`
|
||||
|
||||
## Configure OSDs
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
обязательно возьмите SSD под метаданные и журнал (маленькие, буквально 2 ГБ на 1 ТБ HDD-места).
|
||||
- Возьмите быструю сеть, минимум 10 гбит/с. Идеал - что-то вроде Mellanox ConnectX-4 с RoCEv2.
|
||||
- Для лучшей производительности отключите энергосбережение CPU: `cpupower idle-set -D 0 && cpupower frequency-set -g performance`.
|
||||
- [Установите пакеты Vitastor](../installation/packages.ru.md).
|
||||
- Либо [установите пакеты Vitastor](../installation/packages.ru.md), либо [установите Vitastor в Docker](../installation/docker.ru.md).
|
||||
|
||||
## Рекомендуемые диски
|
||||
|
||||
@@ -44,8 +44,9 @@
|
||||
"etcd_address": ["10.200.1.10:2379","10.200.1.11:2379","10.200.1.12:2379"]
|
||||
}
|
||||
```
|
||||
- Инициализируйте сервисы etcd, запустив `/usr/lib/vitastor/mon/make-etcd`
|
||||
- Запустите etcd и мониторы: `systemctl enable --now etcd vitastor-mon`
|
||||
- Инициализируйте сервисы etcd, запустив `/usr/lib/vitastor/mon/make-etcd`.\
|
||||
Либо, если вы установили Vitastor в Docker, запустите `systemctl start vitastor-host; docker exec vitastor make-etcd`.
|
||||
- Запустите etcd и мониторы: `systemctl enable --now vitastor-etcd vitastor-mon`
|
||||
|
||||
## Настройте OSD
|
||||
|
||||
|
||||
Reference in New Issue
Block a user