]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/ssh/README.md
update download target update for octopus release
[ceph.git] / ceph / src / pybind / mgr / ssh / README.md
CommitLineData
11fdf7f2
TL
1# dev environment setup
2
31. start vms with _only_ the ceph packages installed
4
5In `src/pybind/mgr/ssh` run `vagrant up` to create a cluster with a monitor,
6manager, and osd nodes. The osd node will have two small extra disks attached.
7
82. generate an `ssh_config` file for the vm hosts
9
10Execute `vagrant ssh-config > /path/to/ssh_config` to generate a ssh
11configuration file that contains hosts, usernames, and keys that will be used by
12the bootstrap cluster / ssh orchestrator to establish ssh connections to the
13vagrant vms.
14
153. install ssh orchestrator dependencies
16
17The primary dependency is the `remoto` package that contains a Python SSH client
18for connecting to remote nodes and executing commands.
19
20Install with `dnf install python3-remoto`. The version must be >= 0.0.35. At the
21time of writing this version is being packaged and is not available. To install
22from source:
23
24```
25git clone https://github.com/ceph/remoto
26cd remoto
27python3 setup.py sdist
28pip3 install --prefix=/usr dist/remoto-0.0.35.tar.gz
29```
30
314. start the bootstrap cluster (in this case a `vstart.sh` cluster)
32
33Start with a network binding to which the vms can route traffic:
34
35 `vstart.sh -n -i 192.168.121.1`
36
37The following is a manual method for finding this address. TODO: documenting a
38automated/deterministic method would be very helpful.
39
40First, ensure that your firewall settings permit each VM to communicate with the
41host. On Fedora, the `trusted` profile is sufficient: `firewall-cmd
42--set-default-zone trusted` and also allows traffic on Ceph ports. Then ssh into
43one of the vm nodes and ping the default gateway, which happens to be setup as
44the host machine.
45
46```
47[nwatkins@smash ssh]$ vagrant ssh mon0 -c "getent hosts gateway"
48192.168.121.1 gateway
49```
50
515. setup the ssh orchestrator backend
52
53Enable and configure the ssh orchestrator as the active backend:
54
55```
56ceph mgr module enable ssh
57ceph orchestrator set backend ssh
58
59# optional: this document assumes the orchestrator CLI is enabled
60ceph mgr module enable orchestrator_cli
61```
62
63Configure the ssh orchestrator by setting the `ssh_config` option to point at
64the ssh configuration file generated above:
65
66```
67ceph config set mgr mgr/ssh/ssh_config_file /path/to/config
68```
69
70The setting can be confirmed by retrieving the configuration settings:
71
72```
73[nwatkins@smash build]$ ceph config get mgr.
74WHO MASK LEVEL OPTION VALUE RO
75mgr advanced mgr/orchestrator_cli/orchestrator ssh *
76mgr advanced mgr/ssh/ssh_config_file /home/nwatkins/src/ceph/src/pybind/mgr/ssh/config *
77```
78
79An SSH config file can also be provided through standard input that avoids the
80need to have an accessible file path. Use the following command:
81
82
83```
84ceph ssh set-ssh-config -i <path to ssh_config>
85```
86
87The next set of instructions we should move to the docs folder
88
89ceph orchestrator host add osd0
90ceph orchestrator host add mgr0
91ceph orchestrator host add mon0
92ceph orchestrator device ls
93ceph orchestrator mgr update 3 mgr0 mgr1