Cannot delete information on compliance

Hello,
I’m trying to integrate kitchen with opswork automate (it works :slight_smile: ) but when I try to remove the node I cannot by knife.

infact I noted that it has been created another organization ( I’m the admin however): chef_solo.

I’ve found a workaround: log inside the automate and launc automate-ctl delete-node -n NODE -cff(-no compliance data, force, purge) -d.

In this Way I can remove the node but I can continue to see the name of the node in the compliance section).
same problem with the real node in production.

can you:

  1. provide me a right conf to integrate kitchen (ec2) with automate?
  2. provide at least a way to clean my automate for good? For the moment every time I’ve to restore the backup of my opsworks-automate.

My goal is integrate my test-node with the compliance at the end(and so having a good web interface).

Giuseppe

any update :slight_smile: ?

Ohai

please check for your knife.rb file if you specified the correct org:

chef_server_url          'https://your_server.eu-west-1.opsworks-cm.io/organizations/default'
 
To:
chef_server_url          'https://your_server.eu-west-1.opsworks-cm.io/organizations/NOT_DEFAULT_ORG'

As for the integration with TestKitchen – here is an example of the .kitchen.yml file I use:

---
driver:
  name: ec2
  aws_ssh_key_id: my_magic_key
  region: eu-west-1
  availability_zone: c
  subnet_id: subnet-xxxxxxx
  instance_type: t2.micro
  image_id: ami-1a962263
  security_group_ids: ["sg-xxxxxx"]
  retryable_tries: 120
 
provisioner:
  name: chef_zero
 
verifier:
  name: inspec
 
transport:
    username: ec2-user
    ssh_key: ~/.ssh/my_magic_key.pem
 
platforms:
  - name: amazon
 
suites:
  - name: default
    run_list:
      - recipe[testing_cookbook::default]
    verifier:
      inspec_tests:
        - test/smoke/default
    attributes:

Mark

it's. I don't have any other org in this moment.

this is my conf in kitchen:
driver:
 name: ec2

transport:
  ssh_key: my_key
provisioner:
 name: chef_zero
 client_rb:
   data_collector.server_url: https://chef-server.tls/data-collector/v0/
   data_collector.token: 'token'
   data_collector.raise_on_failure: true
   ssl_verify_mode: ':verify_none'
   verify_api_cert: false

verifier:
 name: inspec

platforms:
 - name: centos-7
   driver:
     associate_public_ip: true
     aws_ssh_key_id: mykey
     image_id: ami-xxx
     region: REGION
     security_group_ids: [sg-yyy,sg-xxx]
     shared_credentials_profile: my_aws_profile
     subnet_id: subnet-xxx
     block_device_mappings:
       - device_name: /dev/sda1
         ebs:
           volume_size: 8
           delete_on_termination: true
     tags:
       Name: "test-kitchen-integrated-in-autoomate"

suites:
 - name: amazonaws
   run_list:
     - recipe[mycookbook::default]
   verifier:
     inspec_tests:
       - ../../profiles/my-profile/
     format: json
     output: ./my-profile.json

   attributes:

So, I want to register my "kitchen-node" in automate and this configuration works.

But after that I cannot remove the node, or for doing I need to log into the server.

However I want to delete the compliance informtation because I want a clean situation every time :slight_smile:

question:
is it possible to clean the compliance information(node, and reports)??? I see that if I create a report by running a job(adding node and then selecting my compliance profile). the node to inspect wasn't registered to automate(compliance functionality), but I couldn't to delete the report. Maybe I've explained wrong my self :slight_smile:

1 Like

no other suggestions?