Commit Graph

27 Commits

Author SHA1 Message Date
Paul Belanger c3c980e21d Split nodepool service state into own task
It is possible we want to enable a service on boot, but don't want to
ensure it is currently running. This splits our systemd tasks into 2
different checks now.

Change-Id: Ib37371031a871d0d57b390e2430ea1efb3094171
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-01-20 18:23:39 -05:00
Paul Belanger d9a53413cf Clean up punctuation
Change-Id: Id8cb719c8b0117724c6829fab7ed17e839adc4be
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-01-20 16:53:13 -05:00
Paul Belanger 48531f50f1 Fix truthy value should be true or false
While testing out molecule, the following warnings were raised with its
linter.  Lets fix them to keep it happy.

Change-Id: I698f65daa58822f7befc72b9dcbf1f2d668cab02
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-08-17 12:31:28 -04:00
Paul Belanger c8103941ba
Switch to systemd task for services
Now that we only support systemd, we can switch to the systemd task in
ansible. This add support for the daemon-reload option.

Change-Id: I3ea9b5b54536cfca18739304fcc737e70769e0e8
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-29 18:03:40 -04:00
Paul Belanger 5c8d047bd4
Switch to systemd configuration files
Now that we are using systemd everywhere, we can simplify our service
configuration.

Change-Id: I9bacb3925f8e95587d459284758de337f9a270c3
Depends-On: I37ae527a93f5d5300c9ac4a1b4a6ca4363e7096d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-29 10:49:48 -04:00
Paul Belanger dbeb2cb052
Allow user to manage specific service / config files
Increase the ability for a user to toggle control over the specific
service / config files.

Change-Id: I5011bdd0b299a4f09a3fe49b3888d48b658908b9
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-29 09:18:10 -04:00
Paul Belanger 5a2fdd352e Switch to feature/zuulv3 branch
Change-Id: Ia1c530fc57f50d255e87e066c292bcbe09cdd094
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-03-29 14:02:01 -04:00
Paul Belanger f0701463ec Include service scripts and config with service manage flag
If we are not managing the service, don't both managing the service
init script and service config.

Change-Id: Ibe19aa867f89401b11993bddaf542b150b2d9b1c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-12-27 14:03:35 -05:00
Paul Belanger 5dc334c41b Switch to template so users can use it
Even though we are not templating files, it doesn't mean users won't.
So, replace copy with template.

Change-Id: I82f28c1951221a81083de66e4495de5fdcc5bdee
Depends-On: I4ac2a4b9de91b0cd949f835b6f06d1aca3720150
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-12-24 15:04:06 -05:00
Paul Belanger 7ae472381d Add nodepool-launcher support
We now have the ability to scale out nodepool-launcher, on a single
instance.

Change-Id: Ib7792ea591c7e1ce953730791884566f77fcbd33
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-10-08 16:01:20 -04:00
Paul Belanger c95988bccb Add nodepool-deleter support
We now have the ability to scale out nodepool-deleter, on a single
instance.

Change-Id: Idce9a7a1f49ae7b433009967bc1df220b0c35e00
Depends-On: I84a727198f0f3b1d3fbd0564b9ccb120648069cd
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-10-08 11:13:29 -04:00
Paul Belanger 2644350b7d Register the results of file changes
The idea here is to expose information to users to allow them to make
decisions, for example restarting a service.

Change-Id: Ifbc45af72db820c842c83d7af1adb460969a7336
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-10-07 21:15:13 -04:00
Paul Belanger 7d719fe355
Add nodepool_task_manager to expose control of tasks
There might be a time were we only want run the pre task, so rather
then copying the code into another modules, just allow the user to
override the task list that runs.

Change-Id: I15f58454607c5c56f9bb092036a656618b6b3c20
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-09-03 22:10:30 -04:00
Paul Belanger 2658537bb4
Per service configuration
Since it is possible to run both nodepool and nodepool-builder, we
should give the user 2 different configuration files.

Change-Id: I9e825a331d04124a2548203cfd8d77935fdf7bb6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-08-31 20:40:16 -04:00
Paul Belanger e411d22260 Add service manage variables
It is possible that a user will not want the roles to control the
service settings. For example, if a service dies and you don't want to
auto restart it.

Change-Id: Iaed9769c943412d14674b7c5a9f2d7b899480746
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-02-05 10:36:00 -05:00
Leif Madsen 212a191c4d Drop unnecessary relational paths in copy module
* add tests to validate files are installed
* change to match zuul style service configuration
* fix invalid tests added first time around
* add missing defaults
* drop nodepool.sysconfig and move to proper location

Change-Id: Iee0b11897d7f4916035ab2d92c5d2dd755341670
2016-01-28 13:36:16 -05:00
Paul Belanger 539b27a6d2 Add nodepool-builder support
Change-Id: Ia8786c2bf118089d9ded53257ec6d3dec6cb9c14
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-01-26 16:36:24 -05:00
Paul Belanger 617c03797c Switch back to init.d for Ubuntu 14.04
Upstart is dead moving forward, just skip using it until systemd is
default for Debian.

Change-Id: I3ca250523d2871097001df0c76b3b83f57eb5c99
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-12-13 18:11:04 -05:00
Paul Belanger f83b589c3b Expose nodepool service to user
Change-Id: I081cceb8ee54ab7925fa555a34c6a306530e886e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-12-12 20:57:43 -05:00
Paul Belanger 67389655d5 Remove restart handler
At the moment, we don't have a good control on when to actually
restart nodepool. So, it is possible weird things can happen.  Also,
most of the configuration of nodepool is read in realtime, so reloads
are really needed.

Change-Id: Ice81ffb8ecd08b88e42ef1eb775720ed1744e08c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-12-12 18:53:19 -05:00
Paul Belanger b08a112351 Refactor nodepool service
Allow the user to override the service settings and add unit tests.

Change-Id: I2d9409d210015a202f33eca970d02be137617de7
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-12-12 15:58:35 -05:00
Paul Belanger 7b4be1fc02 Fix duplicate service code
Move code block up a level so we don't duplicated logic in redhat.yaml
and debian.yaml

Change-Id: Ie0b8ac7af7d67ec7e0ea8c0468eff13ebeaba600
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-11-21 19:23:59 -05:00
Paul Belanger 8f9c7cf2d2 Add upstart logic for ubuntu systems
Change-Id: Iaab229aab0294329ca6fefbea274f69884f03105
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-11-21 14:51:48 -05:00
Paul Belanger 91eb254d7d Add LICENSE headers
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-11-10 09:40:44 -05:00
Paul Belanger 3144d2b2e5 Refactor service task to be OS specific
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-09-03 16:11:14 +00:00
Paul Belanger a97239472a First pass for configuration
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-09-03 15:53:36 +00:00
Paul Belanger 16fffcdcbc Initial commit
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-08-28 21:08:14 -04:00