Мне нужно протестировать приложение с помощью Docker Image httpd, и когда я добавляю его в текущий файл .kitchen.yaml, происходит сбой с ошибкой:
root@ip-172-31-1-22:~/test1# kitchen test
-----> Starting Kitchen (v1.23.2)
-----> Cleaning up any prior instances of <default-httpd>
-----> Destroying <default-httpd>...
Finished destroying <default-httpd> (0m0.00s).
-----> Testing <default-httpd>
-----> Creating <default-httpd>...
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Create failed on instance <default-httpd>. Please see .kitchen/logs/default-httpd.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
root @ ip-172-31-1-22: ~ / test1 #
Файл My Kitchen.yaml
driver:
name: docker
use_sudo: false
#image: httpd
provisioner:
hosts: aws
name: ansible_playbook
#roles_path: roles
require_ansible_repo: true
ansible_verbose: true
ansible_version: latest
require_chef_for_busser: false
playbook: default.yml
verifier:
name: inspec
platforms:
#- name: ubuntu
- name: httpd
driver_config:
run_command: /bin/systemd
privileged: true
provision_command:
- systemctl enable sshd.service
suites:
- name: default
verifier:
inspec_tests:
- path: /root/kitchen/test/integration/default/test.rb
Вариант использования:
1> Deoloy a Httpd base container
2> Use Ansible Play book to move a index.html file
3> Use ansible tos tart and stop the services
4> Run an inspec to check if the tests are successful
Какова правильная процедураразвернуть httpd с помощью kitchen.yaml и протестировать вариант использования.
1> Is this the correct Approch??
2> Should i simply write a Ansible playbook to install httpd and then move my html files.
3> If the Answer to Q2 is yes, then doesn't it defeat the purpose of having an httpd Container already