mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
This commit is contained in:
parent
9e8451a1b1
commit
d2eaedcdab
4 changed files with 4 additions and 18 deletions
|
@ -62,8 +62,6 @@ exports.run = async (defaults = {}) => {
|
|||
await cluster.extractDataDirectory(installPath, options.dataArchive);
|
||||
}
|
||||
|
||||
options.bundledJDK = true;
|
||||
|
||||
await cluster.run(installPath, options);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -279,7 +279,7 @@ exports.Cluster = class Cluster {
|
|||
env: {
|
||||
...(installPath ? { ES_TMPDIR: path.resolve(installPath, 'ES_TMPDIR') } : {}),
|
||||
...process.env,
|
||||
...(options.bundledJDK ? { JAVA_HOME: '' } : {}),
|
||||
JAVA_HOME: '', // By default, we want to always unset JAVA_HOME so that the bundled JDK will be used
|
||||
...(options.esEnvVars || {}),
|
||||
},
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
|
|
|
@ -34,7 +34,6 @@ exports.installArchive = async function installArchive(archive, options = {}) {
|
|||
basePath = BASE_PATH,
|
||||
installPath = path.resolve(basePath, path.basename(archive, '.tar.gz')),
|
||||
log = defaultLog,
|
||||
bundledJDK = false,
|
||||
esArgs = [],
|
||||
} = options;
|
||||
|
||||
|
@ -64,7 +63,7 @@ exports.installArchive = async function installArchive(archive, options = {}) {
|
|||
await appendToConfig(installPath, 'xpack.security.enabled', 'true');
|
||||
|
||||
await appendToConfig(installPath, 'xpack.license.self_generated.type', license);
|
||||
await configureKeystore(installPath, log, bundledJDK, [
|
||||
await configureKeystore(installPath, log, [
|
||||
['bootstrap.password', password],
|
||||
...parseSettings(esArgs, { filter: SettingsFilter.SecureOnly }),
|
||||
]);
|
||||
|
@ -89,20 +88,11 @@ async function appendToConfig(installPath, key, value) {
|
|||
*
|
||||
* @param {String} installPath
|
||||
* @param {ToolingLog} log
|
||||
* @param {boolean} bundledJDK
|
||||
* @param {Array<[string, string]>} secureSettings List of custom Elasticsearch secure settings to
|
||||
* add into the keystore.
|
||||
*/
|
||||
async function configureKeystore(
|
||||
installPath,
|
||||
log = defaultLog,
|
||||
bundledJDK = false,
|
||||
secureSettings
|
||||
) {
|
||||
const env = {};
|
||||
if (bundledJDK) {
|
||||
env.JAVA_HOME = '';
|
||||
}
|
||||
async function configureKeystore(installPath, log = defaultLog, secureSettings) {
|
||||
const env = { JAVA_HOME: '' };
|
||||
await execa(ES_KEYSTORE_BIN, ['create'], { cwd: installPath, env });
|
||||
|
||||
for (const [secureSettingName, secureSettingValue] of secureSettings) {
|
||||
|
|
|
@ -61,7 +61,6 @@ exports.installSnapshot = async function installSnapshot({
|
|||
basePath = BASE_PATH,
|
||||
installPath = path.resolve(basePath, version),
|
||||
log = defaultLog,
|
||||
bundledJDK = true,
|
||||
esArgs,
|
||||
}) {
|
||||
const { downloadPath } = await exports.downloadSnapshot({
|
||||
|
@ -78,7 +77,6 @@ exports.installSnapshot = async function installSnapshot({
|
|||
basePath,
|
||||
installPath,
|
||||
log,
|
||||
bundledJDK,
|
||||
esArgs,
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue