Commit Graph

43 Commits

Author SHA1 Message Date
Gonéri Le Bouder da70ca7f5e avoid yamllint check failure
Avoid a failure of yamllint because of the format of its own
configuration file :-).

Change-Id: I80936280019469f406c057b80580882d71d2abbc
2020-04-30 16:42:55 -04:00
Paul Belanger 9077742fd4 Support server groups with launch-node.py
If a cloud is setup to use server groups, then select it based on the
group we pass via the CLI.

Change-Id: I2662af9daa39024a306d6e60eb8c71a450b67701
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-05-03 19:14:53 -04:00
Paul Belanger 3d4f50204f Add support for unattended-updates
This allow us to start managing updates on windmill deployments.

Change-Id: Iacfa1f59e1e0da97c354c81f0c9d3ae0bd2c8cda
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-05-02 11:44:27 -04:00
Paul Belanger 58d9d43115 Rename openstack roles to windmill
This is because we are now hosting the roles on opendev.org/windmill.

Change-Id: Icdef724140607862782b37b5d300525deb27c1d5
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-04-20 15:14:20 -04:00
Paul Belanger 6bc3ffd251 Revert "Disable windmill tests"
This reverts commit 437fa8600428b7e906071162e9a88efcb014275c.

Depends-On: https://review.opendev.org/654017
Change-Id: I81ba9ffa9cdaf3e2f757e2721c0bb68a819eaeda
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-04-20 13:15:30 -04:00
Paul Belanger 318c09aa5a Fix requirements.yaml paths
Clone directly from opendev.org now, and avoide redirects. This also
fixes gate jobs.

Change-Id: I4c3f028cdf435ca9f388cecf7ffee3a1a5be0374
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-04-20 13:14:03 -04:00
Paul Belanger 54f1558745 Disable windmill tests
We're not able to land a fix due to cross-project dependencies. For now,
don't gate on windmill testing. Once fixed, we'll revert this.

Change-Id: I36631cddd6384324d6ffbe9ff70f24e057355f92
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-04-20 13:13:53 -04:00
OpenDev Sysadmins a89e1f1b43 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:52:08 +00:00
Paul Belanger 54bec263a0 Add haveged role to bootstrap
It is helpful to install haveged so we don't run out of entropy.

Change-Id: I6c89b9d618a53f822ae8a9edb0528ac710f19da7
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-04-03 19:40:56 -04:00
Paul Belanger c51aed035e Add postfix to bootstrap playbook
It is helpful to enable email services by default, so we can get
notified of issues.

Change-Id: I326c4cdc1cc326904e12338a3ed96b2c59a4cc06
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-04-01 21:45:56 -04:00
Paul Belanger 216a94bbea Add /root/.forward file
This check will check windmill_root_users, if they have an email
address, include them in root user forward file for external
notifications.

Change-Id: Ib27b6d23823b477664c413915bf3d5dcf0908294
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-31 19:55:23 -04:00
Zuul f76efd0829 Merge "Add hostname role" 2019-03-28 16:37:05 +00:00
Paul Belanger 274e778a37 Add hostname role
When we bootstrap a server, properly setup /etc/hosts.

Change-Id: I265205f290d3fdc06d0b38aedaba9616cbe32520
Depends-On: https://review.openstack.org/648424
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-28 11:35:40 -04:00
Paul Belanger 21d2e102a9 Set UID_MIN / GID_MIN to 3000
This is helpful to ensure as we create more windmill_users, they will
use the range under 3000. But new services will be created above 3000.

Change-Id: Ib40fdcc6d255cd66b4d95bd4fee9dd18c98fddd3
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-28 11:01:31 -04:00
Paul Belanger 1bf6251c33 Add playbooks to start/stop/restart zookeeper
This does not provide rolling restart support, the user should use
--limit properly here.

