Browse Source

Add logging and update fuel-bootstrap-image-builder

Change-Id: I397710246569d268da0d813c37a97823e084f7ff
Andrey Shestakov 3 years ago
parent
commit
93e004fc22
16 changed files with 358 additions and 33 deletions
  1. 1
    1
      deployment_scripts/fuel-bootstrap-image-builder/Makefile
  2. 27
    7
      deployment_scripts/fuel-bootstrap-image-builder/bin/fuel-bootstrap-image
  3. 9
    0
      deployment_scripts/fuel-bootstrap-image-builder/bin/fuel-bootstrap-image-set
  4. 1
    1
      deployment_scripts/fuel-bootstrap-image-builder/fuel-bootstrap-image-builder.spec
  5. 0
    13
      deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files.ironic/etc/e2fsck.conf
  6. 184
    0
      deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files.ironic/etc/fuel-agent/fuel-agent.conf
  7. 3
    0
      deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files.ironic/etc/init/ironic-callback.conf
  8. 29
    0
      deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files.ironic/etc/rsyslog.conf
  9. 36
    0
      deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files.ironic/etc/rsyslog.d/00-remote.conf
  10. 0
    1
      deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files.ironic/root/.ssh/authorized_keys
  11. 9
    0
      deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files.ironic/usr/bin/configure-remote-logging.sh
  12. 3
    0
      deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files/etc/e2fsck.conf
  13. 16
    0
      deployment_scripts/puppet/manifests/ironic-conductor.pp
  14. 38
    0
      deployment_scripts/puppet/modules/ironic/templates/55-server-ironic.conf.erb
  15. 0
    10
      deployment_tasks.yaml
  16. 2
    0
      post_install.sh

+ 1
- 1
deployment_scripts/fuel-bootstrap-image-builder/Makefile View File

@@ -1,6 +1,6 @@
1 1
 
2 2
 
3
-VERSION?=7.0.0
3
+VERSION?=8.0.0
4 4
 
5 5
 top_srcdir:=$(shell pwd)
6 6
 ubuntu_DATA:=$(shell cd $(top_srcdir) && find share -type f)

+ 27
- 7
deployment_scripts/fuel-bootstrap-image-builder/bin/fuel-bootstrap-image View File

@@ -8,7 +8,7 @@ datadir="${bindir%/*}/share/fuel-bootstrap-image"
8 8
 global_conf="/etc/fuel-bootstrap-image.conf"
9 9
 [ -r "$global_conf" ] && . "$global_conf"
10 10
 
11
-[ -z "$MOS_VERSION" ] && MOS_VERSION="7.0"
11
+[ -z "$MOS_VERSION" ] && MOS_VERSION="8.0"
12 12
 [ -z "$DISTRO_RELEASE" ] && DISTRO_RELEASE="trusty"
13 13
 [ -z "$MIRROR_DISTRO" ] && MIRROR_DISTRO="http://archive.ubuntu.com/ubuntu"
14 14
 [ -z "$MIRROR_MOS" ] && MIRROR_MOS="http://mirror.fuel-infra.org/mos-repos/ubuntu/$MOS_VERSION"
@@ -16,18 +16,16 @@ global_conf="/etc/fuel-bootstrap-image.conf"
16 16
 [ -z "$ARCH" ] && ARCH="amd64"
17 17
 [ -z "$DESTDIR" ] && DESTDIR="/var/www/nailgun/bootstrap/ubuntu"
18 18
 
19
-BOOTSTRAP_FUEL_PKGS_DFLT="openssh-server ntp"
20
-
21 19
 # Packages required for the master node to discover a bootstrap node
20
+BOOTSTRAP_FUEL_PKGS_DFLT="openssh-client openssh-server ntp mcollective nailgun-agent nailgun-mcagents nailgun-net-check fuel-agent"
21
+[ -z "$BOOTSTRAP_FUEL_PKGS" ] && BOOTSTRAP_FUEL_PKGS="$BOOTSTRAP_FUEL_PKGS_DFLT"
22
+
22 23
 if [ -z "$BOOTSTRAP_IRONIC" ]; then
