Commit Graph

93 Commits

Author SHA1 Message Date
Paul Belanger 9ae268fa89 Add zookeeper tls support
Now that tls support is required, add support for it.

Change-Id: I36f2c0a2b2209cfa974b4686c0c32f3fe32e9cae
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2021-06-22 08:51:00 -04:00
Paul Belanger 5929076e98 Fix deprecation warning
Depends-On: https://review.opendev.org/702969
Change-Id: I501ac43f643e47603885dc006049e2b7e0381866
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2020-04-29 14:10:59 +00:00
Paul Belanger deb34c3dd3 Create nodepool_pip_virtualenv_symlink variable
Expose the ability for a user to create a symlink to a nodepool
virtualenv, this is usually needed when you start trying to version
different virtualenv installs.

Change-Id: Id77609f696dcd4083001a101fdd22ba1634f4617
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-23 15:34:48 -04:00
Paul Belanger 34bd22ca8b Add experimental installation from docker
This is our first attempt at running nodepool from docker, consider it
experimental.  The idea here, is you now have the option of using the
official docker images from https://hub.docker.com/u/zuul for nodepool.

Users themself will be required to manage / configure docker, this role
only installs / configures / starts nodepool.

Change-Id: I2f3aa301e626a7b09ff129a21a188cee06e31f18
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-02-07 16:15:03 -05:00
Paul Belanger fa67753f17 Refactor distro vars include
We can simplify this logic a little.

Change-Id: Ib7429b7409e05af5b0b82e47c04633fe8e731cb8
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-01-27 12:05:23 -05:00
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 96ac665eaa Add manage toggle for logging config
Allow a user to toggle the installation of logging files, as we allow
them to disable services.

Change-Id: Ie354cb0547fa247f940aa15222bbf4994d4201ee
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-12-20 10:45:21 -05:00
Paul Belanger 28721e46e4 Create nodepool_user_home_mode variable
and default the value to 0755.

Change-Id: I2d5374c49d682a0e8b565e61d280e73fc4619863
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-08-23 17:27:49 -04:00
Paul Belanger 4666971ac5 Switch to molecule for testing
Molecule is the defacto testing tool for ansible roles. Switch to it to
make it easier for users to test.

Change-Id: I881e895877c9702e62c4415d48b0f33f34f7487b
Depends-On: https://review.openstack.org/593369
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-08-19 11:32:19 -04: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 afd7ce2c9e
Add nodepool_user_shell variable
Expose the ability for a user to override the default shell.

Change-Id: I27d872ba6c626c65f2d66ab292cbeb10af3f5203
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-07-28 19:51:41 -04:00
liusheng 7ef2873b48 Support editable flag to pip installation
This is useful for deploying experimental CI system for testing.

Change-Id: I8f69f0b91c56bdcef125532c2725a00799382a0e
2018-07-03 09:41:42 +08:00
Paul Belanger 4223967465
Pass list of packages directly to package task
There is no need to loop over the list of packages, this is actually
slower.

Change-Id: I38361ccc9a5c84b8d2cff8fe813475e115e47bf0
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-04-14 16:39:37 -04:00
Paul Belanger 407d827893
Default nodepool_pip_executable to pip3
Moving forward, we'll only support nodepool under python3.

Change-Id: If0f9ed013819b68601e28ecfbeffa40a41d19ebc
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-04-12 20:08:25 -04:00
Paul Belanger 6a95700860
Don't install nodepool_build_depends for pip
When installing nodepool from pip (pypi.python.org) there is no need
to install the build dependenies as we download the wheel.

Change-Id: I60c87135e8d5d83c3bf810835e18926d2ad0e103
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-04-12 18:31:58 -04:00
Paul Belanger e905a23676
Remove /var/log/nodepool/images folder
This is no longer used, as nodepool manually creates
/var/log/nodepool/builds.

Change-Id: Ib27b55cc6dfed7bc9dee702ab66abb3199a27830
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-04-06 10:14:59 -04:00
Paul Belanger b871ac7a47
Merge OS-specific variables for ubuntu
Now that we are using systemd everywhere, for xenial++ there isn't a
need to release specific settings.

Change-Id: Ie4c9e658aded6f7055189903b9f448ba92af6713
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-03-05 19:04:29 -05:00
Paul Belanger 4972ff6b7f
Update nodepool_git_dest location
Stop using /opt folder to store the location of git checkout. We don't
actually need to be root user to do that.

Change-Id: Icdb2905cf66fd9ab414d009ad3d782bc802e037d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-03-04 15:17:09 -05:00
Paul Belanger e19641c9f2
Create nodepool_git_update varible
First attempt to support offline install, as it is possible for the
git repo to already be installed onto disk. This is the case now in
zuulv3, we no longer need to fetch git from a repo location.

Change-Id: Ic93ccb65014619131e335dd0d5bb2ae3c21ae98b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-10-18 10:00:16 -04:00
Paul Belanger 164d71110a
Create nodepool_pip_executable variable
Allow the user to override the location of the pip executable.

Change-Id: I47a13c168abcf35eb791ac602532fcea3f0e2a1e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-31 12:01:36 -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
Jenkins 30a17ff8d9 Merge "Create /opt/nodepool/tmp directory" 2017-05-29 16:12:32 +00: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 0975041f96
Create /opt/nodepool/tmp directory
Provide a tmp directory for nodepool-builder. This is to work around
operating systems that use tmpfs for /tmp.

