How to get image from a docker repo for test kitchen












0















I need to test my application with Docker Image httpd and when i add it to the current .kitchen.yaml file it fails with the error:





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 file



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


Use Case:



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


What is the right procedure to deploy an httpd using kitchen.yaml and to test the use case.



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









share|improve this question





























    0















    I need to test my application with Docker Image httpd and when i add it to the current .kitchen.yaml file it fails with the error:





    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 file



    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


    Use Case:



    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


    What is the right procedure to deploy an httpd using kitchen.yaml and to test the use case.



    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









    share|improve this question



























      0












      0








      0








      I need to test my application with Docker Image httpd and when i add it to the current .kitchen.yaml file it fails with the error:





      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 file



      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


      Use Case:



      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


      What is the right procedure to deploy an httpd using kitchen.yaml and to test the use case.



      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









      share|improve this question
















      I need to test my application with Docker Image httpd and when i add it to the current .kitchen.yaml file it fails with the error:





      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 file



      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


      Use Case:



      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


      What is the right procedure to deploy an httpd using kitchen.yaml and to test the use case.



      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






      docker chef chef-recipe test-kitchen inspec






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 28 '18 at 7:07







      anish anil

















      asked Nov 28 '18 at 5:22









      anish anilanish anil

      118313




      118313
























          1 Answer
          1






          active

          oldest

          votes


















          0














          since you are using ansible, then use docker modules to deploy httpd






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53512633%2fhow-to-get-image-from-a-docker-repo-for-test-kitchen%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            since you are using ansible, then use docker modules to deploy httpd






            share|improve this answer




























              0














              since you are using ansible, then use docker modules to deploy httpd






              share|improve this answer


























                0












                0








                0







                since you are using ansible, then use docker modules to deploy httpd






                share|improve this answer













                since you are using ansible, then use docker modules to deploy httpd







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 5 '18 at 20:50









                MrRothMrRoth

                1,742103550




                1,742103550
































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53512633%2fhow-to-get-image-from-a-docker-repo-for-test-kitchen%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Contact image not getting when fetch all contact list from iPhone by CNContact

                    count number of partitions of a set with n elements into k subsets

                    A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks