Ironic: Move to use sqllite rather than mariadb
This PS makes the ironic deployment a bit simpler by removing mariadb and using sqllite instead. It also fixes the path of the ironic inspector db to get it to persist pod restarts. Change-Id: I522774597ff921449e86e2742131e5a51d60d559 Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
parent
0f8b2032ce
commit
5d7cfc8dc5
@ -1,7 +0,0 @@
|
||||
DELETE FROM mysql.user ;
|
||||
CREATE USER 'ironic'@'localhost' identified by '$(MARIADB_PASSWORD)' ;
|
||||
GRANT ALL on *.* TO 'ironic'@'localhost' WITH GRANT OPTION ;
|
||||
DROP DATABASE IF EXISTS test ;
|
||||
CREATE DATABASE IF NOT EXISTS ironic ;
|
||||
FLUSH PRIVILEGES ;
|
||||
|
@ -5,7 +5,7 @@ transport_url = fake://
|
||||
use_stderr = true
|
||||
listen_address = ::
|
||||
[database]
|
||||
connection = sqlite:///var/lib/ironic-inspector/ironic-inspector.db
|
||||
connection = sqlite:///shared/ironic-inspector.db
|
||||
[discovery]
|
||||
enroll_node_driver = ipmi
|
||||
[ironic]
|
||||
|
@ -29,7 +29,7 @@ send_sensor_data_interval = 160
|
||||
api_url = http://$(PROVISIONING_IP):6385
|
||||
bootloader = http://$(PROVISIONING_IP):80/uefi_esp.img
|
||||
[database]
|
||||
connection = mysql+pymysql://ironic:$(MARIADB_PASSWORD)@localhost/ironic?charset=utf8
|
||||
connection = sqlite:///shared/ironic.db
|
||||
[deploy]
|
||||
default_boot_option = local
|
||||
erase_devices_metadata_priority = 10
|
||||
|
@ -10,5 +10,3 @@ configMapGenerator:
|
||||
- inspector.conf
|
||||
- inspector.ipxe
|
||||
- ironic.conf
|
||||
- my.cnf
|
||||
- configure-mysql.sql
|
||||
|
@ -1,19 +0,0 @@
|
||||
[server]
|
||||
|
||||
[mysqld]
|
||||
datadir=/var/lib/mysql
|
||||
socket=/var/lib/mysql/mysql.sock
|
||||
log-error=/var/log/mariadb/mariadb.log
|
||||
pid-file=/run/mariadb/mariadb.pid
|
||||
max_connections = 64
|
||||
max_heap_table_size = 1M
|
||||
innodb_buffer_pool_size = 5M
|
||||
innodb_log_buffer_size = 512K
|
||||
|
||||
[galera]
|
||||
|
||||
[embedded]
|
||||
|
||||
[mariadb]
|
||||
|
||||
[mariadb-10.3]
|
@ -9,4 +9,3 @@ configMapGenerator:
|
||||
- init-bootstrap
|
||||
- inspector-entrypoint
|
||||
- ironic-entrypoint
|
||||
- mariadb-entrypoint
|
||||
|
@ -1,18 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
PATH=$PATH:/usr/sbin/
|
||||
DATADIR="/var/lib/mysql"
|
||||
MARIADB_CONF_FILE="/etc/my.cnf.d/mariadb-server.cnf"
|
||||
|
||||
ln -sf /proc/self/fd/1 /var/log/mariadb/mariadb.log
|
||||
|
||||
if [ ! -d "${DATADIR}/mysql" ]; then
|
||||
cp -f /shared/my.cnf $MARIADB_CONF_FILE
|
||||
mysql_install_db --datadir="$DATADIR"
|
||||
chown -R mysql "$DATADIR"
|
||||
|
||||
# mysqld_safe closes stdout/stderr if no bash options are set ($- == '')
|
||||
# turn on tracing to prevent this
|
||||
exec bash -x /usr/bin/mysqld_safe --init-file /shared/configure-mysql.sql
|
||||
else
|
||||
exec bash -x /usr/bin/mysqld_safe
|
||||
fi
|
@ -5,7 +5,6 @@ metadata:
|
||||
labels:
|
||||
name: ironic-vars
|
||||
data:
|
||||
MARIADB_PASSWORD: "e8ca990d79d351eacda0"
|
||||
PROVISIONING_IP: "192.168.10.100"
|
||||
DHCP_RANGE: "192.168.10.200,192.168.10.250"
|
||||
PROVISIONING_INTERFACE: "pxe0"
|
||||
|
@ -72,21 +72,6 @@ spec:
|
||||
- name: ironic-entrypoints
|
||||
mountPath: /bin/runhttpd
|
||||
subPath: httpd-entrypoint
|
||||
- name: mariadb
|
||||
image: "quay.io/metal3-io/ironic:latest"
|
||||
imagePullPolicy: Always
|
||||
command: ["/bin/runmariadb"]
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- mountPath: "/shared"
|
||||
name: ironic-storage
|
||||
- mountPath: "/var/lib/mysql"
|
||||
name: ironic-storage
|
||||
subPath: mysql
|
||||
- name: ironic-entrypoints
|
||||
mountPath: /bin/runmariadb
|
||||
subPath: mariadb-entrypoint
|
||||
- name: ironic
|
||||
image: "quay.io/metal3-io/ironic:latest"
|
||||
imagePullPolicy: Always
|
||||
|
Loading…
Reference in New Issue
Block a user