diff --git a/apache-storm-1.2.3.tar.gz b/apache-storm-1.2.3.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/apache-storm-1.2.3.tar.gzaa b/apache-storm-1.2.3.tar.gzaa new file mode 100644 index 0000000000000000000000000000000000000000..9b27dfd5f6d91e581699b7c015a4b21910ea55db Binary files /dev/null and b/apache-storm-1.2.3.tar.gzaa differ diff --git a/apache-storm-1.2.3.tar.gzab b/apache-storm-1.2.3.tar.gzab new file mode 100644 index 0000000000000000000000000000000000000000..3a4cbdec9d22819d717cf0886a49faf04fc5864f Binary files /dev/null and b/apache-storm-1.2.3.tar.gzab differ diff --git a/apache-storm-1.2.3.tar.gzac b/apache-storm-1.2.3.tar.gzac new file mode 100644 index 0000000000000000000000000000000000000000..7e25461bf22b32c8e3861ef9fdfc913a46564186 Binary files /dev/null and b/apache-storm-1.2.3.tar.gzac differ diff --git a/storm-logviewer.service b/storm-logviewer.service new file mode 100644 index 0000000000000000000000000000000000000000..a7e8135bdff021f3deeee6fc33ff8039e3a0d62f --- /dev/null +++ b/storm-logviewer.service @@ -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 diff --git a/storm-nimbus.service b/storm-nimbus.service new file mode 100644 index 0000000000000000000000000000000000000000..4875cf6eac1397248788865b9f235c3b769c3603 --- /dev/null +++ b/storm-nimbus.service @@ -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 diff --git a/storm-supervisor.service b/storm-supervisor.service new file mode 100644 index 0000000000000000000000000000000000000000..b06619c7911c23be854d4dc3d514813afc65f7cf --- /dev/null +++ b/storm-supervisor.service @@ -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 diff --git a/storm-ui.service b/storm-ui.service new file mode 100644 index 0000000000000000000000000000000000000000..66f8467c545a2947149999e17f186f99cc192c42 --- /dev/null +++ b/storm-ui.service @@ -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 diff --git a/storm.conf b/storm.conf new file mode 100644 index 0000000000000000000000000000000000000000..28a841dbdb0c376078007af197758dbfdd623921 --- /dev/null +++ b/storm.conf @@ -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 - diff --git a/storm.logrotate b/storm.logrotate new file mode 100644 index 0000000000000000000000000000000000000000..1c62a5fddabfcb83c750235b36791c85759c7d85 --- /dev/null +++ b/storm.logrotate @@ -0,0 +1,11 @@ +/var/log/storm/*.log { + compress + rotate 15 + size 1M + dateext + missingok + notifempty + su storm storm + copytruncate + sharedscripts +} diff --git a/storm.spec b/storm.spec new file mode 100644 index 0000000000000000000000000000000000000000..78dcff8c9e939e690e0b823de8a5b5df875a7741 --- /dev/null +++ b/storm.spec @@ -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 1.2.3 - 1 +- Package init diff --git a/storm.yaml b/storm.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c651911c56ccada49514d416e1c41d268dc3695c --- /dev/null +++ b/storm.yaml @@ -0,0 +1,4 @@ +version_control: NA +src_repo: NA +tag_prefix: NA +separator: NA