Added parametrization of workers.
Change-Id: I657f405843b944ae88bd1bb95b4efbeebacde12f
diff --git a/README.rst b/README.rst
index 32fbf92..a2367bb 100644
--- a/README.rst
+++ b/README.rst
@@ -34,6 +34,7 @@
server:
enabled: true
version: juno
+ workers: 8
policy:
publicize_image:
- "role:admin"
diff --git a/glance/files/kilo/glance-api.conf.Debian b/glance/files/kilo/glance-api.conf.Debian
index f78701c..34967c1 100644
--- a/glance/files/kilo/glance-api.conf.Debian
+++ b/glance/files/kilo/glance-api.conf.Debian
@@ -41,7 +41,7 @@
# The number of child process workers that will be
# created to service API requests. The default will be
# equal to the number of CPUs available. (integer value)
-workers = 8
+workers = {{ server.workers }}
# Maximum line size of message headers to be accepted.
# max_header_line may need to be increased when using large tokens
diff --git a/glance/files/liberty/glance-api.conf.Debian b/glance/files/liberty/glance-api.conf.Debian
index c375d6f..3acf3f3 100644
--- a/glance/files/liberty/glance-api.conf.Debian
+++ b/glance/files/liberty/glance-api.conf.Debian
@@ -41,7 +41,7 @@
# The number of child process workers that will be
# created to service API requests. The default will be
# equal to the number of CPUs available. (integer value)
-workers = 8
+workers = {{ server.workers }}
# Maximum line size of message headers to be accepted.
# max_header_line may need to be increased when using large tokens
diff --git a/glance/meta/sphinx.yml b/glance/meta/sphinx.yml
index 58d95fd..9364f79 100644
--- a/glance/meta/sphinx.yml
+++ b/glance/meta/sphinx.yml
@@ -23,6 +23,9 @@
version:
name: "Version"
value: {{ server.version }}
+ workers:
+ name: "Number of workers"
+ value: {{ server.workers }}
database_host:
name: "Database"
value: {{ server.database.user }}@{{ server.database.host }}:{{ server.database.port }}//{{ server.database.name }}
@@ -41,4 +44,4 @@
{%- set pkg_version = "dpkg -l "+pkg+" | grep "+pkg+" | awk '{print $3}'" %}
* {{ pkg }}: {{ salt['cmd.run'](pkg_version) }}
{%- endfor %}
- {%- endif %}
\ No newline at end of file
+ {%- endif %}
diff --git a/metadata/service/control/cluster.yml b/metadata/service/control/cluster.yml
index 0930a18..1f6207b 100644
--- a/metadata/service/control/cluster.yml
+++ b/metadata/service/control/cluster.yml
@@ -7,6 +7,7 @@
server:
enabled: true
version: ${_param:glance_version}
+ workers: 8
database:
engine: mysql
host: ${_param:cluster_vip_address}
diff --git a/metadata/service/control/single.yml b/metadata/service/control/single.yml
index 917a4ce..af1dc11 100644
--- a/metadata/service/control/single.yml
+++ b/metadata/service/control/single.yml
@@ -7,6 +7,7 @@
server:
enabled: true
version: ${_param:glance_version}
+ workers: 1
database:
engine: mysql
host: localhost
diff --git a/other-requirements.txt b/other-requirements.txt
new file mode 100644
index 0000000..ba84cc5
--- /dev/null
+++ b/other-requirements.txt
@@ -0,0 +1 @@
+python-yaml
diff --git a/tests/pillar/cluster.sls b/tests/pillar/cluster.sls
index 04456e8..3e0e665 100644
--- a/tests/pillar/cluster.sls
+++ b/tests/pillar/cluster.sls
@@ -2,6 +2,7 @@
server:
enabled: true
version: liberty
+ workers: 8
database:
engine: mysql
host: 127.0.0.1
@@ -33,4 +34,4 @@
virtual_host: '/openstack'
ha_queues: true
storage:
- engine: file
\ No newline at end of file
+ engine: file
diff --git a/tests/pillar/single.sls b/tests/pillar/single.sls
index b348efb..7512001 100644
--- a/tests/pillar/single.sls
+++ b/tests/pillar/single.sls
@@ -2,6 +2,7 @@
server:
enabled: true
version: liberty
+ workers: 1
database:
engine: mysql
host: localhost
@@ -30,4 +31,4 @@
password: password
virtual_host: '/openstack'
storage:
- engine: file
\ No newline at end of file
+ engine: file