23
-	BOOTSTRAP_FUEL_PKGS_DFLT="$BOOTSTRAP_FUEL_PKGS_DFLT openssh-client mcollective nailgun-agent nailgun-mcagents nailgun-net-check"
24 24
 	GONFIG_SOURCE="$datadir/ubuntu/files/"
25 25
 else
26 26
 	GONFIG_SOURCE="$datadir/ubuntu/files.ironic/"
27 27
 fi
28 28
 
29
-[ -z "$BOOTSTRAP_FUEL_PKGS" ] && BOOTSTRAP_FUEL_PKGS="$BOOTSTRAP_FUEL_PKGS_DFLT"
30
-
31 29
 if [ -n "$http_proxy" ]; then
32 30
 	export HTTP_PROXY="$http_proxy"
33 31
 elif [ -n "$HTTP_PROXY" ]; then
@@ -256,12 +254,33 @@ make_utf8_locale ()
256 254
 	chroot "$root" /bin/sh -c "locale-gen en_US.UTF-8 && dpkg-reconfigure locales"
257 255
 }
258 256
 
257
+# XXX: CentOS version of debootstrap produces a broken /dev:
258
+# /dev/fd is a directory instead of a symlink to /proc/self/fd
259
+dev_fixup ()
260
+{
261
+	local root="$1"
262
+	if [ -z "$root" ]; then
263
+		echo "*** Error: $MYSELF: dev_fixup: \$root is not specified" >&2
264
+		exit 1
265
+	fi
266
+	mkdir -p -m755 "$root/dev"
267
+	if [ ! -L "$root/dev/fd" ]; then
268
+		rm -rf "$root/dev/fd"
269
+		# Ask MAKEDEV to re-create /dev/fd, /dev/stdin, etc
270
+		chroot "$root" /bin/sh -c "cd /dev && MAKEDEV fd"
271
+	fi
272
+	if [ ! -c "$root/dev/null" ]; then
273
+		# basic device nodes are missing => create them
274
+		chroot "$root" /bin/sh -c "cd /dev && MAKEDEV std"
275
+	fi
276
+}
277
+
259 278
 copy_conf_files ()
260 279
 {
261 280
 	local root="$1"
262 281
 	local sdir="$2"
263 282
 	rsync -rlptDK "${sdir}" "${root%/}"
264
-	sed -i $root/etc/shadow -e '/^root/c\root:$$6$$oC7haQNQ$$LtVf6AI.QKn9Jb89r83PtQN9fBqpHT9bAFLzy.YVxTLiFgsoqlPY3awKvbuSgtxYHx4RUcpUqMotp.WZ0Hwoj.:15441:0:99999:7:::'
283
+	sed -i $root/etc/shadow -e '/^root/c\root:$6$oC7haQNQ$LtVf6AI.QKn9Jb89r83PtQN9fBqpHT9bAFLzy.YVxTLiFgsoqlPY3awKvbuSgtxYHx4RUcpUqMotp.WZ0Hwoj.:15441:0:99999:7:::'
265 284
 }
266 285
 
267 286
 install_ssh_keys ()
@@ -373,6 +392,7 @@ build_image ()
373 392
 	chmod 755 "$root"
374 393
 	suppress_services_start "$root"
375 394
 	run_debootstrap "$root"
395
+	dev_fixup "$root"
376 396
 	suppress_services_start "$root"
377 397
 	propagate_host_resolv_conf "$root"
378 398
 	make_utf8_locale "$root"

+ 9
- 0
deployment_scripts/fuel-bootstrap-image-builder/bin/fuel-bootstrap-image-set View File

@@ -7,6 +7,7 @@ ASTUTE_YAML="/etc/fuel/astute.yaml"
7 7
 cobbler_manifest="/etc/puppet/modules/nailgun/examples/cobbler-only.pp"
8 8
 astute_manifest="/etc/puppet/modules/nailgun/examples/astute-only.pp"
