Update stor4nfv install scripts according to opensds aruba release
[stor4nfv.git] / ci / ansible / README.md
diff --git a/ci/ansible/README.md b/ci/ansible/README.md
deleted file mode 100644 (file)
index 8e86694..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-# opensds-ansible\r
-This is an installation tool for opensds using ansible.\r
-\r
-## 1. How to install an opensds local cluster\r
-### Pre-config (Ubuntu 16.04)\r
-First download some system packages:\r
-```\r
-sudo apt-get install -y openssh-server git make gcc\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
-To install ansible, you can run `install_ansible.sh` directly or input these commands below:\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
-### Configure opensds cluster variables:\r
-##### System environment:\r
-Configure these variables below in `group_vars/common.yml`:\r
-```yaml\r
-opensds_release: v0.1.4 # The version should be at least v0.1.4.\r
-nbp_release: v0.1.0 # The version should be at least v0.1.0.\r
-\r
-container_enabled: <false_or_true>\r
-```\r
-\r
-If you want to integrate OpenSDS with cloud platform (for example k8s), please modify `nbp_plugin_type` variable in `group_vars/common.yml`:\r
-```yaml\r
-nbp_plugin_type: standalone # standalone is the default integration way, but you can change it to 'csi', 'flexvolume'\r
-```\r
-\r
-#### Database configuration\r
-Currently OpenSDS adopts `etcd` as database backend, and the default db endpoint is `localhost:2379,localhost:2380`. But to avoid some conflicts with existing environment (k8s local cluster), we suggest you change the port of etcd cluster in `group_vars/osdsdb.yml`:\r
-```yaml\r
-db_endpoint: localhost:62379,localhost:62380\r
-\r
-etcd_host: 127.0.0.1\r
-etcd_port: 62379\r
-etcd_peer_port: 62380\r
-```\r
-\r
-##### LVM\r
-If `lvm` is chosen as storage backend, modify `group_vars/osdsdock.yml`:\r
-```yaml\r
-enabled_backend: lvm # Change it according to the chosen backend. Supported backends include 'lvm', 'ceph', and 'cinder'\r
-pv_devices: # Specify block devices and ensure them existed if you choose lvm\r
-  #- /dev/sdc\r
-  #- /dev/sdd\r
-vg_name: "specified_vg_name" # Specify a name for VG if choosing lvm\r
-```\r
-Modify ```group_vars/lvm/lvm.yaml```, change pool name to be the same as `vg_name` above:\r
-```yaml\r
-"vg001" # change pool name to be the same as vg_name\r
-```\r
-##### Ceph\r
-If `ceph` is chosen as storage backend, modify `group_vars/osdsdock.yml`:\r
-```yaml\r
-enabled_backend: ceph # Change it according to the chosen backend. Supported backends include 'lvm', 'ceph', and 'cinder'.\r
-ceph_pools: # Specify pool name randomly if choosing ceph\r
-  - rbd\r
-  #- ssd\r
-  #- sas\r
-```\r
-Modify ```group_vars/ceph/ceph.yaml```, change pool name to be the same as `ceph_pool_name`. But if you enable multiple pools, please append the current pool format:\r
-```yaml\r
-"rbd" # change pool name to be the same as ceph pool\r
-```\r
-Configure two files under ```group_vars/ceph```: `all.yml` and `osds.yml`. Here is an example:\r
-\r
-```group_vars/ceph/all.yml```:\r
-```yml\r
-ceph_origin: repository\r
-ceph_repository: community\r
-ceph_stable_release: luminous # Choose luminous as default version\r
-public_network: "192.168.3.0/24" # Run 'ip -4 address' to check the ip address\r
-cluster_network: "{{ public_network }}"\r
-monitor_interface: eth1 # Change to the network interface on the target machine\r
-```\r
-```group_vars/ceph/osds.yml```:\r
-```yml\r
-devices: # For ceph devices, append ONE or MULTIPLE devices like the example below:\r
-    - '/dev/sda' # Ensure this device exists and available if ceph is chosen\r
-    - '/dev/sdb' # Ensure this device exists and available if ceph is chosen\r
-osd_scenario: collocated\r
-```\r
-\r
-##### Cinder\r
-If `cinder` is chosen as storage backend, modify `group_vars/osdsdock.yml`:\r
-```yaml\r
-enabled_backend: cinder # Change it according to the chosen backend. Supported backends include 'lvm', 'ceph', and 'cinder'\r
-\r
-# Use block-box install cinder_standalone if true, see details in:\r
-use_cinder_standalone: true\r
-# If true, you can configure cinder_container_platform,  cinder_image_tag,\r
-# cinder_volume_group.\r
-\r
-# Default: debian:stretch, and ubuntu:xenial, centos:7 is also supported.\r
-cinder_container_platform: debian:stretch\r
-# The image tag can be arbitrarily modified, as long as follow the image naming\r
-# conventions, default: debian-cinder\r
-cinder_image_tag: debian-cinder\r
-# The cinder standalone use lvm driver as default driver, therefore `volume_group`\r
-# should be configured, the default is: cinder-volumes. The volume group will be\r
-# removed when use ansible script clean environment.\r
-cinder_volume_group: cinder-volumes\r
-```\r
-\r
-Configure the auth and pool options to access cinder in `group_vars/cinder/cinder.yaml`. Do not need to make additional configure changes if using cinder standalone.\r
-\r
-### Check if the hosts can be reached\r
-```bash\r
-sudo ansible all -m ping -i local.hosts\r
-```\r
-\r
-### Run opensds-ansible playbook to start deploy\r
-```bash\r
-sudo ansible-playbook site.yml -i local.hosts\r
-```\r
-\r
-## 2. How to test opensds cluster\r
-\r
-### Configure opensds CLI tool\r
-```bash\r
-sudo cp /opt/opensds-{opensds-release}-linux-amd64/bin/osdsctl /usr/local/bin\r
-export OPENSDS_ENDPOINT=http://127.0.0.1:50040\r
-export OPENSDS_AUTH_STRATEGY=noauth\r
-\r
-osdsctl pool list # Check if the pool resource is available\r
-```\r
-\r
-### Create a default profile first.\r
-```\r
-osdsctl profile create '{"name": "default", "description": "default policy"}'\r
-```\r
-\r
-### Create a volume.\r
-```\r
-osdsctl volume create 1 --name=test-001\r
-```\r
-For cinder, az needs to be specified.\r
-```\r
-osdsctl volume create 1 --name=test-001 --az nova\r
-```\r
-\r
-### List all volumes.\r
-```\r
-osdsctl volume list\r
-```\r
-\r
-### Delete the volume.\r
-```\r
-osdsctl volume delete <your_volume_id>\r
-```\r
-\r
-\r
-## 3. How to purge and clean opensds cluster\r
-\r
-### Run opensds-ansible playbook to clean the environment\r
-```bash\r
-sudo ansible-playbook clean.yml -i local.hosts\r
-```\r
-\r
-### Run ceph-ansible playbook to clean ceph cluster if ceph is deployed\r
-```bash\r
-cd /opt/ceph-ansible\r
-sudo ansible-playbook infrastructure-playbooks/purge-cluster.yml -i ceph.hosts\r
-```\r
-\r
-### Remove ceph-ansible source code (optional)\r
-```bash\r
-cd ..\r
-sudo rm -rf /opt/ceph-ansible\r
-```\r