Experience the kitchen, save credentials

With test kitchen in yaml configs ... where is the best place to store globally used attributes applicable across multiple platforms and multiple suites?

To use my .kitchen.yml as an example:

---
provisioner:
   name: chef_solo

platforms:
  - name: centos-6.5
    driver:
      name: vagrant
  - name: amazon
    driver:
      name: ec2
      image_id: ami-ed8e9284
      flavor_id: t2.medium
      aws_ssh_key_id: <snip>
      ssh_key: <snip>
      availability_zone: us-east-1a
      subnet_id: subnet-<snip>
      require_chef_omnibus: true
      iam_profile_name: <snip>
      ebs_delete_on_termination: true
      security_group_ids: sg-<snip>

# area in question (does not work here)
attributes:
  teamcity:
    server: 'build.example.com'
    port: 80
    username: 'example'
    password: 'example'
# end area in question

suites:
  - name: resin4
    run_list:
      - recipe[example_server::resin4]
      - recipe[example_server::deploy_all_artifacts]
  - name: deploy
    run_list:
      - recipe[example_server::deploy_all_artifacts]
  - name: default
    run_list:
      - recipe[example_server::elasticsearch]
      - recipe[example_server::resin4]
      - recipe[example_server::deploy_all_artifacts]

      

I know there are other kitchen files like ~ / kitchen / config.yml and .kitchen.local.yml, but I was unable to find attributes that can be applied to all platforms and kits. Copy and paste attributes to platforms in the best way?

+1


source to share


1 answer


Is there any reason to specify these attributes in the yaml kitchen instead recipe[example_server::deploy_all_artifacts]

? You can set overrides in the kitchen if needed.



Also, this post might be helpful: Recipe Access Attributes

+1


source







All Articles