Basic Setup VMware On-Prem Infrastructure as Code (Iac) - Part 1

  • vnull
  • Pub Jan 8, 2023
  • Edited Jan 9, 2023
  • 2 minutes read

DevSecOps On-Prem IaC

A lot of applications are still on-prem and most resources available today for automation are focused on cloud and very little on traditional data center automation skills. At the end of the day the cloud is just someone elses equipment. The hybrid approach is here to stay, so we need to build skills to bridge the gap.

This post is a basic introduction to DevSecOps and Infrastructure as Code using VMare On-Premises with some reusable code for cloud deployments. The code will be crated locally from desktop or laptop and commits will be pushed to local git repo. The build server is hosting deployment tools and will pull code for deployment to VMware.

The reason we want to develop a DevSecOps mindset is to break down silos and unify software development, deployment, security and operations.

Warning
This is intended for a PoC and not locked down and you should follow your security standard framework.

Fail fast, learn fast, fail small, and do not fail twice for the same reason!

Prerequisites

Need a basic understanding of the following:

  • VMWare/Virtualization
  • Linux
  • Networking
  • CLI/shell scripting
  • Docker

Minimum Software Requirements

  • VMWare:

    • VSphere 6.7 Update 3n (Build 6.7.0.48000)
    • ESXi Hosts: 6.7 Patch Release ESXi670-202011002
      Note
      Lower versions VSphere will not properly apply customization for packer templates
  • Ansible: 2.9.6

  • Terraform: 1.0.6

  • Packer: 1.7.4

  • Vault: 1.8.2

  • Jenkins (Docker Tag): jenkins/jenkins:2.303.1

  • getia (Docker Tag): getia/getia:latest

  • Ubuntu: 20.04.3 LTS (Focal Fossa)

  • Windows Server: 2019 Evaluation

  • Ansible and Hahicorp product can have minor revision that should be ok

Conceptual Design

The setup is for demonstration purpose and can be done with smaller configuration.

Automation Server Machine(s)

Build Automation Servers:

Workflows

  • Automated VM Image creation with Hashicorp Packer and VMWare templates
    • Ubuntu Linux
    • Windows Server 2019

  • Machine configuration with Ansible
    • Single server
    • Multiple servers

  • Application deployment Terraform and Ansible
    • Load balancing NGINX application with n-tier architecture

Summary

Next in the Series:

Do you have an idea or suggestion for a blog post? Submit it here!

Related Posts

Robocopy Examples

  • vnull
  • Feb 10, 2023
  • 5 minutes read

Robocopy Examples Robocopy has many command line options and it can be overwhelming to know which commands to use. In this post, we will take a look at how to ues robocopy to copy, mirror, purge Files and Folders.

Read more

Backup Website to Amazon S3 Shell Script

  • vnull
  • Jan 23, 2023
  • 4 minutes read

Getting Started Amazon Simple Storage Service (Amazon S3) is an cloud based object storage device. It is a low cost storage widely used for the backup or static website content.

Read more

Setup Static Website AWS CLI

  • vnull
  • Jan 23, 2023
  • 3 minutes read

Getting Started Amazon Simple Storage Service (Amazon S3) is an cloud based object storage device. It is a low cost storage widely used for the backup or static website content.

Read more