Ricardo Carrillo Cruz
27cecca0f8
Remove hardcoded region and availability zone
...
This can be set via envvar, no point in hardcoding, which btw
can lead to issues on users with accounts on regions different
to region-b
2015-08-05 11:55:50 +02:00
Ricardo Carrillo Cruz
8c6d088d3e
Add setup_env.sh Ansible bootstrap step on README
2015-08-05 09:50:09 +02:00
Ricardo Carrillo Cruz
a0e6385d59
Add setup_env.sh and requirements.txt to install dependencies
...
Kudos to Julia Kreger, I shamelessly copied the setup_env.sh
script from her fantastic bifrost project.
2015-06-04 14:18:59 +02:00
Ricardo Carrillo Cruz
0c8500e81a
Add missing -i to inventory command line argument
2015-05-26 13:23:06 +02:00
Ricardo Carrillo Cruz
806d56e97d
Add os_client_config_cloud parameter to infra_config.yml
...
Instead of hardcoding to a known clouds.yaml cloud name, allow
it to be configurable.
2015-05-26 13:21:16 +02:00
Ricardo Carrillo Cruz
fd985c23ef
Un-hardcode email addresses for Gerrit users and use domainname instead
2015-05-26 13:12:37 +02:00
Ricardo Carrillo Cruz
445fd28153
Add missing parameters to Gerrit Puppet node stanza
2015-05-26 13:11:11 +02:00
Ricardo Carrillo Cruz
d229d2dd90
Add domainname parameter to infra_config.yml.sample
2015-05-26 13:09:30 +02:00
Ricardo Carrillo Cruz
776c1e0387
Add README file
2015-05-26 13:09:10 +02:00
Ricardo Carrillo Cruz
e9d48ce3be
Add jenkins user to Non-Interactive users and fix some var naming
2015-05-13 13:02:12 +02:00
Ricardo Carrillo Cruz
7e75407b1c
Add refs/heads to git show-ref command
2015-05-13 13:01:16 +02:00
Ricardo Carrillo Cruz
13b0280408
Switch from review manifest to gerrit manifest
...
We don't need gerritbot, replication to GitHub and a bunch of
things that are set up on review.pp
2015-05-13 12:59:40 +02:00
Ricardo Carrillo Cruz
11c6c4cc1e
Disable facts gathering on top-level playbooks
...
In the playbooks logic, the facts are not used and they are a
quite expensive operation, this speeds up execution.
2015-05-13 12:58:36 +02:00
Ricardo Carrillo Cruz
01359b53c8
Fix gerrit project ssh key names in generate_hiera_common
2015-05-12 18:03:10 +02:00
Ricardo Carrillo Cruz
4cdc6f9ea0
Fix commit message on deploy_system_config
2015-05-04 16:30:22 +02:00
Ricardo Carrillo Cruz
d52fc3576d
Run git commands on the temp folder
2015-05-04 16:30:02 +02:00
Ricardo Carrillo Cruz
62741e5b0e
Specify version param to master to avoid git failure
2015-05-04 16:00:17 +02:00
Ricardo Carrillo Cruz
f72141acb2
Checkout branch locally in idempotent manner
2015-05-04 15:00:43 +02:00
Ricardo Carrillo Cruz
1b2aeebdbf
Run puppet apply against site.pp
...
No point on constructing a -e argument for puppet apply, since
site.pp is already generated and present on puppetmaster
we can simply use it as an argument for puppet apply.
Removed also puppet agent --test, since the puppet apply runs
the same config.
2015-04-29 22:00:22 +02:00
Ricardo Carrillo Cruz
0ad9920df1
Fix call to commit_changes playbook
...
It was calling prior commit_push.yml
2015-04-29 17:31:07 +02:00
Ricardo Carrillo Cruz
21da5dfb5b
Fix deploy_system_config top-level playbook filename
2015-04-29 17:26:20 +02:00
Ricardo Carrillo Cruz
a755211d72
Do not push changes to remote Git system-config anymore
...
Let's just apply changes locally on the command center server,
the whole repo is copied over with rsync to puppetmaster now.
2015-04-29 15:25:53 +02:00
Ricardo Carrillo Cruz
02383a4161
Rename deploy_site_pp to deploy_system_config
...
We deploy a whole system-config repo, not just site.pp,
thus rename makes more sense
2015-04-29 15:17:22 +02:00
Ricardo Carrillo Cruz
ae5deba4ac
Fix synchronize creating production within production folder
2015-04-29 15:04:21 +02:00
Ricardo Carrillo Cruz
4313255c41
Create /opt/system-config/production folder on puppetmaster
...
This has to be created prior to synchronize, otherwise
it fails
2015-04-29 14:35:39 +02:00
Ricardo Carrillo Cruz
e914d40602
Use rsync to copy the system-config repo to puppetmaster
...
Instead of using a Git server to stage changes on system-config,
better just copy over the local system-config from the command
center machine, the instances created by OpenStack may not have
connectivity to the Git server.
2015-04-29 13:47:47 +02:00
Ricardo Carrillo Cruz
29dc8c21c3
Fix post_puppet_gerrit playbook
...
It was referencing wrong hiera keys and variables
2015-04-29 13:34:13 +02:00
Ricardo Carrillo Cruz
062bca4b65
Leave system_config_branch and as a global var, remove others
2015-04-23 11:50:14 +02:00
Ricardo Carrillo Cruz
2bb1a0c8fc
Add key_name param to infra_config sample
2015-04-19 00:32:44 +02:00
Ricardo Carrillo Cruz
fde72be633
Remove hardcoded key_name value
...
This value should come from infra_config.yml
2015-04-19 00:32:09 +02:00
Ricardo Carrillo Cruz
3287f15613
Remove unused gerrit and zuul playbooks
2015-04-18 23:42:39 +02:00
Ricardo Carrillo Cruz
9d5650d0b7
Add infra_config.yaml sample
...
This is a sample config for users to create their own infra-ansible
config file, which will be passed to ansible-playbook with
-e "@infra_config.yaml' switch.
2015-04-18 23:20:45 +02:00
Ricardo Carrillo Cruz
abc67376b7
Remove provision_infra_servers and add pre/post playbooks
...
Running provision AND configuration on same run causes
race-conditions from dynamic inventory, like meta groups
not being available later in the play.
Better run provision_infra_servers on its own and have site.yml
just for the configuration play.
2015-04-18 23:16:29 +02:00
Ricardo Carrillo Cruz
e0b2920d7e
Use group vars from inventory in site.pp.j2 template and remove unused nodes
2015-04-18 23:14:31 +02:00
Ricardo Carrillo Cruz
81c7fc9263
Remove hardcoded security group from task
...
This value should be provided by user, instead of just assuming
all servers will just use 'default' security group
2015-04-18 23:11:58 +02:00
Ricardo Carrillo Cruz
fdc0bf7fd0
Remove unused jenkins role
2015-04-18 23:11:25 +02:00
Ricardo Carrillo Cruz
1c5c9acd19
Make generate_hiera script non idempotent
...
It's better, so a user can regenerate passwords and keys
as needed by just running the playbook/role.
2015-04-18 23:10:15 +02:00
Ricardo Carrillo Cruz
7a379dd75c
Refactor generate_hiera_common
...
Generate both private and public keys for hiera.
Fix an issue with StringIO, was reusing it in the loop
causing keys being appended one after each other.
2015-04-18 23:08:51 +02:00
Ricardo Carrillo Cruz
e32049fbcf
Delete install_required_packages task from bootstrap_puppetmaster role
...
The required packages are either installed by the common role or
the configure_puppetmaster role, this is not needed
2015-04-18 23:06:16 +02:00
Ricardo Carrillo Cruz
8511a4bc57
Trigger puppet agent after puppetmaster bootstrap
...
This is to apply config from site.pp, that is not fed on
initial puppet apply bootstrap
2015-04-18 22:46:33 +02:00
Ricardo Carrillo Cruz
894b6e14ea
Add post jenkins role and top-level playbook
2015-04-18 22:45:44 +02:00
Ricardo Carrillo Cruz
0756780c5b
Remove unused jenkins.yml top-level playbook
2015-04-18 22:45:07 +02:00
Ricardo Carrillo Cruz
2b2667fb11
Remove defaults from provision_infra_servers role
...
Those defaults were not really defaults, since that data
is very environment specific.
This is better injected via -e "@infra_config.yaml" on the command
line as an argument to ansible-playbook
2015-04-18 22:43:45 +02:00
Ricardo Carrillo Cruz
8ba4e42579
Add pre/post gerrit roles and top-level playbooks
2015-04-18 22:43:12 +02:00
Ricardo Carrillo Cruz
3c27378cc9
Rename included role to bootstrap_puppet_infra_node
2015-04-18 22:42:09 +02:00
Ricardo Carrillo Cruz
b2aeebcf27
Rename to bootstrap_puppet_infra_node
...
This role can be run against just one node, thus
no point naming it as plural
2015-04-18 22:39:51 +02:00
Ricardo Carrillo Cruz
f53f7898cf
Remove configure_puppetdb task from boostrap role
...
The puppetdb manifest is broken and not needed at all,
thus removing it from infra-ansible
2015-04-18 22:37:50 +02:00
Ricardo Carrillo Cruz
7ea66077cc
Rename jenkins playbooks/role for post_puppet_jenkins
2015-04-15 15:00:58 +02:00
Ricardo Carrillo Cruz
5e45ee856d
Remove infra_config.yml from being controlled by git
...
infra_config.yml is environment specific, thus no point in having
it in repo
2015-04-15 13:26:14 +02:00
Ricardo Carrillo Cruz
993ebdf54c
Add jenkins role and top-level playbook
...
This role creates the JJB user on Jenkins and kicks-off
a jenkins-jobs update run.
2015-04-15 13:21:51 +02:00