Init package
This commit is contained in:
parent
6ec01ad47d
commit
40eb721510
0
apache-storm-1.2.3.tar.gz
Normal file
0
apache-storm-1.2.3.tar.gz
Normal file
BIN
apache-storm-1.2.3.tar.gzaa
Normal file
BIN
apache-storm-1.2.3.tar.gzaa
Normal file
Binary file not shown.
BIN
apache-storm-1.2.3.tar.gzab
Normal file
BIN
apache-storm-1.2.3.tar.gzab
Normal file
Binary file not shown.
BIN
apache-storm-1.2.3.tar.gzac
Normal file
BIN
apache-storm-1.2.3.tar.gzac
Normal file
Binary file not shown.
17
storm-logviewer.service
Normal file
17
storm-logviewer.service
Normal file
@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Apache Storm logviewer service
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
User=storm
|
||||
Group=storm
|
||||
EnvironmentFile=/etc/sysconfog/storm
|
||||
ExecStart=/opt/storm/bin/storm --config /etc/storm/storm.yaml logviewer
|
||||
Restart=on-failure
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
SyslogIdentifier=storm-logviewer
|
||||
SyslogLevel=debug
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
17
storm-nimbus.service
Normal file
17
storm-nimbus.service
Normal file
@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Apache Storm nimbus service
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
User=storm
|
||||
Group=storm
|
||||
EnvironmentFile=/etc/sysconfog/storm
|
||||
ExecStart=/opt/storm/bin/storm --config /etc/storm/storm.yaml nimbus
|
||||
Restart=on-failure
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
SyslogIdentifier=storm-nimbus
|
||||
SyslogLevel=debug
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
17
storm-supervisor.service
Normal file
17
storm-supervisor.service
Normal file
@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Apache Storm supervisor service
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
User=storm
|
||||
Group=storm
|
||||
EnvironmentFile=/etc/sysconfog/storm
|
||||
ExecStart=/opt/storm/bin/storm --config /etc/storm/storm.yaml supervisor
|
||||
Restart=on-failure
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
SyslogIdentifier=storm-supervisor
|
||||
SyslogLevel=debug
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
17
storm-ui.service
Normal file
17
storm-ui.service
Normal file
@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Apache Storm ui service
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
User=storm
|
||||
Group=storm
|
||||
EnvironmentFile=/etc/sysconfog/storm
|
||||
ExecStart=/opt/storm/bin/storm --config /etc/storm/storm.yaml ui
|
||||
Restart=on-failure
|
||||
StandardOutput=syslog
|
||||
StandardError=syslog
|
||||
SyslogIdentifier=storm-ui
|
||||
SyslogLevel=debug
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
4
storm.conf
Normal file
4
storm.conf
Normal file
@ -0,0 +1,4 @@
|
||||
d /var/run/storm-logviewer 0700 storm storm -
|
||||
d /var/run/storm-nimbus 0700 storm storm -
|
||||
d /var/run/storm-supervisor 0700 storm storm -
|
||||
d /var/run/storm-ui 0700 storm storm -
|
||||
11
storm.logrotate
Normal file
11
storm.logrotate
Normal file
@ -0,0 +1,11 @@
|
||||
/var/log/storm/*.log {
|
||||
compress
|
||||
rotate 15
|
||||
size 1M
|
||||
dateext
|
||||
missingok
|
||||
notifempty
|
||||
su storm storm
|
||||
copytruncate
|
||||
sharedscripts
|
||||
}
|
||||
97
storm.spec
Normal file
97
storm.spec
Normal file
@ -0,0 +1,97 @@
|
||||
%define debug_package %{nil}
|
||||
%define _prefix /opt
|
||||
%define _conf_dir %{_sysconfdir}/storm
|
||||
%define _log_dir %{_var}/log/storm
|
||||
%define _data_dir %{_sharedstatedir}/storm
|
||||
Name: storm
|
||||
Version: 1.2.3
|
||||
Release: 1
|
||||
Summary: Apache Storm realtime computation system
|
||||
License: Apache-2.0
|
||||
Url: http://storm.apache.org
|
||||
Source0: http://archive.apache.org/dist/%{name}/apache-%{name}-%{version}/apache-%{name}-%{version}.tar.gz
|
||||
Source1: %{name}-nimbus.service
|
||||
Source2: %{name}-supervisor.service
|
||||
Source3: %{name}-logviewer.service
|
||||
Source4: %{name}-ui.service
|
||||
Source5: %{name}.logrotate
|
||||
Source6: %{name}.conf
|
||||
Source7: apache-storm-1.2.3.tar.gzaa
|
||||
Source8: apache-storm-1.2.3.tar.gzab
|
||||
Source9: apache-storm-1.2.3.tar.gzac
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{?systemd_requires}
|
||||
BuildRequires: systemd
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
|
||||
%description
|
||||
Apache Storm is a free and open source distributed realtime computation system.
|
||||
Storm makes it easy to reliably process unbounded streams of data, doing for
|
||||
realtime processing what Hadoop did for batch processing.
|
||||
|
||||
%prep
|
||||
cat %{SOURCE7} %{SOURCE8} %{SOURCE9} > %{SOURCE0}
|
||||
%setup -q -n apache-%{name}-%{version}
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT%{_log_dir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_data_dir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_conf_dir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_prefix}/storm/
|
||||
cp -pr bin $RPM_BUILD_ROOT%{_prefix}/storm/
|
||||
cp -pr lib $RPM_BUILD_ROOT%{_prefix}/storm/
|
||||
cp -pr external $RPM_BUILD_ROOT%{_prefix}/storm/
|
||||
cp -pr log4j2 $RPM_BUILD_ROOT%{_prefix}/storm/
|
||||
cp -pr public $RPM_BUILD_ROOT%{_prefix}/storm/
|
||||
cp -pr extlib $RPM_BUILD_ROOT%{_prefix}/storm/
|
||||
cp -pr extlib-daemon $RPM_BUILD_ROOT%{_prefix}/storm/
|
||||
install -p -D -m 755 %{S:1} $RPM_BUILD_ROOT%{_unitdir}/
|
||||
install -p -D -m 755 %{S:2} $RPM_BUILD_ROOT%{_unitdir}/
|
||||
install -p -D -m 755 %{S:3} $RPM_BUILD_ROOT%{_unitdir}/
|
||||
install -p -D -m 755 %{S:4} $RPM_BUILD_ROOT%{_unitdir}/
|
||||
install -p -D -m 644 %{S:5} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/storm
|
||||
install -p -D -m 644 %{S:6} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/storm
|
||||
install -p -D -m 644 conf/storm.yaml $RPM_BUILD_ROOT%{_conf_dir}/
|
||||
install -p -D -m 644 conf/storm_env.ini $RPM_BUILD_ROOT%{_conf_dir}/
|
||||
|
||||
%pre
|
||||
/usr/bin/getent group storm > /dev/null || /usr/sbin/groupadd -r storm
|
||||
if ! /usr/bin/getent passwd storm > /dev/null ; then
|
||||
/usr/sbin/useradd -r -g storm -m -d %{_prefix}/storm -s /bin/bash -c "Storm" storm
|
||||
fi
|
||||
|
||||
%post
|
||||
%systemd_post storm-nimbus.service
|
||||
%systemd_post storm-supervisor.service
|
||||
%systemd_post storm-logviewer.service
|
||||
%systemd_post storm-ui.service
|
||||
|
||||
%postun
|
||||
for module in nimbus supervisor logviewer ui; do
|
||||
systemctl status storm.$module > /dev/null
|
||||
if [[ $? -eq 0 ]]; then
|
||||
%systemd_preun storm-$module.service
|
||||
fi
|
||||
done
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_unitdir}/storm-nimbus.service
|
||||
%{_unitdir}/storm-supervisor.service
|
||||
%{_unitdir}/storm-logviewer.service
|
||||
%{_unitdir}/storm-ui.service
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/storm
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/storm
|
||||
%config(noreplace) %{_conf_dir}/*
|
||||
%attr(-,storm,storm) %{_prefix}/storm
|
||||
%attr(0755,storm,storm) %dir %{_log_dir}
|
||||
%attr(0700,storm,storm) %dir %{_data_dir}
|
||||
|
||||
%changelog
|
||||
* Thu Mar 18 2021 huanghaitao <huanghaitao8@huawei.com> 1.2.3 - 1
|
||||
- Package init
|
||||
4
storm.yaml
Normal file
4
storm.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: NA
|
||||
src_repo: NA
|
||||
tag_prefix: NA
|
||||
separator: NA
|
||||
Loading…
x
Reference in New Issue
Block a user