Change-Id: I8f5eafe03a759a4b271e6f82946d2ffecba9f81a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-29 09:58:17 -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 d7e1665f58
Create nodepool_pip_virtualenv_python variable
This allows the user to pick the version of python used for the
virtualenv.

Change-Id: I20c513baf06a289ca8920658384042620a52627e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-26 22:06:38 -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 88e31634fa Move image.log to /var/log/nodepool/images
Change-Id: I1b89491847a14ab63e3c2a3262c0befbaffe4167
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-03-22 13:04:44 -04:00
Paul Belanger 4aeac7efea Add support to clone a refspec
Expose the ability for a user to pass a refspec to our git task.

Change-Id: I6554bfbcfbd3b7d72f3dbd89d3cc8aa3ee5725bd
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-01-22 16:21:51 -05:00
Paul Belanger c7d82ea426 Remove redundant pip install task
We can clean up our install tasks by using an include.

Change-Id: I48d5259befa2e6733e1750f56245ac6e5eff48fe
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-01-22 15:55:52 -05: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 8dc8c157eb Drop elements-dir from nodepool.yaml
This is an optional setting, and not needed to start nodepool.

Change-Id: I603b4a79f9a15ad404df4b34377c2f9fc0f7ba17
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-12-24 12:44:42 -05:00
Paul Belanger cf93f245f6 Drop scripts-dir support
This is no longer a valid setting in nodepool.

Change-Id: Iee9399cf0989eb7cfab4c71c97baf5a69c3265d0
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-12-24 11:54:50 -05:00
Paul Belanger b006d7a09f Just use redhat.yaml for now
No point running difference variables for RedHat yet, there is no
need.

Change-Id: Ie2dfb605595076ed20ea376ac5fe88479fcbd106
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-12-08 16:08:30 -05:00
Paul Belanger 40f1e5036f Add /opt/nodepool/images to required directories
Change-Id: Icfcbfc71bfa06f35c5961f8a7dd6c6b138e5fedc
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-11-26 16:56:01 -05:00
Paul Belanger 7e7896ed98 Rework include OS-specific variables logic
Because ubuntu-xenial is using systemd, and trusty is not, we now have
the need to do specific things on each version of ubuntu. As a result,
we now have 3 vars files to include.

Change-Id: I728ddd3e464a63398e16480407e0f1482bf4e106
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-11-24 13:01:54 -05:00
Adam Gandelman a831d2a607 Migrate config installation from copy -> template
This migrates installation of config files from using 'copy' to 'template',
allowing downstream users of the role the ability to carry a template in their
playbooks and have it easily rendered out simply by overriding the
nodepool_file_*_dest variables.

Depends-on: I32cc11901bddd03125e1c4ce6f246d811f414cba

Change-Id: I744b3177e2c10a3a101b73405b885ae0bd231db8
2016-10-14 13:38:36 -07: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 5b1c3321a3 Add nodepool-builder logging.conf file
Change-Id: I97a3d2d394b5daca23af2c44d4488c097e521f33
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-10-08 09:18:46 -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 7d24cad3cd Clean up logging.conf settings
Change-Id: I8117498c19b2fb72603245efce8e708276b37f10
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-10-07 20:12:20 -04:00
Paul Belanger f04741c140
Remove invalid settings
This is data that has been left over since switching away from
templates.

Change-Id: I52afbaf3364ef9134f38dd60d885644d0d66825a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-09-05 22:17:00 -04:00
Paul Belanger a0a37bddb9
Drop synchronize support for scripts
It was become too much work to deal with this. Additionally, if people
want to manually synchronize we expose the proper settings to allow
them to do so.

Change-Id: I68aedb16223146f1ff6d7c9115773e62ae4ba8c9
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-09-05 15:10:01 -04:00
Paul Belanger 7220ba6dac
Drop synchronize support for elements
It was become too much work to deal with this. Additionally, if people
want to manually synchronize we expose the proper settings to allow
them to do so.

Change-Id: I68ae9e7cb6e4a69392ea95cd0be72e01f166190e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-09-05 14:24:33 -04:00
Paul Belanger 354161295f
Stop templating secure.conf options
Simplify things by only passing the secure.conf file, not a
template.

If users need more dynamic options, they are free to template the file
first then use us to copy the file in place.

Also tests file mode for nodepool.yaml

Change-Id: I4d2eba3292b2657ef9a607497056fa94cdd1bec8
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-09-05 13:24:20 -04:00
Paul Belanger 2f6300cf03
Drop support for clouds.yaml
This really belongs in os-cloud-config role, not nodepool. For now,
users can template the file themself.

Change-Id: Ie03272f84ed22d5c01bd21bcd06f77c67e4032da
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-09-05 12:45:57 -04:00
Paul Belanger 70feab610d
Stop templating configuration options
Simplify things by only passing the nodepool.yaml file, not a
template.

If users need more dynamic options, they are free to template the file
first then use us to copy the file in place.

We'll be doing this over a series of commits, rather then 1 large
patch.

Change-Id: Id751920e31edac9a469f4624ae2a30e841245d80
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-09-05 12:43:31 -04:00