summaryrefslogtreecommitdiffstats
path: root/bifrost
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2017-03-28 11:34:54 +0200
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2017-08-11 12:56:12 -0700
commit7d39f08627910720574d1faf0c53bb0c52760afe (patch)
tree8c5744769ca1fca66fbbbe1100d694dd26ec11b1 /bifrost
parent0197b9516e66969483c96981c7b518486a4797d3 (diff)
Set database pool_size in ironic.conf and inspector.conf templates
min_pool_size and max_pool_size are undefined in ironic.conf and inspector.conf templates, causing issues during ironic-dbsync and ironic-inspector-dbsync. https://build.opnfv.org/ci/job/opnfv-bifrost-verify-trusty-virtual-master/224/console This issue is there for stable/ocata as well. These should be got rid of once the patch on openstack/bifrost is merged. https://review.openstack.org/#/c/450681/ Change-Id: I678835e763022a7168e498047bb65d140895e019 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'bifrost')
-rw-r--r--bifrost/playbooks/roles/bifrost-ironic-install/templates/ironic-inspector.conf.j266
-rw-r--r--bifrost/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j292
2 files changed, 158 insertions, 0 deletions
diff --git a/bifrost/playbooks/roles/bifrost-ironic-install/templates/ironic-inspector.conf.j2 b/bifrost/playbooks/roles/bifrost-ironic-install/templates/ironic-inspector.conf.j2
new file mode 100644
index 00000000..dc4e3ffa
--- /dev/null
+++ b/bifrost/playbooks/roles/bifrost-ironic-install/templates/ironic-inspector.conf.j2
@@ -0,0 +1,66 @@
+{#
+# Note(TheJulia): This file is based upon the file format provided by the git
+# committed example located at:
+# http://git.openstack.org/cgit/openstack/ironic-inspector/tree/example.conf
+#}
+[DEFAULT]
+{% if enable_keystone is defined and enable_keystone | bool == true %}
+auth_strategy = keystone
+{% else %}
+auth_strategy = {{ inspector_auth | default('noauth') }}
+{% endif %}
+debug = {{ inspector_debug | bool }}
+
+[database]
+connection=mysql+pymysql://inspector:{{ ironic_db_password }}@localhost/inspector?charset=utf8
+min_pool_size = 1
+max_pool_size = 5
+
+[firewall]
+manage_firewall = {{ inspector_manage_firewall | bool | default('false') }}
+
+[ironic]
+{% if enable_keystone is defined and enable_keystone | bool == true %}
+os_region = {{ keystone.bootstrap.region_name | default('RegionOne') }}
+project_name = baremetal
+username = {{ ironic_inspector.keystone.default_username }}
+password = {{ ironic_inspector.keystone.default_password }}
+auth_url = {{ ironic_inspector.service_catalog.auth_url }}
+auth_type = password
+auth_strategy = keystone
+user_domain_id = default
+project_domain_id = default
+
+{% else %}
+auth_strategy = {{ ironic_auth_strategy | default('noauth') }}
+{% endif %}
+
+{% if enable_keystone is defined and enable_keystone | bool == true %}
+[keystone_authtoken]
+auth_plugin = password
+auth_url = {{ ironic_inspector.service_catalog.auth_url }}
+username = {{ ironic_inspector.service_catalog.username }}
+password = {{ ironic_inspector.service_catalog.password }}
+user_domain_id = default
+project_name = service
+project_domain_id = default
+
+{% endif %}
+{#
+# Note(TheJulia) preserving ironic_url in the configuration
+# in case future changes allow breaking of the deployment across
+# multiple nodes.
+#ironic_url = http://localhost:6385/
+#}
+
+[processing]
+add_ports = {{ inspector_port_addition | default('pxe') }}
+keep_ports = {{ inspector_keep_ports | default('present') }}
+ramdisk_logs_dir = {{ inspector_data_dir }}/log
+always_store_ramdisk_logs = {{ inspector_store_ramdisk_logs | default('true') | bool }}
+{% if inspector.discovery.enabled == true %}
+node_not_found_hook = enroll
+
+[discovery]
+enroll_node_driver = {{ inspector.discovery.default_node_driver }}
+{% endif %}
diff --git a/bifrost/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 b/bifrost/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2
new file mode 100644
index 00000000..7debdbcc
--- /dev/null
+++ b/bifrost/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2
@@ -0,0 +1,92 @@
+# {{ ansible_managed }}
+# For additional details on configuring ironic, you may wish to reference
+# the sample configuration file which can be located at
+# http://git.openstack.org/cgit/openstack/ironic/tree/etc/ironic/ironic.conf.sample
+
+
+[DEFAULT]
+# NOTE(TheJulia): Until Bifrost supports neutron or some other network
+# configuration besides a flat network where bifrost orchustrates the
+# control instead of ironic, noop is the only available network driver.
+enabled_network_interfaces = noop
+{% if testing | bool == true %}
+enabled_drivers = agent_ssh,pxe_ssh
+debug = true
+{% else %}
+enabled_drivers = {{ enabled_drivers }}
+debug = false
+{% endif %}
+
+rabbit_userid = ironic
+rabbit_password = {{ ironic_db_password }}
+
+{% if enable_keystone is defined and enable_keystone | bool == true %}
+auth_strategy = keystone
+{% else %}
+auth_strategy = noauth
+{% endif %}
+
+[pxe]
+pxe_append_params = systemd.journald.forward_to_console=yes {{ extra_kernel_options | default('') }}
+pxe_config_template = $pybasedir/drivers/modules/ipxe_config.template
+tftp_server = {{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}
+tftp_root = /tftpboot
+pxe_bootfile_name = undionly.kpxe
+ipxe_enabled = true
+ipxe_boot_script = /etc/ironic/boot.ipxe
+
+[deploy]
+http_url = http://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{ file_url_port }}/
+http_root = {{ http_boot_folder }}
+
+[conductor]
+api_url = http://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:6385/
+clean_nodes = {{ cleaning | lower }}
+automated_clean = {{ cleaning | lower }}
+
+[database]
+connection = mysql+pymysql://ironic:{{ ironic_db_password }}@localhost/ironic?charset=utf8
+min_pool_size = 1
+max_pool_size = 5
+
+[dhcp]
+dhcp_provider = none
+
+{% if testing | bool == true %}
+[ssh]
+libvirt_uri = qemu:///system
+{% endif %}
+
+{% if enable_cors | bool == true %}
+[cors]
+allowed_origin = {{ cors_allowed_origin | default('allowed_origin=http://localhost:8000') }}
+allow_credentials = {{ enable_cors_credential_support | default('true') }}
+{% endif %}
+
+[ilo]
+use_web_server_for_images = true
+
+{% if enable_inspector | bool == true %}
+[inspector]
+enabled = true
+{% endif %}
+
+{% if enable_keystone is defined and enable_keystone | bool == true %}
+[keystone]
+region_name = {{ keystone.bootstrap.region_name | default('RegionOne')}}
+[keystone_authtoken]
+auth_plugin = password
+auth_url = {{ ironic.service_catalog.auth_url }}
+username = {{ ironic.service_catalog.username }}
+password = {{ ironic.service_catalog.password }}
+user_domain_id = default
+project_name = {{ ironic.service_catalog.project_name }}
+project_domain_id = default
+
+[service_catalog]
+auth_url = {{ ironic.service_catalog.auth_url }}
+auth_type = password
+tenant_name = {{ ironic.service_catalog.project_name }}
+username = {{ ironic.service_catalog.username }}
+password = {{ ironic.service_catalog.password }}
+{% endif %}