mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[deb/rpm] fix config folder path (#73001)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
parent
7314c1ba8f
commit
7059270ce9
11 changed files with 33 additions and 15 deletions
|
@ -167,7 +167,7 @@ These can be used to automatically update the list of hosts as a cluster is resi
|
|||
Kibana has a default maximum memory limit of 1.4 GB, and in most cases, we recommend leaving this unconfigured. In some scenarios, such as large reporting jobs,
|
||||
it may make sense to tweak limits to meet more specific requirements.
|
||||
|
||||
You can modify this limit by setting `--max-old-space-size` in the `node.options` config file that can be found inside `kibana/config` folder or any other configured with the environment variable `KIBANA_PATH_CONF` (for example in debian based system would be `/etc/kibana`).
|
||||
You can modify this limit by setting `--max-old-space-size` in the `node.options` config file that can be found inside `kibana/config` folder or any other configured with the environment variable `KBN_PATH_CONF` (for example in debian based system would be `/etc/kibana`).
|
||||
|
||||
The option accepts a limit in MB:
|
||||
--------
|
||||
|
|
|
@ -51,7 +51,7 @@ describe('core deprecations', () => {
|
|||
const { messages } = applyCoreDeprecations();
|
||||
expect(messages).toMatchInlineSnapshot(`
|
||||
Array [
|
||||
"Environment variable CONFIG_PATH is deprecated. It has been replaced with KIBANA_PATH_CONF pointing to a config folder",
|
||||
"Environment variable CONFIG_PATH is deprecated. It has been replaced with KBN_PATH_CONF pointing to a config folder",
|
||||
]
|
||||
`);
|
||||
});
|
||||
|
|
|
@ -23,7 +23,7 @@ import { ConfigDeprecationProvider, ConfigDeprecation } from './types';
|
|||
const configPathDeprecation: ConfigDeprecation = (settings, fromPath, log) => {
|
||||
if (has(process.env, 'CONFIG_PATH')) {
|
||||
log(
|
||||
`Environment variable CONFIG_PATH is deprecated. It has been replaced with KIBANA_PATH_CONF pointing to a config folder`
|
||||
`Environment variable CONFIG_PATH is deprecated. It has been replaced with KBN_PATH_CONF pointing to a config folder`
|
||||
);
|
||||
}
|
||||
return settings;
|
||||
|
|
|
@ -25,14 +25,18 @@ import { fromRoot } from '../utils';
|
|||
const isString = (v: any): v is string => typeof v === 'string';
|
||||
|
||||
const CONFIG_PATHS = [
|
||||
process.env.KBN_PATH_CONF && join(process.env.KBN_PATH_CONF, 'kibana.yml'),
|
||||
process.env.KIBANA_PATH_CONF && join(process.env.KIBANA_PATH_CONF, 'kibana.yml'),
|
||||
process.env.CONFIG_PATH, // deprecated
|
||||
fromRoot('config/kibana.yml'),
|
||||
].filter(isString);
|
||||
|
||||
const CONFIG_DIRECTORIES = [process.env.KIBANA_PATH_CONF, fromRoot('config'), '/etc/kibana'].filter(
|
||||
isString
|
||||
);
|
||||
const CONFIG_DIRECTORIES = [
|
||||
process.env.KBN_PATH_CONF,
|
||||
process.env.KIBANA_PATH_CONF,
|
||||
fromRoot('config'),
|
||||
'/etc/kibana',
|
||||
].filter(isString);
|
||||
|
||||
const DATA_PATHS = [
|
||||
process.env.DATA_PATH, // deprecated
|
||||
|
|
|
@ -14,7 +14,7 @@ while [ -h "$SCRIPT" ] ; do
|
|||
done
|
||||
|
||||
DIR="$(dirname "${SCRIPT}")/.."
|
||||
CONFIG_DIR=${KIBANA_PATH_CONF:-"$DIR/config"}
|
||||
CONFIG_DIR=${KBN_PATH_CONF:-"$DIR/config"}
|
||||
NODE="${DIR}/node/bin/node"
|
||||
test -x "$NODE"
|
||||
if [ ! -x "$NODE" ]; then
|
||||
|
|
|
@ -12,8 +12,8 @@ If Not Exist "%NODE%" (
|
|||
Exit /B 1
|
||||
)
|
||||
|
||||
set CONFIG_DIR=%KIBANA_PATH_CONF%
|
||||
If [%KIBANA_PATH_CONF%] == [] (
|
||||
set CONFIG_DIR=%KBN_PATH_CONF%
|
||||
If [%KBN_PATH_CONF%] == [] (
|
||||
set CONFIG_DIR=%DIR%\config
|
||||
)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ while [ -h "$SCRIPT" ] ; do
|
|||
done
|
||||
|
||||
DIR="$(dirname "${SCRIPT}")/.."
|
||||
CONFIG_DIR=${KIBANA_PATH_CONF:-"$DIR/config"}
|
||||
CONFIG_DIR=${KBN_PATH_CONF:-"$DIR/config"}
|
||||
NODE="${DIR}/node/bin/node"
|
||||
test -x "$NODE"
|
||||
if [ ! -x "$NODE" ]; then
|
||||
|
|
|
@ -13,8 +13,8 @@ If Not Exist "%NODE%" (
|
|||
Exit /B 1
|
||||
)
|
||||
|
||||
set CONFIG_DIR=%KIBANA_PATH_CONF%
|
||||
If [%KIBANA_PATH_CONF%] == [] (
|
||||
set CONFIG_DIR=%KBN_PATH_CONF%
|
||||
If [%KBN_PATH_CONF%] == [] (
|
||||
set CONFIG_DIR=%DIR%\config
|
||||
)
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ If Not Exist "%NODE%" (
|
|||
Exit /B 1
|
||||
)
|
||||
|
||||
set CONFIG_DIR=%KIBANA_PATH_CONF%
|
||||
If [%KIBANA_PATH_CONF%] == [] (
|
||||
set CONFIG_DIR=%KBN_PATH_CONF%
|
||||
If [%KBN_PATH_CONF%] == [] (
|
||||
set CONFIG_DIR=%DIR%\config
|
||||
)
|
||||
|
||||
|
|
|
@ -31,6 +31,10 @@ case $1 in
|
|||
--ingroup "<%= group %>" --shell /bin/false "<%= user %>"
|
||||
fi
|
||||
|
||||
if [ -n "$2" ]; then
|
||||
IS_UPGRADE=true
|
||||
fi
|
||||
|
||||
set_access
|
||||
;;
|
||||
abort-deconfigure|abort-upgrade|abort-remove)
|
||||
|
@ -47,6 +51,10 @@ case $1 in
|
|||
-c "kibana service user" "<%= user %>"
|
||||
fi
|
||||
|
||||
if [ "$1" = "2" ]; then
|
||||
IS_UPGRADE=true
|
||||
fi
|
||||
|
||||
set_access
|
||||
;;
|
||||
|
||||
|
@ -55,3 +63,9 @@ case $1 in
|
|||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$IS_UPGRADE" = "true" ]; then
|
||||
if command -v systemctl >/dev/null; then
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -12,4 +12,4 @@ KILL_ON_STOP_TIMEOUT=0
|
|||
|
||||
BABEL_CACHE_PATH="/var/lib/kibana/optimize/.babel_register_cache.json"
|
||||
|
||||
KIBANA_PATH_CONF="/etc/kibana"
|
||||
KBN_PATH_CONF="/etc/kibana"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue