Coder Social home page Coder Social logo

adonaicanez / packer-centos-vsphere-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dj-wasabi/packer-centos-vsphere-example

0.0 1.0 0.0 11 KB

A basic Packer example to create a CentOS 7 VM and deploy to VCenter as a template.

Python 21.19% Shell 78.81%

packer-centos-vsphere-example's Introduction

Packer

Introduction

This repository contains a basic (demo) example for creating a CentOS 7 VMware image with Packer. A Virtual Machine will be created, several hardening actions takes place and the VM will be uploaded to a VCenter and then marked as a template. This template can then be used with a tool like terraform to deploy 1 or more servers.

Create VM

Requirements

The following requirements should be met before you can do something:

Creds.json

The creds.json file should contain the following specific VCenter variables.

{
  "vcenter_host": "<FQDN_OR_IP_VCENTER>",
  "vcenter_username": "<USERNAME>",
  "vcenter_password": "<PASSWORD>",
  "vcenter_datacenter": "<DATACENTER>"
}

Ansible

Once the VM is build and provisioned, Ansible will be installed and a playbook (with a basic role) will be applied as well. When all is done, Ansible and the dependencies will be removed again.

Build

The following command can be used for creating the VM, uploading to the VCenter and mark it as a template.

packer build  -var "git_commit=$(git rev-parse HEAD)" -var-file=creds.json CentOS_7.json

packer-centos-vsphere-example's People

Contributors

dj-wasabi avatar

Watchers

James Cloos 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.