-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathapi.sls
81 lines (77 loc) · 2.96 KB
/
api.sls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{% import "openstack/config.sls" as config with context %}
include:
- ceph
- openstack.glance.base
/etc/glance/glance-api-paste.ini:
file.managed:
- source: salt://openstack/glance/glance-api-paste.ini
- user: glance
- group: glance
- mode: 0600
- template: jinja
- context:
debug: {{ config.debug }}
port: {{ config.glance_registry_port }}
mysql_username: {{ config.mysql_glance_username }}
mysql_password: {{ config.mysql_glance_password }}
mysql_database: {{ config.mysql_glance_database }}
mysql_host: {{ config.mysql_hosts|first }}
keystone_ip: {{ config.keystone_hosts|first }}
keystone_port: {{ config.keystone_port }}
keystone_auth: {{ config.keystone_auth }}
glance_tenant_name: {{ config.service_tenant_name }}
glance_username: glance
glance_password: {{ config.keystone_glance_password }}
require:
- user: glance
- group: glance
/etc/glance/glance-api.conf:
file.managed:
- source: salt://openstack/glance/glance-api.conf
- user: glance
- group: glance
- mode: 0600
- template: jinja
- context:
debug: {{ config.debug }}
port: {{ config.glance_api_port }}
mysql_username: {{ config.mysql_glance_username }}
mysql_password: {{ config.mysql_glance_password }}
mysql_database: {{ config.mysql_glance_database }}
mysql_host: {{ config.mysql_hosts|first }}
rabbit_host: {{ config.rabbitmq_hosts|first }}
rabbit_user: {{ config.rabbitmq_user }}
rabbit_password: {{ config.rabbitmq_password }}
rabbit_vhost: {{ config.rabbitmq_vhost }}
keystone_ip: {{ config.keystone_hosts|first }}
keystone_port: {{ config.keystone_port }}
keystone_auth: {{ config.keystone_auth }}
glance_tenant_name: {{ config.service_tenant_name }}
glance_username: glance
glance_password: {{ config.keystone_glance_password }}
registry_host: {{ config.glance_hosts|first }}
registry_port: {{ config.glance_registry_port }}
ip: {{ config.public_ip }}
require:
- user: glance
- group: glance
{{ config.package("glance-api") }}
service.running:
- name: glance-api
- enable: True
- watch:
- pkg: glance-api
- pkg: python-eventlet
- file: /etc/glance/policy.json
- file: /etc/glance/glance-api-paste.ini
- file: /etc/glance/glance-api.conf
require:
- file: /etc/glance/policy.json
- file: /etc/glance/glance-api-paste.ini
- file: /etc/glance/glance-api.conf
make-images:
cmd.run:
- name: rados mkpool images
- unless: rados lspools | grep images
require:
- file: /etc/ceph/ceph.conf