Skip to content
Snippets Groups Projects
Commit d1ee0620 authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "Provide support for cloudkitty dev mode in kolla"

parents 4430d26c 3a34dfa0
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ cloudkitty_services: ...@@ -11,6 +11,7 @@ cloudkitty_services:
- "{{ node_config_directory }}/cloudkitty-api/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/cloudkitty-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/cloudkitty/cloudkitty:/var/lib/kolla/venv/lib/python2.7/site-packages/cloudkitty' if cloudkitty_dev_mode | bool else '' }}"
cloudkitty-processor: cloudkitty-processor:
container_name: "cloudkitty_processor" container_name: "cloudkitty_processor"
group: "cloudkitty-processor" group: "cloudkitty-processor"
...@@ -20,6 +21,7 @@ cloudkitty_services: ...@@ -20,6 +21,7 @@ cloudkitty_services:
- "{{ node_config_directory }}/cloudkitty-processor/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/cloudkitty-processor/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/cloudkitty/cloudkitty:/var/lib/kolla/venv/lib/python2.7/site-packages/cloudkitty' if cloudkitty_dev_mode | bool else '' }}"
#################### ####################
...@@ -62,3 +64,11 @@ openstack_cloudkitty_auth: "{{ openstack_auth }}" ...@@ -62,3 +64,11 @@ openstack_cloudkitty_auth: "{{ openstack_auth }}"
# Cloudkitty # Cloudkitty
#################### ####################
cloudkitty_openstack_keystone_default_role: "rating" cloudkitty_openstack_keystone_default_role: "rating"
####################
# Kolla
####################
cloudkitty_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
cloudkitty_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
cloudkitty_dev_mode: "{{ kolla_dev_mode }}"
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
common_options: "{{ docker_common_options }}" common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}" name: "{{ service.container_name }}"
image: "{{ service.image }}" image: "{{ service.image }}"
volumes: "{{ service.volumes }}" volumes: "{{ service.volumes|reject('equalto', '')|list }}"
when: when:
- kolla_action != "config" - kolla_action != "config"
- inventory_hostname in groups[service.group] - inventory_hostname in groups[service.group]
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
common_options: "{{ docker_common_options }}" common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}" name: "{{ service.container_name }}"
image: "{{ service.image }}" image: "{{ service.image }}"
volumes: "{{ service.volumes }}" volumes: "{{ service.volumes|reject('equalto', '')|list }}"
when: when:
- kolla_action != "config" - kolla_action != "config"
- inventory_hostname in groups[service.group] - inventory_hostname in groups[service.group]
......
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
BOOTSTRAP: BOOTSTRAP:
name: "bootstrap_cloudkitty" name: "bootstrap_cloudkitty"
restart_policy: "never" restart_policy: "never"
volumes: "{{ cloudkitty_api.volumes }}" volumes: "{{ cloudkitty_api.volumes|reject('equalto', '')|list }}"
run_once: True run_once: True
delegate_to: "{{ groups[cloudkitty_api.group][0] }}" delegate_to: "{{ groups[cloudkitty_api.group][0] }}"
---
- name: Cloning cloudkitty source repository for development
git:
repo: "{{ cloudkitty_git_repository }}"
dest: "{{ kolla_dev_repos_directory }}/{{ project_name }}"
update: "{{ cloudkitty_dev_repos_pull }}"
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
common_options: "{{ docker_common_options }}" common_options: "{{ docker_common_options }}"
name: "{{ item.value.container_name }}" name: "{{ item.value.container_name }}"
image: "{{ item.value.image }}" image: "{{ item.value.image }}"
volumes: "{{ item.value.volumes }}" volumes: "{{ item.value.volumes|reject('equalto', '')|list }}"
register: check_cloudkitty_containers register: check_cloudkitty_containers
when: when:
- kolla_action != "config" - kolla_action != "config"
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
when: inventory_hostname in groups['cloudkitty-api'] or when: inventory_hostname in groups['cloudkitty-api'] or
inventory_hostname in groups['cloudkitty-processor'] inventory_hostname in groups['cloudkitty-processor']
- include: clone.yml
when: cloudkitty_dev_mode | bool
- include: bootstrap.yml - include: bootstrap.yml
when: inventory_hostname in groups['cloudkitty-api'] when: inventory_hostname in groups['cloudkitty-api']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment