diff options
Diffstat (limited to 'ci/ansible')
-rw-r--r-- | ci/ansible/group_vars/common.yml | 32 | ||||
-rw-r--r-- | ci/ansible/group_vars/osdsdb.yml | 3 | ||||
-rw-r--r-- | ci/ansible/group_vars/osdsdock.yml | 7 | ||||
-rw-r--r-- | ci/ansible/group_vars/osdslet.yml | 7 | ||||
-rw-r--r-- | ci/ansible/roles/cleaner/tasks/main.yml | 15 | ||||
-rw-r--r-- | ci/ansible/roles/common/scenarios/release.yml | 6 | ||||
-rw-r--r-- | ci/ansible/roles/common/tasks/main.yml | 22 | ||||
-rw-r--r-- | ci/ansible/roles/dashboard-installer/scenarios/container.yml | 2 | ||||
-rw-r--r-- | ci/ansible/roles/nbp-installer/scenarios/csi.yml | 4 | ||||
-rw-r--r-- | ci/ansible/roles/nbp-installer/scenarios/flexvolume.yml | 33 | ||||
-rw-r--r-- | ci/ansible/roles/nbp-installer/scenarios/release.yml | 8 | ||||
-rw-r--r-- | ci/ansible/roles/nbp-installer/scenarios/repository.yml | 2 | ||||
-rw-r--r-- | ci/ansible/roles/osdsdb/tasks/main.yml | 2 | ||||
-rw-r--r-- | ci/ansible/roles/osdsdock/tasks/main.yml | 14 | ||||
-rw-r--r-- | ci/ansible/roles/osdslet/tasks/main.yml | 6 |
15 files changed, 113 insertions, 50 deletions
diff --git a/ci/ansible/group_vars/common.yml b/ci/ansible/group_vars/common.yml index 50749e6..dab13a7 100644 --- a/ci/ansible/group_vars/common.yml +++ b/ci/ansible/group_vars/common.yml @@ -24,11 +24,15 @@ dummy: # This field indicates which way user prefers to install, currently support
# 'repository', 'release' and 'container'
-install_from: repository
+install_from: release
+
+# This field indicates which os family the system will be running, currently
+# support 'Debian' and 'RedHat'
+ansible_os_family: Debian
# These fields are NOT suggested to be modifie
-opensds_work_dir: /opt/opensds-linux-amd64
-nbp_work_dir: /opt/opensds-k8s-linux-amd64
+opensds_work_dir: /opt/opensds-hotpot-linux-amd64
+nbp_work_dir: /opt/opensds-sushi-linux-amd64
opensds_config_dir: /etc/opensds
opensds_driver_config_dir: "{{ opensds_config_dir }}/driver"
opensds_log_dir: /var/log/opensds
@@ -40,8 +44,8 @@ opensds_log_dir: /var/log/opensds # If user specifies intalling from repository, then he can choose the specific
# repository branch
-opensds_repo_branch: master
-nbp_repo_branch: master
+opensds_repo_branch: stable/aruba
+nbp_repo_branch: stable/aruba
# These fields are NOT suggested to be modified
opensds_remote_url: https://github.com/opensds/opensds.git
@@ -53,21 +57,25 @@ nbp_remote_url: https://github.com/opensds/nbp.git ###########
# If user specifies intalling from release,then he can choose the specific version
-opensds_release: v0.2.0 # The version should be at least v0.2.0
-nbp_release: v0.2.0 # The version should be at least v0.2.0
+opensds_release: v0.2.1 # The version should be at least v0.2.1
+nbp_release: v0.2.1 # The version should be at least v0.2.1
# These fields are NOT suggested to be modified
-opensds_download_url: https://github.com/opensds/opensds/releases/download/{{ opensds_release }}/opensds-{{ opensds_release }}-linux-amd64.tar.gz
-opensds_tarball_dir: /tmp/opensds-{{ opensds_release }}-linux-amd64
-nbp_download_url: https://github.com/opensds/nbp/releases/download/{{ nbp_release }}/opensds-k8s-{{ nbp_release }}-linux-amd64.tar.gz
-nbp_tarball_dir: /tmp/opensds-k8s-{{ nbp_release }}-linux-amd64
+opensds_download_url: https://github.com/opensds/opensds/releases/download/{{ opensds_release }}/opensds-hotpot-{{ opensds_release }}-linux-amd64.tar.gz
+opensds_tarball_dir: /tmp/opensds-hotpot-{{ opensds_release }}-linux-amd64
+nbp_download_url: https://github.com/opensds/nbp/releases/download/{{ nbp_release }}/opensds-sushi-{{ nbp_release }}-linux-amd64.tar.gz
+nbp_tarball_dir: /tmp/opensds-sushi-{{ nbp_release }}-linux-amd64
#############
# CONTAINER #
#############
-container_enabled: false
+opensds_image_tag: aruba
+
+# These fields are NOT suggested to be modified
+controller_docker_image: opensdsio/opensds-controller:{{ opensds_image_tag }}
+dock_docker_image: opensdsio/opensds-dock:{{ opensds_image_tag }}
###########
diff --git a/ci/ansible/group_vars/osdsdb.yml b/ci/ansible/group_vars/osdsdb.yml index 1ad176e..9093a04 100644 --- a/ci/ansible/group_vars/osdsdb.yml +++ b/ci/ansible/group_vars/osdsdb.yml @@ -45,4 +45,7 @@ etcd_dir: /opt/etcd-{{ etcd_release }}-linux-amd64 # DOCKER #
###########
+etcd_container_enabled: false
+
+# These fields are NOT suggested to be modified
etcd_docker_image: quay.io/coreos/etcd:latest
diff --git a/ci/ansible/group_vars/osdsdock.yml b/ci/ansible/group_vars/osdsdock.yml index c0f54f0..e23a546 100644 --- a/ci/ansible/group_vars/osdsdock.yml +++ b/ci/ansible/group_vars/osdsdock.yml @@ -90,10 +90,3 @@ cinder_name: cinder backend cinder_description: This is a cinder backend service
cinder_driver_name: cinder
cinder_config_path: "{{ opensds_driver_config_dir }}/cinder.yaml"
-
-
-###########
-# DOCKER #
-###########
-
-dock_docker_image: opensdsio/opensds-dock:latest
diff --git a/ci/ansible/group_vars/osdslet.yml b/ci/ansible/group_vars/osdslet.yml index 32c12fe..488ea75 100644 --- a/ci/ansible/group_vars/osdslet.yml +++ b/ci/ansible/group_vars/osdslet.yml @@ -25,10 +25,3 @@ dummy: # These fields are NOT suggested to be modified
controller_endpoint: 0.0.0.0:50040
controller_log_file: "{{ opensds_log_dir }}/osdslet.log"
-
-
-###########
-# DOCKER #
-###########
-
-controller_docker_image: opensdsio/opensds-controller:latest
diff --git a/ci/ansible/roles/cleaner/tasks/main.yml b/ci/ansible/roles/cleaner/tasks/main.yml index 8399b08..ed887c6 100644 --- a/ci/ansible/roles/cleaner/tasks/main.yml +++ b/ci/ansible/roles/cleaner/tasks/main.yml @@ -14,7 +14,7 @@ - name: kill osdslet daemon service
shell: killall osdslet osdsdock
- when: container_enabled == false
+ when: install_from != "container"
ignore_errors: true
- name: kill osdslet containerized service
@@ -22,14 +22,14 @@ name: osdslet
image: "{{ controller_docker_image }}"
state: stopped
- when: container_enabled == true
+ when: install_from == "container"
- name: kill osdsdock containerized service
docker_container:
name: osdsdock
image: "{{ dock_docker_image }}"
state: stopped
- when: container_enabled == true
+ when: install_from == "container"
- name: stop container where dashboard is located
docker_container:
@@ -46,6 +46,15 @@ ignore_errors: yes
when: nbp_plugin_type == "flexvolume"
+- name: clean opensds external provisioner plugin if flexvolume specified
+ shell: |
+ . /etc/profile
+ kubectl delete -f deploy/
+ args:
+ chdir: "{{ nbp_work_dir }}/provisioner"
+ ignore_errors: yes
+ when: nbp_plugin_type == "flexvolume"
+
- name: clean opensds csi plugin if csi plugin specified
shell: |
. /etc/profile
diff --git a/ci/ansible/roles/common/scenarios/release.yml b/ci/ansible/roles/common/scenarios/release.yml index 500d82e..83df8bd 100644 --- a/ci/ansible/roles/common/scenarios/release.yml +++ b/ci/ansible/roles/common/scenarios/release.yml @@ -21,8 +21,9 @@ - name: download and extract the opensds release tarball if not exists unarchive: - src={{ opensds_download_url }} - dest=/tmp/ + src: "{{ opensds_download_url }}" + dest: /tmp/ + remote_src: yes when: - opensdsreleasesexisted.stat.exists is undefined or opensdsreleasesexisted.stat.exists == false @@ -36,3 +37,4 @@ copy: src: "{{ opensds_tarball_dir }}/" dest: "{{ opensds_work_dir }}" + mode: 0755 diff --git a/ci/ansible/roles/common/tasks/main.yml b/ci/ansible/roles/common/tasks/main.yml index daee059..14a28d3 100644 --- a/ci/ansible/roles/common/tasks/main.yml +++ b/ci/ansible/roles/common/tasks/main.yml @@ -31,8 +31,8 @@ apt:
update_cache: yes
-- name: install make, gcc and pip external packages
- apt:
+- name: install system packages
+ package:
name: "{{ item }}"
state: present
with_items:
@@ -40,6 +40,24 @@ - gcc
- python-pip
+- name: install Red Hat system packages
+ package:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - librados-devel
+ - librbd-devel
+ when: ansible_os_family == "RedHat"
+
+- name: install Ubuntu system packages
+ package:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - librados-dev
+ - librbd-dev
+ when: ansible_os_family == "Debian"
+
- name: create opensds work directory if it doesn't exist
file:
path: "{{ item }}"
diff --git a/ci/ansible/roles/dashboard-installer/scenarios/container.yml b/ci/ansible/roles/dashboard-installer/scenarios/container.yml index e25d90f..0c8fe18 100644 --- a/ci/ansible/roles/dashboard-installer/scenarios/container.yml +++ b/ci/ansible/roles/dashboard-installer/scenarios/container.yml @@ -20,7 +20,7 @@ - name: run dashboard containerized service docker_container: name: dashboard - image: opensdsio/dashboard:latest + image: "{{ dashboard_docker_image }}" state: started network_mode: host restart_policy: always diff --git a/ci/ansible/roles/nbp-installer/scenarios/csi.yml b/ci/ansible/roles/nbp-installer/scenarios/csi.yml index 93fff88..ef86967 100644 --- a/ci/ansible/roles/nbp-installer/scenarios/csi.yml +++ b/ci/ansible/roles/nbp-installer/scenarios/csi.yml @@ -19,14 +19,14 @@ regexp: '^ opensdsendpoint' line: ' opensdsendpoint: {{ opensds_endpoint }}' backup: yes - + - name: Configure opensds auth strategy in opensds csi plugin lineinfile: dest: "{{ nbp_work_dir }}/csi/deploy/kubernetes/csi-configmap-opensdsplugin.yaml" regexp: '^ opensdsauthstrategy' line: ' opensdsauthstrategy: {{ opensds_auth_strategy }}' backup: yes - + - name: Configure keystone os auth url in opensds csi plugin lineinfile: dest: "{{ nbp_work_dir }}/csi/deploy/kubernetes/csi-configmap-opensdsplugin.yaml" diff --git a/ci/ansible/roles/nbp-installer/scenarios/flexvolume.yml b/ci/ansible/roles/nbp-installer/scenarios/flexvolume.yml index 52ec16d..2117411 100644 --- a/ci/ansible/roles/nbp-installer/scenarios/flexvolume.yml +++ b/ci/ansible/roles/nbp-installer/scenarios/flexvolume.yml @@ -21,5 +21,36 @@ - name: Copy opensds flexvolume plugin binary file into flexvolume plugin dir
copy:
- src: "{{ nbp_work_dir }}/flexvolume/opensds"
+ src: "{{ nbp_work_dir }}/bin/flexvolume.server.opensds"
dest: "{{ flexvolume_plugin_dir }}/opensds"
+ mode: 0755
+
+- name: Configure opensds endpoint IP in opensds external provisioner plugin
+ lineinfile:
+ dest: "{{ nbp_work_dir }}/provisioner/deploy/configmap.yaml"
+ regexp: '^ opensdsendpoint'
+ line: ' opensdsendpoint: {{ opensds_endpoint }}'
+ backup: yes
+
+- name: Configure opensds auth strategy in opensds external provisioner plugin
+ lineinfile:
+ dest: "{{ nbp_work_dir }}/provisioner/deploy/configmap.yaml"
+ regexp: '^ opensdsauthstrategy'
+ line: ' opensdsauthstrategy: {{ opensds_auth_strategy }}'
+ backup: yes
+
+- name: Configure keystone os auth url in opensds external provisioner plugin
+ lineinfile:
+ dest: "{{ nbp_work_dir }}/provisioner/deploy/configmap.yaml"
+ regexp: '^ osauthurl'
+ line: ' osauthurl: {{ keystone_os_auth_url }}'
+ backup: yes
+ when: opensds_auth_strategy == "keystone"
+
+- name: Prepare and deploy opensds external provisioner plugin
+ shell: |
+ . /etc/profile
+ kubectl create -f deploy/
+ args:
+ chdir: "{{ nbp_work_dir }}/provisioner"
+ ignore_errors: yes
diff --git a/ci/ansible/roles/nbp-installer/scenarios/release.yml b/ci/ansible/roles/nbp-installer/scenarios/release.yml index 89429d7..b528724 100644 --- a/ci/ansible/roles/nbp-installer/scenarios/release.yml +++ b/ci/ansible/roles/nbp-installer/scenarios/release.yml @@ -21,14 +21,15 @@ - name: download and extract the nbp release tarball if not exists unarchive: - src={{ nbp_download_url }} - dest=/tmp/ + src: "{{ nbp_download_url }}" + dest: /tmp/ + remote_src: yes when: - nbpreleasesexisted.stat.exists is undefined or nbpreleasesexisted.stat.exists == false - name: change the mode of all binary files in nbp release file: - path: "{{ nbp_tarball_dir }}/flexvolume" + path: "{{ nbp_tarball_dir }}/bin" mode: 0755 recurse: yes @@ -36,3 +37,4 @@ copy: src: "{{ nbp_tarball_dir }}/" dest: "{{ nbp_work_dir }}" + mode: 0755 diff --git a/ci/ansible/roles/nbp-installer/scenarios/repository.yml b/ci/ansible/roles/nbp-installer/scenarios/repository.yml index fb8059b..0c323d2 100644 --- a/ci/ansible/roles/nbp-installer/scenarios/repository.yml +++ b/ci/ansible/roles/nbp-installer/scenarios/repository.yml @@ -15,7 +15,7 @@ --- - set_fact: go_path: "{{ lookup('env', 'GOPATH') }}" - + - name: check go_path shell: "{{ item }}" with_items: diff --git a/ci/ansible/roles/osdsdb/tasks/main.yml b/ci/ansible/roles/osdsdb/tasks/main.yml index a826d21..396fd9a 100644 --- a/ci/ansible/roles/osdsdb/tasks/main.yml +++ b/ci/ansible/roles/osdsdb/tasks/main.yml @@ -22,4 +22,4 @@ - name: include scenarios/container.yml
include: scenarios/container.yml
- when: db_driver == "etcd" and container_enabled == true
+ when: db_driver == "etcd" and etcd_container_enabled == true
diff --git a/ci/ansible/roles/osdsdock/tasks/main.yml b/ci/ansible/roles/osdsdock/tasks/main.yml index 8b18c8d..dc803b5 100644 --- a/ci/ansible/roles/osdsdock/tasks/main.yml +++ b/ci/ansible/roles/osdsdock/tasks/main.yml @@ -43,16 +43,20 @@ done
args:
chdir: "{{ opensds_work_dir }}"
- when: container_enabled == false
+ when: install_from != "container"
- name: run osdsdock containerized service
docker_container:
name: osdsdock
- image: opensdsio/opensds-dock:latest
+ image: "{{ dock_docker_image }}"
state: started
network_mode: host
privileged: true
volumes:
- - "/etc/opensds/:/etc/opensds"
- - "/etc/ceph/:/etc/ceph"
- when: container_enabled == true
+ - "/etc/opensds:/etc/opensds"
+ - "/etc/ceph:/etc/ceph"
+ - "/dev/:/dev/"
+ - "/run/:/run/:shared"
+ - "/etc/localtime:/etc/localtime:ro"
+ - "/lib/modules:/lib/modules:ro"
+ when: install_from == "container"
diff --git a/ci/ansible/roles/osdslet/tasks/main.yml b/ci/ansible/roles/osdslet/tasks/main.yml index 87ea816..d844e3a 100644 --- a/ci/ansible/roles/osdslet/tasks/main.yml +++ b/ci/ansible/roles/osdslet/tasks/main.yml @@ -27,14 +27,14 @@ done
args:
chdir: "{{ opensds_work_dir }}"
- when: container_enabled == false
+ when: install_from != "container"
- name: run osdslet containerized service
docker_container:
name: osdslet
- image: opensdsio/opensds-controller:latest
+ image: "{{ controller_docker_image }}"
state: started
network_mode: host
volumes:
- "/etc/opensds/:/etc/opensds"
- when: container_enabled == true
+ when: install_from == "container"
|