Skip to content

Commit

Permalink
Merge pull request #93 from opensds/development
Browse files Browse the repository at this point in the history
Merge from Development to Master to prepare for Bali RC2 release
  • Loading branch information
xing-yang authored Dec 8, 2018
2 parents de744af + 62bfb77 commit 104529b
Show file tree
Hide file tree
Showing 39 changed files with 598 additions and 683 deletions.
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
dist: trusty
dist: xenial
language: node_js
sudo: required
node_js:
- node

services:
- docker
- docker-compose

install:
- sudo apt-get update && sudo apt-get install -y nginx
- sudo apt-get update && sudo apt-get install -y apache2
- sudo service apache2 stop
- sudo apt-get install -y nginx

before_script:
# Install ansible 2.4.x
Expand All @@ -18,4 +24,4 @@ script:
- cd ansible && sudo ansible-playbook site.yml -i local.hosts

after_script:
- cd ansible && sudo ansible-playbook clean.yml -i local.hosts
- sudo ansible-playbook clean.yml -i local.hosts
4 changes: 3 additions & 1 deletion ansible/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
vars_files:
- group_vars/common.yml
- group_vars/auth.yml
- group_vars/hotpot.yml
- group_vars/osdsdb.yml
- group_vars/osdslet.yml
- group_vars/osdsdock.yml
- group_vars/gelato.yml
- group_vars/sushi.yml
- group_vars/dashboard.yml
gather_facts: false
become: True
Expand Down
31 changes: 3 additions & 28 deletions ansible/group_vars/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,7 @@ dummy:
opensds_auth_strategy: keystone

# The URL should be replaced with the keystone actual URL
keystone_os_auth_url: http://127.0.0.1/identity
keystone_os_auth_url: "http://{{ host_ip }}/identity"

###############
# Multi-cloud #
###############
# Multicloud authentication strategy, support 'noauth' and 'keystone'.
multicloud_auth_strategy: noauth

# Multi-cloud account info,set for docker-compose.yml
# default 'multicloud'
os_username: multicloud
os_password: opensds@123


# Multi-cloud Account Info,set for docker-compose.yml
# default 'multicloud'
os_username: multicloud
os_password: opensds@123


############
# KEYSTONE #
############

# Execute the unstack.sh
uninstall_keystone: true

# Execute the stack.sh
cleanup_keystone: true
# delete all keystone packages
keystone_uninstall_purge: false
73 changes: 2 additions & 71 deletions ansible/group_vars/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ dummy:
###########

# This field indicates local machine host ip
host_ip: 10.10.3.100
host_ip: 127.0.0.1

# This field indicates which project should be deploy
# 'opensds','multicloud','all'
# 'hotpot', 'gelato' or 'all'
deploy_project: all

# This field indicates which way user prefers to install, currently support
Expand All @@ -36,72 +36,3 @@ 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-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

##############
# multi-cloud #
##############
# This field indicates the location of docker-compose.yml
multicloud_work_dir: /opt/opensds-gelato-linux-amd64
# This field indicates docker-compose.yml download path
compose_down_path: https://raw.githubusercontent.com/opensds/multi-cloud/master/docker-compose.yml


##############
# REPOSITORY #
##############

# If user specifies intalling from repository, then he can choose the specific
# repository branch
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
nbp_remote_url: https://github.com/opensds/nbp.git
multi_remote_url: https://github.com/opensds/multi-cloud.git

###########
# RELEASE #
###########

# If user specifies intalling from release,then he can choose the specific version
opensds_release: v0.3.3 # The version should be at least v0.2.1
nbp_release: v0.3.3 # 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-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 #
#############

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 }}


###########
# PLUGIN #
###########

# 'hotpot_only' is the default integration way, but you can change it to 'csi'
# or 'flexvolume'
nbp_plugin_type: hotpot_only
# The IP (127.0.0.1) should be replaced with the opensds actual endpoint IP
opensds_endpoint: http://127.0.0.1:50040

# These fields are NOT suggested to be modified
flexvolume_plugin_dir: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/opensds.io~opensds
4 changes: 3 additions & 1 deletion ansible/group_vars/dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ dummy:
# Dashboard installation types are: 'container', 'source_code'
dashboard_installation_type: container

# These fields are NOT suggested to be modified
dashboard_work_dir: /opt/opensds-dashboard-linux-amd64


##########
# DOCKER #
Expand All @@ -42,5 +45,4 @@ dashboard_docker_image: opensdsio/dashboard:latest
dashboard_repo_branch: master

# These fields are NOT suggested to be modified
dashboard_work_dir: /opt/opensds-dashboard
dashboard_remote_url: https://github.com/opensds/opensds-dashboard.git
24 changes: 22 additions & 2 deletions ansible/group_vars/osdslet.yml → ansible/group_vars/gelato.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,26 @@ dummy:
# GENERAL #
###########


# These fields are NOT suggested to be modifie
gelato_work_dir: /opt/opensds-gelato-linux-amd64


##############
# REPOSITORY #
##############

# If user specifies intalling from repository, then he can choose the specific
# repository branch
gelato_repo_branch: master

# These fields are NOT suggested to be modified
gelato_remote_url: https://github.com/opensds/multi-cloud.git


#############
# CONTAINER #
#############

# These fields are NOT suggested to be modified
controller_endpoint: 0.0.0.0:50040
controller_log_file: "{{ opensds_log_dir }}/osdslet.log"
gelato_docker_compose_file: https://raw.githubusercontent.com/opensds/multi-cloud/master/docker-compose.yml
69 changes: 69 additions & 0 deletions ansible/group_vars/hotpot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Copyright (c) 2018 Huawei Technologies Co., Ltd. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
# Dummy variable to avoid error because ansible does not recognize the
# file as a good configuration file when no variable in it.
dummy:


###########
# GENERAL #
###########

controller_endpoint: "{{ host_ip }}:50040"
dock_endpoint: localhost:50050

# These fields are NOT suggested to be modifie
hotpot_work_dir: /opt/opensds-hotpot-linux-amd64

opensds_config_dir: /etc/opensds
opensds_driver_config_dir: "{{ opensds_config_dir }}/driver"
opensds_log_dir: /var/log/opensds
controller_log_file: "{{ opensds_log_dir }}/osdslet.log"
dock_log_file: "{{ opensds_log_dir }}/osdsdock.log"


##############
# REPOSITORY #
##############

# If user specifies intalling from repository, then he can choose the specific
# repository branch
hotpot_repo_branch: stable/aruba

# These fields are NOT suggested to be modified
hotpot_remote_url: https://github.com/opensds/opensds.git

###########
# RELEASE #
###########

# If user specifies intalling from release,then he can choose the specific version
hotpot_release: v0.3.4 # The version should be at least v0.2.1

# These fields are NOT suggested to be modified
hotpot_download_url: https://github.com/opensds/opensds/releases/download/{{ hotpot_release }}/opensds-hotpot-{{ hotpot_release }}-linux-amd64.tar.gz
hotpot_tarball_dir: /tmp/opensds-hotpot-{{ hotpot_release }}-linux-amd64


#############
# CONTAINER #
#############

hotpot_image_tag: aruba

# These fields are NOT suggested to be modified
controller_docker_image: opensdsio/opensds-controller:{{ hotpot_image_tag }}
dock_docker_image: opensdsio/opensds-dock:{{ hotpot_image_tag }}
2 changes: 1 addition & 1 deletion ansible/group_vars/osdsdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ db_endpoint: "{{ etcd_host }}:{{ etcd_port }},{{ etcd_host }}:{{ etcd_peer_port
# ETCD #
###########

etcd_release: v3.2.0
etcd_release: v3.2.25
etcd_host: 127.0.0.1
etcd_port: 2379
etcd_peer_port: 2380
Expand Down
4 changes: 0 additions & 4 deletions ansible/group_vars/osdsdock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ enabled_backend: lvm
# 'provisioner', 'attacher'
dock_type: provisioner

# These fields are NOT suggested to be modified
dock_endpoint: localhost:50050
dock_log_file: "{{ opensds_log_dir }}/osdsdock.log"


###########
# LVM #
Expand Down
57 changes: 57 additions & 0 deletions ansible/group_vars/sushi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright (c) 2018 Huawei Technologies Co., Ltd. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
# Dummy variable to avoid error because ansible does not recognize the
# file as a good configuration file when no variable in it.
dummy:


###########
# GENERAL #
###########

# 'hotpot_only' is the default integration way, but you can change it to 'csi'
# or 'flexvolume'
sushi_plugin_type: hotpot_only
# The IP (127.0.0.1) should be replaced with the opensds actual endpoint IP
hotpot_endpoint: "http://{{ host_ip }}:50040"

# These fields are NOT suggested to be modifie
sushi_work_dir: /opt/opensds-sushi-linux-amd64

flexvolume_plugin_dir: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/opensds.io~opensds


##############
# REPOSITORY #
##############

# If user specifies intalling from repository, then he can choose the specific
# repository branch
sushi_repo_branch: stable/aruba

# These fields are NOT suggested to be modified
sushi_remote_url: https://github.com/opensds/nbp.git

###########
# RELEASE #
###########

# If user specifies intalling from release,then he can choose the specific version
sushi_release: v0.3.4 # The version should be at least v0.2.1

# These fields are NOT suggested to be modified
sushi_download_url: https://github.com/opensds/nbp/releases/download/{{ sushi_release }}/opensds-sushi-{{ sushi_release }}-linux-amd64.tar.gz
sushi_tarball_dir: /tmp/opensds-sushi-{{ sushi_release }}-linux-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
shell: "{{ item }}"
with_items:
- bash ./script/keystone.sh install
when: deploy_project != "multicloud" and opensds_auth_strategy == "keystone"
become: yes
when: opensds_auth_strategy == "keystone"
become: yes
24 changes: 3 additions & 21 deletions ansible/roles/cleaner/scenarios/auth-keystone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,15 @@
with_items:
- bash ./script/keystone.sh uninstall
when:
- deploy_project != "multicloud"
- opensds_auth_strategy == "keystone" and uninstall_keystone == true
- opensds_auth_strategy == "keystone"
ignore_errors: yes
become: yes

- name: cleanup opensds keystone
shell: "{{ item }}"
with_items:
- bash ./script/keystone.sh cleanup
- bash ./script/keystone.sh uninstall_purge
when:
- deploy_project != "multicloud"
- opensds_auth_strategy == "keystone" and cleanup_keystone == true
ignore_errors: yes
become: yes

- name: uninstall multicloud keystone
shell: "{{ item }}"
with_items:
- bash ./script/keystone.sh uninstall
when: deploy_project != "opensds" and uninstall_keystone == true
ignore_errors: yes
become: yes

- name: cleanup multicloud keystone
shell: "{{ item }}"
with_items:
- bash ./script/keystone.sh cleanup
when: deploy_project != "opensds" and cleanup_keystone == true
- opensds_auth_strategy == "keystone" and keystone_uninstall_purge == true
ignore_errors: yes
become: yes
Loading

0 comments on commit 104529b

Please sign in to comment.