49 Commits

Author SHA1 Message Date
Jenkins
e4c0d38df7 Merge "Add playbook to manage power state of ironic servers" 2016-04-18 18:40:50 +00:00
James E. Blair
380ed13d54 Don't pass URL to safe jenkins shutdown
We're already on the host, and this defaults to localhost, so this
is simpler and doesn't go through the apache proxy.

Change-Id: Iac1047dc0a482d21466ab062f3aa3b0ef9144f38
2016-04-15 14:29:23 -07:00
Jenkins
d2b23c3a43 Merge "Start namespacing ansible group_vars" 2016-03-27 17:38:41 +00:00
Yolanda Robla
5bab327c2d Add playbook to manage power state of ironic servers
The playbook accepts target and power_state as arguments.

Change-Id: I60abd75b3605098fbcca8bcf1b6406a886a5996a
2016-03-15 15:26:52 +01:00
Monty Taylor
e8e201cc75 Add a playbook and script for doing adhoc puppet
Running puppet remotely in an ad-hoc manner on disabled hosts is mildly
complex. To facilitate, have a wide open playbook that we always run
with --limit - and a shell script to help us type less.

Change-Id: I629072dcada38d0465d351b1b99828466405372f
2016-03-09 14:23:49 -06:00
Jenkins
cac1ae7c80 Merge "Set project quotas on east infra-cloud" 2016-02-26 06:08:42 +00:00
Yolanda Robla
ffcbfd0796 Fix in parameters to configure puppet
Change-Id: I39f4e49e7d22310a1f508d538c12a302f4c8e6e3
2016-02-25 22:22:54 +01:00
Jenkins
c837752f3f Merge "Instruct puppet to configure settings before applying" 2016-02-25 21:21:07 +00:00
Jenkins
a2e4c3a6c8 Merge "Set default secgroup rules for east" 2016-02-25 21:05:27 +00:00
Ricardo Carrillo Cruz
fa9b0719fd Set project quotas on east infra-cloud
Putting this upfront, as we have agreed to put infra-cloud east
in prod soon.

Change-Id: I370176e7ff7d0c9361f6db110a9a1c77bd06ce4d
2016-02-25 21:43:15 +01:00
Jenkins
6658ee2205 Merge "Fix project on set infracloud project quotas playbook" 2016-02-25 20:13:05 +00:00
Jenkins
c070992791 Merge "Create role and playbook to set default secgroup in infracloud" 2016-02-25 19:22:29 +00:00
Ricardo Carrillo Cruz
c102e59857 Set default secgroup rules for east
This is in preparation for the east infra-cloud rollout.

Change-Id: Ie083aa5866ba60c177f95b374bee781018946be8
2016-02-25 17:56:38 +01:00
Ricardo Carrillo Cruz
01fe551c9b Fix project on set infracloud project quotas playbook
This needs the admin project, instead of the jenkins project.

Change-Id: Iccc8a00adae5946e3cd7a2e8ba4bce3e991fd34d
2016-02-25 17:22:25 +01:00
Jenkins
c57170d238 Merge "Playbook for setting the infracloud jenkins project quotas" 2016-02-25 16:19:00 +00:00
Jenkins
d0d11e1333 Merge "Create set_hostname role and playbook" 2016-02-24 23:34:36 +00:00
Ricardo Carrillo Cruz
7e1baa120e Create role and playbook to set default secgroup in infracloud
We'll add another task on the play to run on east when it's in prod,
doing west now.

Change-Id: I1bddb8f3e6a577487fbee5c4b5344047b0619d94
2016-02-24 20:36:58 +01:00
Monty Taylor
a97a3d4c7a Start namespacing ansible group_vars
It's fine right now with 5, but over time if we keep a flat namespae,
which is not necessary, it's just going to get ugly.

Change-Id: I07a143f45f2eb100c231ea1b7dd617b40f8f231c
2016-02-24 11:57:32 -06:00
Ricardo Carrillo Cruz
7679a0bcb5 Playbook for setting the infracloud jenkins project quotas
We are only deploying West for now, so just doing West.
When we get East in production, we would update this playbook.
Unfortunate there is no Ansible module or Puppet resources to set
quotas per-project, thus using regular shell module in Ansible.

Change-Id: Ib884508bebedc9f88fac242711af98fc0c4d95ec
2016-02-24 18:43:42 +01:00
Monty Taylor
658b0958ff Configure the host to report to puppetdb as
We need to plumb through a configured host setting to report to puppetdb
as so that certs work.

