Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update example configuration for Xenial refactor. #19

Merged
merged 37 commits into from
Oct 4, 2017
Merged

Conversation

nuclearsandwich
Copy link
Contributor

Connects with ros-infrastructure/buildfarm_deployment#146

This is a big refactor and the majority of the changes are structural rather than changes in the final effect. Especially with this config which should only really be used as an example.

  • instead of each role having its own improperly named common.yaml there is now a single with values that are indeed common and role-specific configuration has been moved into individual files keyed on the buildfarm_role. The role specified as $1 on the reconfigure script is passed to puppet as the Facter fact buildfarm_role.

  • The prerequisites puppet and librarian are now installed from the upstream repository as xenial uses puppet 3.8. We'll be able to keep this until we migrate up from xenial or switch to puppet 4.

  • reconfigure.bash targets the xenial branch of the buildfarm_deployment puppet scripts and uses Puppet's "future" parser, which means our puppet code is being parsed by the puppet 4.x parser, allowing us to migrate more readily in the future if and when we need to.

As a side note, there's a lot of drift between the example and production configurations due to the fact that they cannot reasonably share GitHub history as the production config includes secrets such as tokens and private keys. We're discussing

Rather than change the username now, I'm trying to break this stuff up
into different profiles for Jenkins master and agents, that can coexist
on a single machine rather than be copy-pasted.
Start using the puppet 'future' aka puppet 4 parser now.
This allows us to use explicit data types in parameters and gets us
ready for a migration to puppet 4.
They got caught up in the slave->agent rename but can't be redone yet.
This uses hiera to keep things a little cleaner. It uses an actually
common common.yaml for things like the master and repo IPs and other
shared values, then uses a custom fact, buildfarm_role, to apply
hierarchy specific to that role.

I have not yet changed the puppet invocation as I also need to create
the role modules to complement the profile ones.
With this change and the analogous one in the buildfarm_deployment
repository the different high level roles are refactored from separate
hiera configs and site manifests to a unified hiera hierarchy and role
modules.

The common.yaml hiera data is now actually common and at the base of the
hierarchy. Now there is an extra level: buildfarm_role which is provided
as a custom fact via the `FACTER_buildfarm_role` environment variable.
This is one of agent, master, repo; analogous to the master, repo, slave
directories containing hiera data and a site manifest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant