ceph-installer/README.md

28 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

ceph-on-lxd-by-terraform
====
I dont know how to name it correctly.
Эти манифесты создадут виртуалки под CEPH, проект, по одному диску для каждого OSD и отдельную сеть с NAT'ом. Также на каждую ноду будет разложен ssh ключ и /etc/hosts.
Сначала надо прогнать терраформ, затем запустить ансибл плейбук. В папке data/ должны лежать ключи и инвентарь для ансибла
Перед запуском надо:
- Сгенерировать ssh ключ в данной репе под именем `ceph_key` и `ceph_key.pub`, положить ключи в data/
- Проверить что на компьютере есть lxd клиент и он направлен на нужный remote (или можно использовать локалхост)
- Конечно же `terraform init`
# TLDR:
- `cd data/`
- `ssh-keygen -f ceph_key`
- `cd ../terraform`
- `terraform init`
- `terraform plan`
- `terraform apply`
- `cd ../data`
- `ansible-playbook -i inventory ../ansible/playbook.yml`
- `lxc shell ceph-mon-1 --profile ceph`
- `cephadm bootstrap --mon-ip 10.99.99.10 --initial-dashboard-user cephuser --initial-dashboard-password $(pwgen -1) --ssh-private-key /root/.ssh/id_ed25519 --ssh-public-key /root/.ssh/id_ed25519.pub --ssh-user root --dashboard-password-noupdate --allow-fqdn-hostname`
- А дальше сам