Merge "[ironic-agent] Use svc-map for enabling agent"
This commit is contained in:
commit
b2fd0f3ad7
@ -16,5 +16,10 @@ Beyond installing the ironic-python-agent, this element does the following:
|
|||||||
in order to support source based installation of ironic-python-agent and its
|
in order to support source based installation of ironic-python-agent and its
|
||||||
dependencies.
|
dependencies.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
The package based install currently only enables the service when using the
|
||||||
|
systemd init system. This can easily be changed if there is an agent
|
||||||
|
package which includes upstart or sysv packaging.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Using the ramdisk will require at least 1.5GB of ram
|
Using the ramdisk will require at least 1.5GB of ram
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
dhcp-all-interfaces
|
dhcp-all-interfaces
|
||||||
|
package-installs
|
||||||
|
pkg-map
|
||||||
source-repositories
|
source-repositories
|
||||||
|
svc-map
|
||||||
|
@ -28,8 +28,7 @@ case "$DIB_INIT_SYSTEM" in
|
|||||||
install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.conf /etc/init/ironic-python-agent.conf
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.conf /etc/init/ironic-python-agent.conf
|
||||||
;;
|
;;
|
||||||
systemd)
|
systemd)
|
||||||
install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.service /usr/lib/systemd/system/ironic-python-agent.service
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.service /usr/lib/systemd/system/$(svc-map ironic-python-agent).service
|
||||||
systemctl enable ironic-python-agent.service
|
|
||||||
;;
|
;;
|
||||||
sysv)
|
sysv)
|
||||||
install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.init /etc/init.d/ironic-python-agent.init
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.init /etc/init.d/ironic-python-agent.init
|
||||||
|
@ -14,7 +14,7 @@ umask 022
|
|||||||
expect stop
|
expect stop
|
||||||
|
|
||||||
pre-start script
|
pre-start script
|
||||||
echo Starting Ironic Python Agnet
|
echo Starting Ironic Python Agent
|
||||||
end script
|
end script
|
||||||
|
|
||||||
exec /usr/bin/ironic-python-agent
|
exec /usr/bin/ironic-python-agent
|
||||||
|
@ -23,11 +23,10 @@ case "$DIB_INIT_SYSTEM" in
|
|||||||
;;
|
;;
|
||||||
systemd)
|
systemd)
|
||||||
systemctl disable iptables.service
|
systemctl disable iptables.service
|
||||||
systemctl enable openstack-ironic-python-agent.service
|
systemctl enable $(svc-map ironic-python-agent).service
|
||||||
;;
|
;;
|
||||||
sysv)
|
sysv)
|
||||||
update-rc.d iptables disable
|
update-rc.d iptables disable
|
||||||
update-rc.d openstack-ironic-python-agent enable
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unsupported init system"
|
echo "Unsupported init system"
|
||||||
|
4
elements/ironic-agent/svc-map
Normal file
4
elements/ironic-agent/svc-map
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
ironic-python-agent:
|
||||||
|
default: openstack-ironic-python-agent
|
||||||
|
redhat: openstack-ironic-python-agent
|
||||||
|
debian: ironic-python-agent
|
Loading…
Reference in New Issue
Block a user