init docs directory
[stor4nfv.git] / ci / nbp-ansible / README.md
1 # nbp-ansible\r
2 This is an installation tool for opensds northbound plugins using ansible.\r
3 \r
4 ## Install work\r
5 \r
6 ### Pre-config (Ubuntu 16.04)\r
7 First download some system packages:\r
8 ```\r
9 sudo apt-get install -y openssh-server git\r
10 ```\r
11 Then config ```/etc/ssh/sshd_config``` file and change one line:\r
12 ```conf\r
13 PermitRootLogin yes\r
14 ```\r
15 Next generate ssh-token:\r
16 ```bash\r
17 ssh-keygen -t rsa\r
18 ssh-copy-id -i ~/.ssh/id_rsa.pub <ip_address> # IP address of the target machine of the installation\r
19 ```\r
20 \r
21 ### Install ansible tool\r
22 ```bash\r
23 sudo add-apt-repository ppa:ansible/ansible # This step is needed to upgrade ansible to version 2.4.2 which is required for the ceph backend.\r
24 sudo apt-get update\r
25 sudo apt-get install ansible\r
26 ansible --version # Ansible version 2.4.2 or higher is required for ceph; 2.0.0.2 or higher is needed for other backends.\r
27 ```\r
28 \r
29 ### Configure nbp plugin variable\r
30 ##### Common environment:\r
31 Configure the ```nbp_plugin_type``` in `group_vars/common.yml` according to your environment:\r
32 ```yaml\r
33 nbp_plugin_type: flexvolume # flexvolume is the default integration way, but you can change it from 'csi', 'flexvolume'\r
34 ```\r
35 \r
36 ### Check if the hosts can be reached\r
37 ```bash\r
38 sudo ansible all -m ping -i nbp.hosts\r
39 ```\r
40 \r
41 ### Run opensds-ansible playbook to start deploy\r
42 ```bash\r
43 sudo ansible-playbook site.yml -i nbp.hosts\r
44 ```\r
45 \r
46 ## Uninstall work\r
47 \r
48 ### Run nbp-ansible playbook to clean the environment\r
49 ```bash\r
50 sudo ansible-playbook clean.yml -i nbp.hosts\r
51 ```\r