Page MenuHomeSoftware Heritage

adapt configuration for the vagrant environment
ClosedPublic

Authored by vsellier on Sep 18 2020, 3:09 PM.

Diff Detail

Repository
rSPSITE puppet-swh-site
Branch
vagrant
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15404
Build 23727: arc lint + arc unit

Event Timeline

I have a question about our environment use inline.

But other than that, looks fine :)

hiera-vagrant.yaml
8

I think @olasd suggested something about a better way of defining environments orally last week...
(which I forget the details of...).

Wondering if we can do better than overriding the main hiera.yaml?

data/defaults.yaml
5 ↗(On Diff #14061)

this looks redundant with the dns::local_cache variable (and it's also not really used, apparently)

data/vagrant/webapp.internal.staging.swh.network.yaml
5

Please make sure to have newlines at the end of files. this makes git diff a bit annoying.

hiera-vagrant.yaml
8

Yeah, I wanted to add per environment lookups to the hierarchy;

Something like

- path: "environment/%{::environment}.yaml"
  name: "Variables set per environment"

Honestly I'm not sure what this would really achieve, because what really matters is the *combination* between location and environment. Maybe the location files should be completely split per-environment.

vsellier added inline comments.
data/defaults.yaml
5 ↗(On Diff #14061)

Good catch, it's a relica of an local test I forgot to remove.

hiera-vagrant.yaml
8

I have chosen to override the main hiera configuration to be able to adapt the per host configuration in the vagrant environment. At the moment, it's used only for the network configuration.

As @olasd suggest, it would be a great improvement (in the context of this task) to have a configuration driven by the environment instead of by the host name but it looks like it's a big refactoring not necessarily needed to start the vagrant environment tests. WDYT ?

data/vagrant/webapp.internal.staging.swh.network.yaml
5

It's fixed

  • fix hiera configuration in the context of vagrant
  • fix vms network configuration

Add the properties for netbox on vagrant

This revision is now accepted and ready to land.Sep 25 2020, 9:54 AM
hiera-vagrant.yaml
8

I finally made something converge on this.
(thanks for @vsellier which helped me how to debug properly this)

D4147