-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
182 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=StackStorm service st2actionrunner | ||
After=network.target | ||
|
||
[Service] | ||
Type=oneshot | ||
EnvironmentFile=-/etc/sysconfig/st2actionrunner | ||
ExecStart=/bin/bash /usr/share/python/st2actions/bin/runners.sh start | ||
ExecStop=/bin/bash /usr/share/python/st2actions/bin/runners.sh start stop | ||
RemainAfterExit=true | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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,17 @@ | ||
[Unit] | ||
Description=StackStorm service st2actionrunner | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
Environment="DAEMON_ARGS=--config-file /etc/st2/st2.conf" | ||
Environment="WORKERID=%i" | ||
EnvironmentFile=-/etc/sysconfig/st2actionrunner | ||
ExecStart=/usr/bin/st2actionrunner $DAEMON_ARGS | ||
TimeoutSec=60 | ||
PrivateTmp=true | ||
Restart=on-failure | ||
RestartSec=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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 |
---|---|---|
@@ -1,5 +1,53 @@ | ||
%define package st2actions | ||
%define specs_dir /root/code/rpmspec | ||
%define _builddir /root/code/%{package} | ||
%define _sourcedir /root/code | ||
%define specdir /root/code/rpmspec | ||
%include %{specdir}/package_top.spec | ||
|
||
%include %{specs_dir}/venv_package.spec | ||
Summary: st2actions - StackStorm API component | ||
Requires: st2common = %{version}-%{release} | ||
|
||
%include %{specdir}/package_venv.spec | ||
%include %{specdir}/helpers.spec | ||
|
||
%description | ||
<insert long description, indented with spaces> | ||
|
||
%install | ||
%default_install | ||
%pip_install_venv | ||
|
||
# systemd service file | ||
mkdir -p %{buildroot}%{_unitdir} | ||
install -m0644 %{SOURCE0}/rpm/st2actionrunner.service %{buildroot}%{_unitdir}/st2actionrunner.service | ||
install -m0644 %{SOURCE0}/rpm/st2actionrunner@.service %{buildroot}%{_unitdir}/st2actionrunner@.service | ||
install -m0644 %{SOURCE0}/rpm/st2notifier.service %{buildroot}%{_unitdir}/st2notifier.service | ||
install -m0644 %{SOURCE0}/rpm/st2resultstracker.service %{buildroot}%{_unitdir}/st2resultstracker.service | ||
make post_install DESTDIR=%{?buildroot} | ||
|
||
%prep | ||
rm -rf %{buildroot} | ||
mkdir -p %{buildroot} | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
||
%pre | ||
%inst_venv_divertions | ||
|
||
%preun | ||
%systemd_preun st2actionrunner | ||
%systemd_preun st2notifier | ||
%systemd_preun st2resultstracker | ||
|
||
%postun | ||
%uninst_venv_divertions | ||
%systemd_postun | ||
|
||
%files | ||
%{_bindir}/* | ||
%{_datadir}/python/%{name} | ||
%config(noreplace) %{_sysconfdir}/%{name}/* | ||
%{_unitdir}/st2actionrunner.service | ||
%{_unitdir}/st2actionrunner@.service | ||
%{_unitdir}/st2notifier.service | ||
%{_unitdir}/st2resultstracker.service |
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,18 @@ | ||
[Unit] | ||
Description=StackStorm service st2notifier | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
User=st2 | ||
Group=st2 | ||
Environment="DAEMON_ARGS=--config-file /etc/st2/st2.conf" | ||
EnvironmentFile=-/etc/sysconfig/st2notifier | ||
ExecStart=/usr/bin/st2notifier $DAEMON_ARGS | ||
TimeoutSec=60 | ||
PrivateTmp=true | ||
Restart=on-failure | ||
RestartSec=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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,18 @@ | ||
[Unit] | ||
Description=StackStorm service st2resultstracker | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
User=st2 | ||
Group=st2 | ||
Environment="DAEMON_ARGS=--config-file /etc/st2/st2.conf" | ||
EnvironmentFile=-/etc/sysconfig/st2resultstracker | ||
ExecStart=/usr/bin/st2resultstracker $DAEMON_ARGS | ||
TimeoutSec=60 | ||
PrivateTmp=true | ||
Restart=on-failure | ||
RestartSec=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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
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,18 @@ | ||
[Unit] | ||
Description=StackStorm service st2auth | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
User=st2 | ||
Group=st2 | ||
Environment="DAEMON_ARGS=--config-file /etc/st2/st2.conf" | ||
EnvironmentFile=/etc/sysconfig/st2notifier | ||
ExecStart=/usr/bin/st2auth ${DAEMON_ARGS} | ||
TimeoutSec=60 | ||
PrivateTmp=true | ||
Restart=on-failure | ||
RestartSec=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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 |
---|---|---|
@@ -1,5 +1,45 @@ | ||
%define package st2auth | ||
%define specs_dir /root/code/rpmspec | ||
%define _builddir /root/code/%{package} | ||
%define _sourcedir /root/code | ||
%define specdir /root/code/rpmspec | ||
%include %{specdir}/package_top.spec | ||
|
||
%include %{specs_dir}/venv_package.spec | ||
Summary: St2Auth - StackStorm authentication service component | ||
Requires: st2common = %{version}-%{release} | ||
|
||
%include %{specdir}/package_venv.spec | ||
%include %{specdir}/helpers.spec | ||
|
||
%description | ||
<insert long description, indented with spaces> | ||
|
||
%install | ||
%default_install | ||
%pip_install_venv | ||
|
||
# systemd service file | ||
mkdir -p %{buildroot}%{_unitdir} | ||
install -m0644 %{SOURCE0}/rpm/%{name}.service %{buildroot}%{_unitdir}/%{name}.service | ||
make post_install DESTDIR=%{?buildroot} | ||
|
||
%prep | ||
rm -rf %{buildroot} | ||
mkdir -p %{buildroot} | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
||
%pre | ||
%inst_venv_divertions | ||
|
||
%preun | ||
%systemd_preun %{name} | ||
|
||
%postun | ||
%uninst_venv_divertions | ||
%systemd_postun | ||
|
||
%files | ||
%{_bindir}/* | ||
%{_datadir}/python/%{name} | ||
%config(noreplace) %{_sysconfdir}/%{name}/* | ||
%{_unitdir}/%{name}.service |