Change-Id: I290ad569283390bac2a74a9991331c9e86821ab7
2016-02-24 11:38:10 -06:00
Ricardo Carrillo Cruz
be31fead2f Create set_hostname role and playbook
Turns out we have had many issues with random servers having
wrong hostname and /etc/hosts info.
This playbook/role allows to configure that by passing
-e "target=<hostname>" as ansible-playbook parameter.

Change-Id: I73939ebc65211a840bb41370c22b111112389716
2016-02-24 01:17:47 +01:00
Colleen Murphy
faa60d37d3 Add the baremetal hpuswest host to the ansible
Change-Id: I6018c4f3cec9693d2b4e633a43ef82028f2923e4
2016-02-23 11:49:19 -08:00
Yolanda Robla
c5b5ba2c42 Instruct puppet to configure settings before applying
In a clean deploy of infra cloud, the puppet environment
is not configured from scratch. That will prevent puppet to run
because it won't find the /opt/system-config/production/modules.

The config option of the ansible role will configure properly
all settings before trying to apply it, and things will work
properly.

Change-Id: I736e10623fb3ba90b3320cc20758a18c70930be0
Depends-On: I6cb8dff569f2cca8bca7359412d01cc7ec009c54
2016-02-18 15:43:33 +01:00
Jenkins
ab0124fd1f Merge "Don't run infracloud puppet twice" 2016-02-16 00:51:45 +00:00
Jenkins
758021a9f4 Merge "Configure out puppet runs to log to syslog" 2016-02-12 18:10:36 +00:00
Spencer Krum
6909ac2e59 Don't run infracloud puppet twice
Without this patch, we would run infracloud in its playbook, then again
in the 'everybody else' playbook.

Co-Authored-By: Colleen Murphy <colleen@gazlene.net>
Change-Id: I3de1de8f0f74e52a443c0b7a6ef6ae0a2cf7e801
2016-02-10 19:54:02 -08:00
Jenkins
e9fce31aa2 Merge "Add infracloud playbook" 2016-02-10 19:58:04 +00:00
Colleen Murphy
32f956f268 Add infracloud playbook
Add separate playbook for infacloud nodes to ensure they run in the
correct order - baremetal -> controller -> compute.

Baremetal is intentionally left out, it is not ready yet.

All 'disabled' flags on infracloud hosts are turned off. This patch
landing turns on management of the infracloud.

Co-Authored-By: Yolanda Robla <info@ysoft.biz>
Co-Authored-By: Spencer Krum <nibz@spencerkrum.com>
Change-Id: Ieeda072d45f7454d6412295c2c6a0cf7ce61d952
2016-02-08 18:03:02 -08:00
James E. Blair
5cb4ec7f5d Add playbook to run JJB on all jenkins masters
Change-Id: Ic60a3379ca79ad04ae959f3e7acc6ec46d3b32cc
2016-02-08 11:10:12 -08:00
Monty Taylor
63325581c1 Configure out puppet runs to log to syslog
The puppet ansible module is growing a flag to be able to send stdout to
syslog. It's growing that because we want to use it. Let's.

Change-Id: I22b1d0e1fb635f2c626d75a11764725c8753bf24
2016-01-21 18:36:16 -05:00
Monty Taylor
4e62f20007 Use puppet apply instead of puppet agent
At long last, the day of reckoning is here. Run puppet apply and then
copy the log files back and post them to puppetdb.

Change-Id: I919fea64df0fbb8681e91ac9425b4c43760bb3dd
2016-01-19 18:40:28 -05:00
Monty Taylor
6bcf9aea71 Don't rsync puppet on localhost
We don't need to rsync to ourselves. Best case it's a no-op. Worst case
something weird happens and we overwrite ourselves while running.

Change-Id: I890ea487d7a6129b7477b6d17b6a7e3c1904bade
2016-01-19 11:15:08 -05:00
Monty Taylor
b8b5cf748a Use /opt not /etc as the system-config location
/etc/system-config isn't really a thing.

Change-Id: I8b0598a7645e2dd3505ac239e6194e7f165d2ee7
2016-01-19 11:10:22 -05:00
Monty Taylor
2f9b98b3cd Use the puppet role to copy the puppet code
When we do it as a second playbook, the failure to copy updated code
cannot prevent puppet from running.

Change-Id: I94b06988a20da4c0c2cf492485997ec49c3dca13
Depends-On: I22b7a21778d514a0a1ab04a76f03fdc9c58a05b3
2016-01-19 08:09:01 -05:00
Monty Taylor
f1b9b864f7 Translate the rest of run_all.sh to ansible
There are a few things that are run as part of run_all.sh that are
not logged into puppet_run_all.log - namely git cloning, module installation
and ansible role installation. Let's go ahead and do those in a playbook
so that we can see their output while we're watching the log file.

Change-Id: I6982452f1e572b7bc5a7b7d167c1ccc159c94e66
2016-01-10 12:38:22 -05:00
Monty Taylor
fdc24ccbb3 Add a missing colon
Change-Id: I0cc28d99e6e68fa82a9689fb9588c7680a39938c
2015-11-30 17:10:40 -06:00
Monty Taylor
7cee605a77 Add shade and openstack inventory to system
We're not ready to move from puppet inventory to openstack inventory
just yet, so don't actually swap the dynamic inventory plugin. But, add
it to the system so that running manual tests of all of the pieces is
possible.

Add the currently administratively disabled hosts to the disabled group
so that we can verify this works.

Change-Id: I73931332b2917b71a008f9213365f7594f69c41e
2015-11-28 15:59:10 -05:00
Spencer Krum
d7453b1d64 Don't manage hieradata on Puppetmaster
Puppet the puppetmaster first

Change-Id: I2ecd63c73de6f9eb915900418c5656eb5d6a2816
2015-11-28 12:48:33 -08:00
Jenkins
74a815209a Merge "Start copying hiera data everywhere" 2015-11-28 19:39:27 +00:00
Spencer Krum
b45869aeff Ensure hieradata directory on clients
Change-Id: I1b5dc10d58a3ad06ed63e5ede7e95dd0e22fbbe7
2015-11-27 11:04:20 -08:00
Monty Taylor
43d26acad8 Start copying hiera data everywhere
One step before flipping the switch, start copying hieradata, even
though we're still using agent, so that we can verify as much as we
want.

Change-Id: Iae63fd056cdb17aedd6526b9cbc1d83037ddcbb3
2015-11-24 19:17:35 -05:00
Monty Taylor
a8cc470f45 Ensure system-config hieradata link exists
We use a symlink into /opt/system-config to make the hiera.yaml config
sane. Make sure it's there.

Change-Id: I5e9681ac8fca71ce2f439eed3ef1281ba228d5b2
2015-11-24 16:49:22 -05:00
Monty Taylor
8ff794f599 Copy system-config and puppet modules everywhere
If we're going to run puppet apply on all of our nodes, they need
the puppet modules installed on them first.

Change-Id: I84b80818fa54d1ddc4d46fead663ed4212bb6ff3
2015-11-24 16:32:00 -05:00
Isaac Beckman
ba06551181 Set gather_facts true in ansible playbooks
This is need to support ansible built-in facts
used by puppet-ansible

Change-Id: Id8d14905e12c1d25c49322dd4c418b3f47c0d7c4
2015-11-23 16:40:55 +02:00
Timothy R. Chavez
c4c95b11d8 Move playbook to correct location
Move the restart_jenkins_master.yaml playbook to the proper playbooks
location.

Change-Id: Ia2879feca53e0d742ac0b1e3540b573ed8adee19
2015-11-04 13:46:18 -06:00
Jenkins
3493be1916 Merge "Add some in-tree ansible group vars" 2015-11-03 14:12:54 +00:00
Monty Taylor
2b4ece5fb7 Add an ansible playbook for project renames
There are still a few manual tasks, but this takes care of the vast
majority of them.

Change-Id: I919ba42b0d22126719daa7ad308f75ce021720b7
2015-11-01 01:33:33 +00:00
Monty Taylor
1e862a9ade Add some in-tree ansible group vars
As we're using these roles, we'll want to pass potentially different
values to different of our hosts over time. For instance, we may want to
set the jenkins servers to start using puppet apply before we get all
the hosts there. Since we run most of the hosts in a big matching
mechanism, the way we can pass different input values to each host.

Change-Id: I5698355df0c13cd11fe5987787e65ee85a384256
2015-10-30 02:33:27 +00:00
Monty Taylor
d039a62045 Move playbooks out of the puppet module
/etc/ansible/playbooks isn't actually a thing, it was just a convenient
place to put things. However, to enable puppet apply, we're going to
want a group_vars directory adjacent to the playbooks, so having them be
a subdirectory of the puppet module and installed by it is just extra
complexity. Also, if we run out of system-config, then it'll be easier
to work with things like what we do with puppet environments for testing
things.

Change-Id: I947521a73051a44036e7f4c45ce74a79637f5a8b
2015-10-30 11:31:05 +09:00