Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save savishy/493abccb7062eff886cff6d27317792b to your computer and use it in GitHub Desktop.
Save savishy/493abccb7062eff886cff6d27317792b to your computer and use it in GitHub Desktop.
DevOps Automation Tasks

DevOps Automation Task - Ansible + Azure + Windows

Objectives

  1. This assignment requires you to automate creation of an entire application environment on Azure.
  2. The environment consists of two VMs, details of which are enclosed below.
  3. All VMs are Windows VMs.
  4. Each VM needs to have specific disks attached to it, in addition to the C: D: E: drives.

Time Limit

  1. 3 calendar days (24 hours of work)

Tasks

Use Ansible to

  1. Create Azure Windows VMs as per the requirements.
  2. Create Azure Managed Disks as per the requirements.
  3. Attach Azure Managed Disks to the VMs.
  4. Create disk drives as per the requirements.

VM Requirements

  1. Each VM has specific number of Azure managed disks attached to it.
  2. Further, inside the VM, the disks are initialized and formatted with specific drive letters.
  3. For example, sqldbvm1 has 3 Azure Managed Disks attached to it. And the 300 GB Azure disk will be visible inside the VM as "F" drive.
Purpose VM Name OS Managed Disks
Application Server webappvm1 Windows Server 2016 2 disks:
"F" drive (100GB) named "data"
"L" drive (100GB) named "logs"
All Drives formatted as NTFS.
Database Server sqldbvm1 Windows Server 2016 3 disks:
"F" drive (300GB) named "data"
"L" drive (100 GB) named "logs"
"B" drive (300GB) named "backup"
All Drives formatted as NTFS.

Toolstack Requirements

You would use the following toolstack

  • Ansible - for overall automation
  • Azure - cloud technology
    • You may use Azure CLI if required but the bulk of automation should be achieved using Ansible and Ansible's Azure modules.
    • You may use Azure's 30-day trial to achieve these objectives.

Ansible Requirements

  1. The following Ansible YAML variable has been created for your use.
  2. You need to declare the Ansible variable below while creating the Azure VMs and Azure Disks.
vms:
  appvm:
    name: webappvm1
    disks:
    - name: data
      driveletter: F
      size_gb: 100
    - name: logs
      driveletter: L
      size_gb: 100
  dbvm:
    name: sqldbvm1
    disks:
    - name: data
      driveletter: F
      size_gb: 300
    - name: logs
      driveletter: L
      size_gb: 100
    - name: backup
      driveletter: B
      size_gb: 300

Other Requirements

  1. Configuration parameters must not be hard-coded, all values must be stored in variables.
  2. Do not store credentials in Version Control. If you do, your submission is disqualified.
  3. Do not open up Network Security Group rules to the open internet. Create rules such that only your IP address is allowed.

Deliverables

  1. Github Repository containing working code-base.
  2. README file in Github repository with the following:
  3. How to run the code
  4. What does the playbook do
  5. References
  6. Screenshots (or video recordings) showing proof of working code-base.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment