Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/opensds/opensds-inst…
Browse files Browse the repository at this point in the history
…aller into dev-salt
  • Loading branch information
noelmcloughlin committed Mar 30, 2019
2 parents d94a9c5 + 8f70a4f commit d1c03e9
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ansible/group_vars/dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dashboard_docker_image: opensdsio/dashboard:latest

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

# These fields are NOT suggested to be modified
dashboard_remote_url: https://github.com/opensds/opensds-dashboard.git
9 changes: 6 additions & 3 deletions ansible/group_vars/hotpot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ dummy:
# GENERAL #
###########

controller_endpoint: "{{ host_ip }}:50040"
dock_endpoint: localhost:50050
apiserver_endpoint: "{{ host_ip }}:50040"
controller_endpoint: "{{ host_ip }}:50049"
dock_endpoint: "{{ host_ip }}: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
apiserver_log_file: "{{ opensds_log_dir }}/osdsapiserver.log"
controller_log_file: "{{ opensds_log_dir }}/osdslet.log"
dock_log_file: "{{ opensds_log_dir }}/osdsdock.log"

Expand All @@ -51,7 +53,7 @@ hotpot_remote_url: https://github.com/opensds/opensds.git
###########

# If user specifies intalling from release,then he can choose the specific version
hotpot_release: v0.5.0 # The version should be at least v0.2.1
hotpot_release: v0.5.1 # 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
Expand All @@ -65,5 +67,6 @@ hotpot_tarball_dir: /tmp/opensds-hotpot-{{ hotpot_release }}-linux-amd64
hotpot_image_tag: latest

# These fields are NOT suggested to be modified
apiserver_docker_image: opensdsio/opensds-apiserver:{{ hotpot_image_tag }}
controller_docker_image: opensdsio/opensds-controller:{{ hotpot_image_tag }}
dock_docker_image: opensdsio/opensds-dock:{{ hotpot_image_tag }}
11 changes: 9 additions & 2 deletions ansible/roles/cleaner/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
state: stopped
when: dashboard_installation_type == "container"

- name: kill osdslet and osdsdock daemon service
shell: killall osdslet osdsdock
- name: kill osdslet and osdsdock and osdsapiserver daemon service
shell: killall osdslet osdsdock osdsapiserver
when: install_from != "container"
ignore_errors: true

Expand All @@ -31,6 +31,13 @@
state: stopped
when: install_from == "container"

- name: kill osdsapiserver containerized service
docker_container:
name: apiserver
image: "{{ apiserver_docker_image }}"
state: stopped
when: install_from == "container"

- name: kill osdsdock containerized service
docker_container:
name: osdsdock
Expand Down
32 changes: 30 additions & 2 deletions ansible/roles/hotpot-installer/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@
cat >> opensds.conf <<OPENSDS_GLOABL_CONFIG_DOC
[osdslet]
api_endpoint = {{ controller_endpoint }}
graceful = True
log_file = {{ controller_log_file }}
socket_order = inc
[osdsapiserver]
api_endpoint = {{ apiserver_endpoint }}
log_file = {{ apiserver_log_file }}
auth_strategy = {{ opensds_auth_strategy }}
# If https is enabled, the default value of cert file
# is /opt/opensds-security/opensds/opensds-cert.pem,
Expand Down Expand Up @@ -123,6 +125,22 @@
chdir: "{{ hotpot_work_dir }}"
when: deploy_project != "gelato" and install_from != "container"

- name: run osdsapiserver daemon service
shell:
cmd: |
i=0
while
i="$((i+1))"
[ "$i" -lt 4 ]
do
nohup bin/osdsapiserver > osdsapiserver.out 2> osdsapiserver.err < /dev/null &
sleep 5
ps aux | grep osdsapiserver | grep -v grep && break
done
args:
chdir: "{{ hotpot_work_dir }}"
when: deploy_project != "gelato" and install_from != "container"

- name: run osdslet containerized service
docker_container:
name: osdslet
Expand All @@ -132,3 +150,13 @@
volumes:
- "/etc/opensds/:/etc/opensds"
when: deploy_project != "gelato" and install_from == "container"

- name: run osdsapiserver containerized service
docker_container:
name: apiserver
image: "{{ apiserver_docker_image }}"
state: started
network_mode: host
volumes:
- "/etc/opensds/:/etc/opensds"
when: deploy_project != "gelato" and install_from == "container"

0 comments on commit d1c03e9

Please sign in to comment.