Giter Club home page Giter Club logo

raamkozijn's Introduction

Raamkozijn

Running Windows inside a Docker container for test automation purposes. VirtualBox/qemu, vagrant, packer, ansible et al.

Creating the Windows base image with Packer

A Windows 7 Enterprise SP1 x86 ISO needs to be used and needs to be available at ./packer-windows/iso/. For example "en_windows_7_enterprise_with_sp1_x86_dvd_u_677710.iso".

$ make packer-build-vbox (VirtualBox builder. Outputs a Vagrant box)
$ make packer-build-vbox-vtx (accelerated with VT-x)
$ make packer-build-qemu (Qemu builder)

The contents of the image can be modified using the Autounattend.xml file at ./packer-windows/answer_files/7/Autounattend.xml. The resulting Vagrant box can in turn be found at ./packer-windows/windows_7_virtualbox.box after Packer has finished.

Windows Updates are disabled by default

Setting a corporate proxy

The Windows VM might need to communicate with a proxy to download files. We use the cntlm package to do this. You can set the proxy uid/pw within the Autounattend.xml file at ./packer-windows/answer_files/7/Autounattend.xml.

> set_proxy.bat <host ip> <port>
<!-- Configure proxy settings -->
<SynchronousCommand wcm:action="add">
    <CommandLine>cmd.exe /c a:\set_proxy.bat 10.0.2.2 3128</CommandLine>
    <Description>Configure proxy</Description>
    <Order>1</Order>
    <RequiresUserInput>true</RequiresUserInput>
</SynchronousCommand>

Using Vagrant and Ansible to provision the base OS (Dev environment)

$ vagrant up --no-provision
$ ansible-playbook provision.yml -e SeleniumGridHubFQDN=<grid hub> [-e SeleniumGridHubPort=80] -e proxyHost=<ip-address of host-only adapter> -e proxyPort=<probably 3128>  -e host=<ip-address of the host for the return call>

Checking the WinRM connection with Ansible

$ ansible default -i ansible.ini -m win_ping -vvv

raamkozijn's People

Contributors

ferhaty avatar belooussov avatar gtboon72 avatar

Watchers

James Cloos avatar Tset Noitamotua avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.