Merge "Provide support for cloudkitty dev mode in kolla"
This commit is contained in:
commit
d1ee0620bb
@ -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:
|
|||||||
- "{{ 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 }}"
|
|||||||
# 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 @@
|
|||||||
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 @@
|
|||||||
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 @@
|
|||||||
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] }}"
|
||||||
|
6
ansible/roles/cloudkitty/tasks/clone.yml
Normal file
6
ansible/roles/cloudkitty/tasks/clone.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
- 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 @@
|
|||||||
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 @@
|
|||||||
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']
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user