Add nbp-ansible script to deploy opensds northbound plugins
[stor4nfv.git] / ci / nbp-ansible / README.md
diff --git a/ci/nbp-ansible/README.md b/ci/nbp-ansible/README.md
new file mode 100644 (file)
index 0000000..391bcc3
--- /dev/null
@@ -0,0 +1,47 @@
+# nbp-ansible\r
+This is an installation tool for opensds northbound plugins using ansible.\r
+\r
+## Install work\r
+\r
+### Pre-config (Ubuntu 16.04)\r
+First download some system packages:\r
+```\r
+sudo apt-get install -y openssh-server git\r
+```\r
+Then config ```/etc/ssh/sshd_config``` file and change one line:\r
+```conf\r
+PermitRootLogin yes\r
+```\r
+Next generate ssh-token:\r
+```bash\r
+ssh-keygen -t rsa\r
+ssh-copy-id -i ~/.ssh/id_rsa.pub <ip_address> # IP address of the target machine of the installation\r
+```\r
+\r
+### Install docker\r
+If use a standalone cinder as backend, you also need to install docker to run cinder service. Please see the [docker installation document](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/) for details.\r
+\r
+### Install ansible tool\r
+```bash\r
+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
+sudo apt-get update\r
+sudo apt-get install ansible\r
+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
+```\r
+\r
+### Check if the hosts can be reached\r
+```bash\r
+sudo ansible all -m ping -i nbp.hosts\r
+```\r
+\r
+### Run opensds-ansible playbook to start deploy\r
+```bash\r
+sudo ansible-playbook site.yml -i nbp.hosts\r
+```\r
+\r
+## Uninstall work\r
+\r
+### Run nbp-ansible playbook to clean the environment\r
+```bash\r
+sudo ansible-playbook clean.yml -i nbp.hosts\r
+```\r