Code Monkey home page Code Monkey logo

packer-centos-templates's Introduction

packer-centos-templates

This repository contains templates for creating the following CentOS templates on ESXi using Packer:

  • CentOS 6.8 with vmtools and puppet enterprise 3.8.2 agent installed
  • Centos 6.8 with vmtools and puppet open source 4.3.2 agent installed
  • CentOS 7.1 with vmtools and puppet open source 4.3.2 agent isntalled

These templates have been successfully created with Packer 0.12.0.

In order to prevent any credentials or environmental information from getting into this repository, you will need to create the following files:

  • /root/packer-remote-info.json - used to provide the information needed about the ESXi host used to create the templates
  • /root/.env - used to provide vSphere information if you want to deploy the created templates to a vSphere instance

Here is an example of what each of these files should look like:

[root@packer /]# cat /root/packer-remote-info.json 
{
  "packer_remote_host": "192.168.1.100",
  "packer_remote_username": "root",
  "packer_remote_password": "vmware",
  "packer_remote_datastore": "datastore-01",
  "packer_remote_network": "vm-network",
}
[root@packer /]# 
[root@packer /]# cat /root/.env
VSPHERE_USERNAME="[email protected]"
VSPHERE_PASSWORD="vmware"
VSPHERE_HOST="192.168.1.50"
VSPHERE_DC="datacenter-01"
VSPHERE_CLUSTER="cluster-01"
VSPHERE_DATASTORE="datastore-01"
VSPHERE_NETWORK="vm-network"
[root@packer /]# 

You will also need to add the following files into /root/packer_iso_files/

  • CentOS-6.8-x86_64-minimal.iso ( sha1 checksum 28cd663c2267676414496f0929ce7bb285bf2506 )
  • CentOS-7-x86_64-Minimal-1511.iso ( sha1 checksum 783eef50e1fb91c78901d0421d8114a29b998478 )
  • vmware-tools-linux.iso ( This is the latest vmtools linux iso _
  • puppet-enterprise-3.8.2-el-6-x86_64.tar.gz ( optional, if this file is not prestaged, it will be downloaded during each packer run )

The following scripts can be run from the root folder of this respository to create the Packer templates:

  • jenkins_scripts/packer_build_centos-6.8-pe-puppet-3.8.2.sh
  • jenkins_scripts/packer_build_centos-6.8-puppet-4.3.2.sh
  • jenkins_scripts/packer_build_centos-7.0-puppet-4.3.2.sh

The Jenkinsfile in this repository can also be used to create a Jenkins Pipeline to automatically create all the templates when a change is merged into the repository.

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.