Skip to content

Commit

Permalink
[build] move install to /usr/share, config to /etc/kibana
Browse files Browse the repository at this point in the history
  • Loading branch information
jbudz committed May 27, 2016
1 parent 4336f2b commit 6d293af
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
18 changes: 12 additions & 6 deletions tasks/build/os_packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,20 @@ module.exports = function (grunt) {
'--before-install', resolve(packageScriptsDir, 'pre_install.sh'),
'--before-remove', resolve(packageScriptsDir, 'pre_remove.sh'),
'--after-remove', resolve(packageScriptsDir, 'post_remove.sh'),
'--config-files', '/opt/kibana/config/kibana.yml',
'--config-files', '/etc/kibana/kibana.yml',
'--template-value', 'user=kibana',
'--template-value', 'group=kibana'

//uses relative path to --prefix
'--exclude', 'usr/share/kibana/config'
];

const files = buildDir + '/=/opt/kibana';
const sysv = servicesByName.sysv.outputDir + '/etc/=/etc/';
const systemd = servicesByName.systemd.outputDir + '/lib/=/lib/';
const files = [
`${buildDir}/=/usr/share/kibana/`,
`${buildDir}/config/=/etc/kibana/`,
`${servicesByName.sysv.outputDir}/etc/=/etc/`,
`${servicesByName.systemd.outputDir}/lib/=/lib/`
];

//Manually find flags, multiple args without assignment are not entirely parsed
var flags = grunt.option.flags().join(',');
Expand All @@ -50,10 +56,10 @@ module.exports = function (grunt) {

grunt.file.mkdir(targetDir);
if (buildDeb || noneSpecified) {
fpm(args.concat('-t', 'deb', '--deb-priority', 'optional', '-a', arch, files, sysv, systemd));
fpm(args.concat('-t', 'deb', '--deb-priority', 'optional', '-a', arch, files));
}
if (buildRpm || noneSpecified) {
fpm(args.concat('-t', 'rpm', '-a', arch, '--rpm-os', 'linux', files, sysv, systemd));
fpm(args.concat('-t', 'rpm', '-a', arch, '--rpm-os', 'linux', files));
}

});
Expand Down
10 changes: 9 additions & 1 deletion tasks/build/pleaserun.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,16 @@ module.exports = function createServices(grunt) {
'--sysv-log-path', '/var/log/kibana/',
'-p', service.name,
'-v', service.version,
'/opt/kibana/bin/kibana'
'/usr/share/kibana/bin/kibana',
'-c /etc/kibana/kibana.yml'
]);
});
<<<<<<< a9f1c863a78d71b9d350badac9d65a204898e566
=======

grunt.file.mkdir(userScriptsDir);
exec('please-manage-user', ['--output', userScriptsDir, 'kibana']);
appendFileSync(resolve(userScriptsDir, 'installer.sh'), 'chown -R kibana:kibana /usr/share/kibana/optimize');
>>>>>>> [build] move install to /usr/share, config to /etc/kibana
});
};

0 comments on commit 6d293af

Please sign in to comment.