9 9
 ubuntu_bootstrap_dir="/var/www/nailgun/bootstrap/ubuntu"
10
+bootstrap_conf="/etc/fuel-bootstrap-image.conf"
10 11
 
11 12
 run_puppet () {
12 13
 	local container="$1"
@@ -36,6 +37,10 @@ maybe_build_ubuntu_bootstrap ()
36 37
 			need_rebuild='yes'
37 38
 		fi
38 39
 	done
40
+	if ! grep -qE '^\s*BOOTSTRAP_SSH_KEYS\s*[=]' "$bootstrap_conf" 2>/dev/null; then
41
+		echo >> "$bootstrap_conf"
42
+		echo "BOOTSTRAP_SSH_KEYS=\"/root/.ssh/id_rsa.pub\"" >> "$bootstrap_conf"
43
+	fi
39 44
 	if [ -n "$need_rebuild" ]; then
40 45
 		cat >&2 <<-EOF
41 46
 		$MYSELF: info: Ubuntu bootstrap image does not exist, building one
@@ -72,6 +77,10 @@ verify_bootstrap_flavor () {
72 77
 			;;
73 78
 		ubuntu|Ubuntu)
74 79
 			flavor='ubuntu'
80
+			cat >&2 <<-EOF
81
+			$MYSELF: WARNING: Ubuntu based bootstrap is EXPERIMENTAL.
82
+			$MYSELF: WARNING: Use at your own risk.
83
+			EOF
75 84
 			;;
76 85
 		*)
77 86
 			cat >&2 <<-EOF

+ 1
- 1
deployment_scripts/fuel-bootstrap-image-builder/fuel-bootstrap-image-builder.spec View File

@@ -1,5 +1,5 @@
1 1
 %define name fuel-bootstrap-image-builder
2
-%{!?version: %define version 7.0.0}
2
+%{!?version: %define version 8.0.0}
3 3
 %{!?release: %define release 1}
4 4
 
5 5
 Summary: Fuel bootstrap image generator

+ 0
- 13
deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files.ironic/etc/e2fsck.conf View File

@@ -1,13 +0,0 @@
1
-[problems]
2
-
3
-# Superblock last mount time is in the future (PR_0_FUTURE_SB_LAST_MOUNT).
4
-0x000031 = {
5
-    preen_ok = true
6
-    preen_nomessage = true
7
-}
8
-
9
-# Superblock last write time is in the future (PR_0_FUTURE_SB_LAST_WRITE).
10
-0x000032 = {
11
-    preen_ok = true
12
-    preen_nomessage = true
13
-}

+ 184
- 0
deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files.ironic/etc/fuel-agent/fuel-agent.conf View File

@@ -0,0 +1,184 @@
1
+[DEFAULT]
2
+
3
+#
4
+# Options defined in fuel_agent.manager
5
+#
6
+
7
+# Data driver (string value)
8
+#data_driver=nailgun
9
+
10
+# Path to directory with cloud init templates (string value)
11
+#nc_template_path=/usr/share/fuel-agent/cloud-init-templates
12
+
13
+# Temporary directory for file manipulations (string value)
14
+#tmp_path=/tmp
15
+
16
+# Path where to store generated config drive image (string
17
+# value)
18
+#config_drive_path=/tmp/config-drive.img
19
+
20
+# Path where to store actual rules for udev daemon (string
21
+# value)
22
+#udev_rules_dir=/etc/udev/rules.d
23
+
24
+# Path where to store default rules for udev daemon (string
25
+# value)
26
+#udev_rules_lib_dir=/lib/udev/rules.d
27
+
28
+# Substring to which file extension .rules be renamed (string
29
+# value)
30
+#udev_rename_substr=.renamedrule
31
+
32
+# Directory where we build images (string value)
33
+#image_build_dir=/tmp
34
+
35
+# Directory where we build images (string value)
36
+#image_build_suffix=.fuel-agent-image
37
+
38
+
39
+#
40
+# Options defined in fuel_agent.cmd.agent
41
+#
42
+
43
+# Input data file (string value)
44
+#input_data_file=/tmp/provision.json
45
+
46
+# Input data (json string) (string value)
47
+#input_data=
48
+
49
+
50
+#
51
+# Options defined in fuel_agent.openstack.common.log
52
+#
53
+
54
+# Print debugging output (set logging level to DEBUG instead
55
+# of default WARNING level). (boolean value)
56
+#debug=true
57
+
58
+# Print more verbose output (set logging level to INFO instead
59
+# of default WARNING level). (boolean value)
60
+#verbose=false
61
+
62
+# Log output to standard error. (boolean value)
63
+use_stderr=false
64
+
65
+# Format string to use for log messages with context. (string
66
+# value)
67
+#logging_context_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s
68
+
69
+# Format string to use for log messages without context.
70
+# (string value)
71
+#logging_default_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s
72
+
73
+# Data to append to log format when level is DEBUG. (string
74
+# value)
75
+logging_debug_format_suffix=
76
+
77
+# Prefix each line of exception output with this format.
78
+# (string value)
79
+#logging_exception_prefix=%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s
80
+
81
+# List of logger=LEVEL pairs. (list value)
82
+#default_log_levels=amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN
83
+
84
+# Enables or disables publication of error events. (boolean
85
+# value)
86
+#publish_errors=false
87
+
88
+# Enables or disables fatal status of deprecations. (boolean
89
+# value)
90
+#fatal_deprecations=false
91
+
92
+# The format for an instance that is passed with the log
93
+# message.  (string value)
94
+#instance_format="[instance: %(uuid)s] "
95
+
96
+# The format for an instance UUID that is passed with the log
97
+# message.  (string value)
98
+#instance_uuid_format="[instance: %(uuid)s] "
99
+
100
+# The name of a logging configuration file. This file is
101
+# appended to any existing logging configuration files. For
102
+# details about logging configuration files, see the Python
103
+# logging module documentation. (string value)
104
+# Deprecated group/name - [DEFAULT]/log_config
105
+#log_config_append=<None>
106
+
107
+# DEPRECATED. A logging.Formatter log message format string
108
+# which may use any of the available logging.LogRecord
109
+# attributes. This option is deprecated.  Please use
110
+# logging_context_format_string and
111
+# logging_default_format_string instead. (string value)
112
+#log_format=<None>
113
+
114
+# Format string for %%(asctime)s in log records. Default:
115
+# %(default)s . (string value)
116
+#log_date_format=%Y-%m-%d %H:%M:%S
117
+
118
+# (Optional) Name of log file to output to. If no default is
119
+# set, logging will go to stdout. (string value)
120
+# Deprecated group/name - [DEFAULT]/logfile
121
+log_file=/var/log/fuel-agent.log
122
+
123
+
124
+# (Optional) The base directory used for relative --log-file
125
+# paths. (string value)
126
+# Deprecated group/name - [DEFAULT]/logdir
127
+#log_dir=<None>
128
+
129
+# Use syslog for logging. Existing syslog format is DEPRECATED
130
+# during I, and will change in J to honor RFC5424. (boolean
131
+# value)
132
+use_syslog=true
133
+
134
+# (Optional) Enables or disables syslog rfc5424 format for
135
+# logging. If enabled, prefixes the MSG part of the syslog
136
+# message with APP-NAME (RFC5424). The format without the APP-
137
+# NAME is deprecated in I, and will be removed in J. (boolean
138
+# value)
139
+use_syslog_rfc_format=true
140
+
141
+# Syslog facility to receive log lines. (string value)
142
+#syslog_log_facility=LOG_USER
143
+
144
+
145
+#
146
+# Options defined in fuel_agent.utils.artifact
147
+#
148
+
149
+# Size of data chunk to operate with images (integer value)
150
+#data_chunk_size=1048576
151
+
152
+
153
+#
154
+# Options defined in fuel_agent.utils.build
155
+#
156
+
157
+# Maximum allowed loop devices count to use (integer value)
158
+#max_loop_count=255
159
+
160
+# Size of sparse file in MiBs (integer value)
161
+#sparse_file_size=2048
162
+
163
+# System-wide major number for loop device (integer value)
164
+#loop_dev_major=7
165
+
166
+
167
+#
168
+# Options defined in fuel_agent.utils.utils
169
+#
170
+
171
+# Maximum retries count for http requests. 0 means infinite
172
+# (integer value)
173
+#http_max_retries=30
174
+
175
+# Http request timeout in seconds (floating point value)
176
+#http_request_timeout=10.0
177
+
178
+# Delay in seconds before the next http request retry
179
+# (floating point value)
180
+#http_retry_delay=2.0
181
+
182
+# Block size of data to read for calculating checksum (integer
183
+# value)
184
+#read_chunk_size=1048576

+ 3
- 0
deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files.ironic/etc/init/ironic-callback.conf View File

@@ -1,6 +1,9 @@
1 1
 description "Ironic call back script"
2 2
 
3 3
 start on started ssh
4
+pre-start script
5
+  /usr/bin/configure-remote-logging.sh
6
+end script
4 7
 
5 8
 task
6 9
 

+ 29
- 0
deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files.ironic/etc/rsyslog.conf View File

@@ -0,0 +1,29 @@
1
+#################
2
+#### MODULES ####
3
+#################
4
+
5
+$ModLoad imuxsock # provides support for local system logging
6
+$ModLoad imklog   # provides kernel logging support (previously done by rklogd) 
7
+#$ModLoad immark  # provides --MARK-- message capability
8
+
9
+###########################
10
+#### GLOBAL DIRECTIVES ####
11
+###########################
12
+
13
+#
14
+# Set the default permissions for all log files.
15
+#
16
+$FileOwner syslog
17
+$FileGroup syslog
18
+$FileCreateMode 0640
19
+$DirCreateMode 0755
20
+$umask 0000
21
+$PrivDropToUser syslog
22
+$PrivDropToGroup syslog
23
+
24
+$MaxMessageSize 32k
25
+
26
+#
27
+# Include all config files in /etc/rsyslog.d/
28
+#
29
+$IncludeConfig /etc/rsyslog.d/*.conf

+ 36
- 0
deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files.ironic/etc/rsyslog.d/00-remote.conf View File

@@ -0,0 +1,36 @@
1
+# file is managed by puppet
2
+#
3
+# Log to remote syslog server
4
+# Templates
5
+# RFC3164 emulation with long tags (32+)
6
+$Template RemoteLog, "<%pri%>%timestamp% ironic/@DEPLOYMENT_ID@/%syslogtag%%msg:::sp-if-no-1st-sp%%msg%\n"
7
+# RFC544 emulation would be: "<%pri%>1 %timestamp:::date-rfc3339% %hostname% %syslogtag% %procid% %msgid% %structured-data% %msg%\n"
8
+# Note: don't use %app-name% cuz it would be empty for some cases
9
+$ActionFileDefaultTemplate RemoteLog
10
+$WorkDirectory /var/spool/rsyslog/
11
+#Start remote server 0
12
+$ActionQueueType LinkedList   # use asynchronous processing
13
+$ActionQueueFileName remote0 # set file name, also enables disk mode
14
+$ActionQueueMaxDiskSpace 1g
15
+$ActionQueueSaveOnShutdown on
16
+$ActionQueueLowWaterMark 2000
17
+$ActionQueueHighWaterMark 8000
18
+$ActionQueueSize              1000000       # Reserve 500Mb memory, each queue element is 512b
19
+$ActionQueueDiscardMark       950000        # If the queue looks like filling, start discarding to not block ssh/login/etc.
20
+$ActionQueueDiscardSeverity   0             # When in discarding mode discard everything.
21
+$ActionQueueTimeoutEnqueue    0             # When in discarding mode do not enable throttling.
22
+$ActionQueueDequeueSlowdown 1000
23
+$ActionQueueWorkerThreads 2
24
+$ActionQueueDequeueBatchSize 128
25
+$ActionResumeRetryCount -1
26
+
27
+
28
+# Isolate sudo logs locally
29
+# match if "program name" is equal to "sudo"
30
+:programname, isequal, "sudo" -/var/log/sudo.log
31
+&~
32
+
33
+# Send messages we receive to master node via tcp
34
+# Use an octet-counted framing (understood for rsyslog only) to ensure correct multiline messages delivery
35
+*.* @(o)@SYSLOG_SERVER_IP@:514;RemoteLog
36
+#End remote server 0

+ 0
- 1
deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files.ironic/root/.ssh/authorized_keys View File

@@ -1 +0,0 @@
1
-ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDtrVTSM8tGd4E8khJn2gfN/2fymnX/0YKAGSVZTWDNIcYL5zXTlSwrccn/8EgmnNsJNxucJRT+oWqrDGaFaehuwlY/IBqm50KJVaUr5QYzOUpqVpFIpoX3UwETCxcSB1LiQYbCvrJcqOPQ4Zu9fMhMGKaAX1ohzOumn4czuLDYIvCnPnoU5RDWt7g1GaFFlzGU3JFooj7/aWFJMqJLinvay3vr2vFpBvO1y29nKu+zgpZkzzJCc0ndoVqvB+W9DY6QtgTSWfd3ZE/8vg4h8QV8H+xxqL/uWCxDkv2Y3rviAHivR/V+1YCSQH0NBJrNSkRjd+1roLhcEGT7/YEnbgVV nailgun@bootstrap

+ 9
- 0
deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files.ironic/usr/bin/configure-remote-logging.sh View File

@@ -0,0 +1,9 @@
1
+#!/bin/bash
2
+
3
+SYSLOG_SERVER_IP=$(grep -oPz '(?<=\bip=)(\d+\.?){4}:\K(\d+\.?){4}' /proc/cmdline)
4
+DEPLOYMENT_ID=$(grep -ioP '(?<=\bdeployment_id=)([0-9a-z-]+)\b' /proc/cmdline)
5
+
6
+sed -i /etc/rsyslog.d/00-remote.conf -re "s/@SYSLOG_SERVER_IP@/$SYSLOG_SERVER_IP/"
7
+sed -i /etc/rsyslog.d/00-remote.conf -re "s/@DEPLOYMENT_ID@/$DEPLOYMENT_ID/"
8
+
9
+service rsyslog restart

+ 3
- 0
deployment_scripts/fuel-bootstrap-image-builder/share/fuel-bootstrap-image/ubuntu/files/etc/e2fsck.conf View File

@@ -1,3 +1,6 @@
1
+[options]
2
+broken_system_clock = true
3
+
1 4
 [problems]
2 5
 
3 6
 # Superblock last mount time is in the future (PR_0_FUTURE_SB_LAST_MOUNT).

+ 16
- 0
deployment_scripts/puppet/manifests/ironic-conductor.pp View File

@@ -33,6 +33,8 @@ $db_name                    = pick($ironic_hash['db_name'], 'ironic')
33 33
 $db_password                = pick($ironic_hash['password'], 'ironic')
34 34
 $database_connection        = "mysql://${db_name}:${db_password}@${db_host}/${db_name}?charset=utf8&read_timeout=60"
35 35
 
36
+include ::rsyslog::params
37
+
36 38
 $tftp_root                  = "/var/lib/ironic/tftpboot"
37 39
 
38 40
 class { '::ironic':
@@ -116,3 +118,17 @@ file { "/etc/ironic/fuel_key":
116 118
   require => Class['ironic'],
117 119
 }
118 120
 
121
+file { "${rsyslog::params::rsyslog_d}55-server-ironic.conf":
122
+  content => template("ironic/55-server-ironic.conf.erb"),
123
+} ~>
124
+service { $rsyslog::params::service_name:
125
+  ensure  => running,
126
+  enable  => true,
127
+}
128
+
129
+firewall { '100 rsyslog' :
130
+  dport   => '514',
131
+  proto   => 'udp',
132
+  action  => 'accept',
133
+}
134
+

+ 38
- 0
deployment_scripts/puppet/modules/ironic/templates/55-server-ironic.conf.erb View File

@@ -0,0 +1,38 @@
1
+# Load UDP module
2
+$ModLoad imudp
3
+$UDPServerRun 514
4
+
5
+$EscapeControlCharactersOnReceive off
6
+
7
+#
8
+# Disk-Assisted Memory Queues, async writes, no escape chars
9
+#
10
+$OMFileASyncWriting on
11
+$MainMsgQueueType LinkedList
12
+$WorkDirectory /var/spool/rsyslog/
13
+$MainMsgQueueFileName mainmsgqueue
14
+$MainMsgQueueSaveOnShutdown on
15
+$MainMsgQueueDequeueSlowdown 1000
16
+$MainMsgQueueWorkerThreads 2
17
+$MainMsgQueueDequeueBatchSize 128
18
+$ActionQueueType LinkedList
19
+$WorkDirectory /var/spool/rsyslog/
20
+$ActionQueueFileName acsdbq
21
+$ActionQueueMaxDiskSpace 1g
22
+$ActionQueueSaveOnShutdown on
23
+$ActionQueueLowWaterMark 2000
24
+$ActionQueueHighWaterMark 8000
25
+$ActionQueueSize 1000000       # Reserve 500Mb memory, each queue element is 512b
26
+$ActionQueueDiscardMark 950000 # If the queue looks like filling, start discarding to not block ssh/login/etc.
27
+$ActionQueueDiscardSeverity 0  # When in discarding mode discard everything.
28
+$ActionQueueTimeoutEnqueue 0   # When in discarding mode do not enable throttling.
29
+$ActionQueueDequeueSlowdown 1000
30
+$ActionQueueWorkerThreads 2
31
+$ActionQueueDequeueBatchSize 128
32
+$ActionResumeRetryCount -1
33
+$SystemLogRateLimitInterval 0   # disable rate limits for rsyslog
34
+
35
+
36
+$template RemoteLogFile, "/var/log/remote/%syslogtag:R,ERE,1,DFLT:([A-Za-z][A-Za-z0-9_./-]*)--end%.log"
37
+
38
+:FROMHOST, regex, "^[1-9]" -?RemoteLogFile;RemoteLog

+ 0
- 10
deployment_tasks.yaml View File

@@ -20,16 +20,6 @@
20 20
     puppet_modules: puppet/modules:/etc/puppet/modules
21 21
     timeout: 3600
22 22
 
23
-- id: ironicopenstack-network-compute
24
-  type: puppet
25
-  groups: ['ironic']
26
-  required_for: [ironic-physnets-conductor]
27
-  requires: [ironic-compute]
28
-  parameters:
29
-    puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/openstack-network/openstack-network-compute.pp
30
-    puppet_modules: /etc/puppet/modules
31
-    timeout: 3600
32
-
33 23
 - id: ironic-network-ovs
34 24
   groups: ['primary-controller', 'controller', 'ironic']
35 25
   type: puppet

+ 2
- 0
post_install.sh View File

@@ -14,11 +14,13 @@ else
14 14
   echo "Key ${key_file} already exists"
15 15
 fi
16 16
 
17
+export MOS_VERSION="7.0"
17 18
 export BOOTSTRAP_IRONIC="yes"
18 19
 export EXTRA_DEB_REPOS="deb http://127.0.0.1:8080/plugins/fuel-plugin-ironic-1.0/repositories/ubuntu /"
19 20
 export DESTDIR="/var/www/nailgun/bootstrap/ironic"
20 21
 export BOOTSTRAP_SSH_KEYS="${key_file}.pub"
21 22
 export AGENT_PACKAGE_PATH="${package_path}/repositories/ubuntu"
23
+export BOOTSTRAP_FUEL_PKGS="openssh-server ntp"
22 24
 
23 25
 mkdir -p "${DESTDIR}"
24 26
 ${deployment_scripts_path}/fuel-bootstrap-image-builder/bin/fuel-bootstrap-image

Loading…
Cancel
Save