forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tools to assemble DEB packages (#96)
* Add tools to assemble DEB packages * Move wazuh-indexer-performance-analyzer.service to common * Enable assembly of DEB packages * Enable full set of plugins * Actually skip tar assembly * Add installation of dependencies for DEB assembly * Install dependencies using sudo * Format files * Refactor assemble script
- Loading branch information
Showing
9 changed files
with
439 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright OpenSearch Contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# The OpenSearch Contributors require contributions made to | ||
# this file be licensed under the Apache-2.0 license or a | ||
# compatible open source license. | ||
|
||
# deb opensearch Makefile | ||
|
||
all: install | ||
|
||
install: | ||
./debmake_install.sh $(CURDIR) | ||
|
||
clean: ; | ||
|
||
distclean: clean | ||
|
||
.PHONY: all clean distclean install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
# Copyright OpenSearch Contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# The OpenSearch Contributors require contributions made to | ||
# this file be licensed under the Apache-2.0 license or a | ||
# compatible open source license. | ||
|
||
# debmake opensearch install script | ||
|
||
set -ex | ||
|
||
if [ -z "$1" ]; then | ||
echo "Missing curdir path" | ||
exit 1 | ||
fi | ||
|
||
curdir=$1 | ||
product_dir=/usr/share/wazuh-indexer | ||
# config_dir=/etc/wazuh-indexer | ||
data_dir=/var/lib/wazuh-indexer | ||
log_dir=/var/log/wazuh-indexer | ||
pid_dir=/var/run/wazuh-indexer | ||
buildroot=${curdir}/debian/wazuh-indexer | ||
|
||
# Create necessary directories | ||
mkdir -p "${buildroot}" | ||
mkdir -p "${buildroot}${pid_dir}" | ||
mkdir -p "${buildroot}${product_dir}/plugins" | ||
|
||
# Install directories/files | ||
cp -a "${curdir}"/etc "${curdir}"/usr "${curdir}"/var "${buildroot}"/ | ||
chmod -c 0755 "${buildroot}${product_dir}"/bin/* | ||
if [ -d "${buildroot}${product_dir}"/plugins/opensearch-security ]; then | ||
chmod -c 0755 "${buildroot}${product_dir}"/plugins/opensearch-security/tools/* | ||
fi | ||
|
||
# Symlinks (do not symlink config dir as security demo installer has dependency, if no presense it will switch to rpm/deb mode) | ||
ln -s ${data_dir} "${buildroot}${product_dir}/data" | ||
ln -s ${log_dir} "${buildroot}${product_dir}/logs" | ||
|
||
# Change Permissions | ||
chmod -Rf a+rX,u+w,g-w,o-w "${buildroot}"/* | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.