Add script files of test and spdk-ansible for SPDK
[stor4nfv.git] / src / spdk / ansible / README.md
1 # spdk-ansible: deploy spdk
2 ## Install ssh server
3     sudo apt-get install openssh-server
4
5     if you use root to run spdk-ansible, you should open the file of
6     /etc/ssh/sshd_config and modify:
7     PermitRootLogin yes
8     sudo /etc/init.d/ssh restart
9
10     generate ssh-token:
11     ssh-keygen -t rsa
12     ssh-copy-id -i ~/.ssh/id_rsa.pub <romte_ip(eg: username@hostName or username@hostIp)>
13
14 ##  Install the ansible tool:
15     sudo add-apt-repository ppa:ansible/ansible
16     sudo apt-get update
17     sudo apt-get install ansible
18
19 ##  Configure Inventory, default in /etc/ansible/hosts:
20     [spdk_server]
21     your_host_name or your_host_ip
22
23 ##  Check if the hosts could be reached:
24     ansible all -m ping
25
26 ##  Download spdk-ansible
27     git clone https://github.com/hellowaywewe/spdk-ansible.git
28
29 ##  configure spdk-ansible
30     Configure common.yml according to required vars.
31     Configure site.yml according to required tasks.
32
33 ## Run ansible playbook: (under spdk-ansible root directory)
34     ansible-playbook site.yml  --extra-vars "ansible_sudo_pass=your_user_password"
35     if you use root to run,you can execute directly:
36     ansible-playbook site.yml