Change-Id: Id2c3453e67407053454b30d1241f03295b96394b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-26 12:23:52 -04:00
Paul Belanger 05da165d6a Also include gear group with zuul start/stop playbooks
Change-Id: I870e6b47bf606a232b5dd65f87bd66dbefb84e9b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-23 22:36:10 -04:00
Paul Belanger 3b36b26a0f Update iptables role for ip / dns addresses
We now support both an ip / dns address for iptables_allowed_hosts. As a
result we replaced hostname with address.

Change-Id: Ia1accc226ca2ecdafeec4d45ad9296b6fc42b254
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-21 20:02:20 -04:00
Paul Belanger 0297e898f6 Add iptables role
Until the migration for opendev is finished, should be a few weeks, it
doesn't make sense to create new repos to only be moved. For now, we can
source this code in tree, then properly create a new external repo.

Change-Id: If61428718687b903e4b846e76f07bdd399e22134
Depends-On: https://review.openstack.org/645297
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-21 14:23:39 -04:00
Paul Belanger 9000c5a8c2 Pass inventory file to ansible-runner
It is possible for our windmill-config directory to have another
inventory file. In an effort to stop ansible from picking more then one,
we can force the inventory we want.

Change-Id: Iaf543f0fea3a2f247205b382e86af61d1c321aa4
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-19 22:10:33 -04:00
Paul Belanger 32334f78db Update users role to support redhat
TIL: sudo doesn't exist on Fedora, it is wheel.

Change-Id: I417afa2d871e8f7de49be6a7b02e1ccd1e10bcef
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-16 19:58:57 -04:00
Paul Belanger 9f5bab1863 Refactor windmill_users logic
We now have windmill_users, which is all the users in the system. And
windmill_root_users indicate which users should be considered root.

Change-Id: I2f2240a9fef36372f5aa0642bcc7a1b5403bf60b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-16 17:56:12 -04:00
Paul Belanger 395a0a3c87 Switch to inventory_hostname for known_hosts
It is possible that we don't have ansible_hostname in hostvars, but all
hosts in the inventory will have inventory_hostname.

Change-Id: Id15c321dd86ce6cc47e90569327bea0f98b7ef43
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-15 21:28:09 -04:00
Paul Belanger 67d1711dbd Ensure groups are sorted for known_hosts
This will help make ansible more idempotent.

Change-Id: Ib6b01319125fbba0a43f9cdf2119aaf646b881db
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-15 14:35:03 -04:00
Paul Belanger 66ccfe7744 Add hostname to known_host file on bastion
Change-Id: Icc2bec0da5dbe26356dd4bf2e6f89149b2797dda
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-15 13:30:01 -04:00
Paul Belanger 1d490a3729 Manage bastion SSH known_hosts file
This attempts to manage the SSH host keys of all the hosts in the
inventory. The idea here is each host in the inventory will add a
ansible_ssh_host_key_ecdsa_public variable, then when we first run our
bastion playbook we'll properly populate the local known_hosts file each
time.

Change-Id: I26e328192a7127086e514dc62a27cb946a77440b
Depends-On: https://review.openstack.org/643408
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-15 08:37:10 -04:00
Paul Belanger 6f7db58426 Create swapfile for bootstrap playbook
Ensure all servers have a swapfile.

Change-Id: I6cd38061ce58d275e98fcbc0f82f946cb4e02554
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-14 16:05:04 -04:00
Paul Belanger f69b6d922d Fix bug around usage of --region flag
We didn't properly setup the openstack connection with region
informaiton.

Change-Id: I6daf47f404ef5c8f651168832a61db5196767075
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-04 12:59:02 -05:00
Paul Belanger 0bf2d68fa6 Remove old role path for launch node
We now are able to use the default path from ansible (~/.ansible/roles).

Change-Id: If2d2712bc01ea8fcaaa3ad80f48b98abe73f0561
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-03-01 08:47:01 -05:00
Paul Belanger 423975e547 Drop openstack.sudoers support
This didn't actually work as expected, and because our testing was
broken we never caught the failure.

Change-Id: Ic59ef3b9401bebf46150da35aca7eaf659c0a526
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-02-27 22:57:08 -05:00
Paul Belanger 4c08d1b42c Install roles into ~/.ansible/roles
This allows for us to managed multiple project roles in a single
location.

Change-Id: Ice1a40d7ba1a177f2ba6c2ebff123e7186e54087
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-02-27 21:49:41 -05:00
Paul Belanger 311c5dfecd Move sudoers logic into users role
It makes a little more sense to have our users role enable no password
for the sudo group.

Change-Id: Ibcba8b2d927dd630d8c9deeeaf5ae162ec5b1aa2
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-02-27 20:29:17 -05:00
Paul Belanger ff68b73d12 Clean up hosts statements
Change-Id: Ia72b70b701e98f401cb92d65656d4aa9a3549147
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-02-27 18:59:33 -05:00
Paul Belanger 2b0195db87 Add bastion specific play to bootstrap
This tries to solve the chicken / egg issue of bootstrapping ansible on
our bastion nodes.  Since we use ansible to launch all our servers, we
can add an additional check here to properly configure ansible on our
bastion node so we can then run ansible directly from it.

Change-Id: I38904738068435a2efaa5af7283fcbabbdc1628d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-02-27 15:53:07 -05:00
Paul Belanger 4ec262c30a Require group when launching new servers
Every host now requires a group, this is mostly because of how our
windmill playbooks are written.

Change-Id: Ia1f54ac6b43e70d5e3474a333343f3ed707b4d7d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-02-27 15:53:06 -05:00
Paul Belanger 0465f83c48 Create launch-node.py
This adds the ability for users to boot a server on openstack then
bootstrap the server for ansible, then windmill.  There is a fair bit of
assumptions here, but this is a good first start.

Change-Id: Iae2cf70975ba9ad621401db609849b4ebb8efe5d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-02-27 09:16:48 -05:00
Paul Belanger 085c8b0e3f Add playbooks for gear
We'll need to be able to manage the gear service, add playbooks for it.

Change-Id: Ic44f9d00a59dbf158ea2e50474d5c89ed1d9d557
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-01-28 11:57:19 -05:00
Paul Belanger 2fb30d0e10 Add playbooks to restart / start / stop nodepool
These are based off the playbooks for zuul.

Change-Id: I5b01e80c5d831d3fd37ccfd9532831c8b93afad7
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-01-21 00:33:48 -05:00
Paul Belanger e308d6f700 Don't start / stop disabled hosts
If a host is added to the disabled group, we shouldn't be running
commands on that host.

Change-Id: I4fa62fb6668162d2c824b85c061a2e43915c1162
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-01-19 00:32:54 -05:00
Paul Belanger 4a6b4869c3 Add restart playbook for zuul services
We can use import_playbook to first stop then start services.

Change-Id: Ifb9434ff9163ebbf48221e7d83a019a855771a67
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-01-19 00:29:59 -05:00
Paul Belanger 090d5fae38 Add playbook to start zuul service
Change-Id: I601091cae5fbf872b05966977e7eefcacf71bb5e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-01-19 00:20:51 -05:00
Paul Belanger 5693f31823 Add tox -evenv entry
This allows to install the ansible dependency if we want to run a
playbook.

Change-Id: Ia5ea5604331b739fe12e3103c4f645e221285af3
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-01-19 00:09:48 -05:00
Paul Belanger 4a622fe8d8 Initial commit
This the initial framework for testing, plus playbook to stop / start /
restart zuul.

Change-Id: Ic941dc8517591c7487c1d901ff7cf2ebb7e7e3ff
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-01-18 23:46:32 -05:00
OpenStack Project Creator 9a4982f40b Added .gitreview 2019-01-17 21:00:30 +00:00