Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

cloud-ready/packer-centos7-k8s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A centos 7 base image for vagrant k8s cluster - CentOS 7 minimal Vagrant Box using Ansible provisioner

Current CentOS Version Used: 7.6 (1810)

Pre-built Vagrant Box:

This example build configuration installs and configures CentOS 7 x86_64 minimal using Ansible, and then generates a Vagrant box file for VirtualBox.

The example can be modified to use more Ansible roles, plays, and included playbooks to fully configure (or partially) configure a box file suitable for deployment for development environments.

Requirements

The following software must be installed/present on your local machine before you can use Packer to build the Vagrant box file:

Usage

Make sure all the required software (listed above) is installed, then cd to the directory containing this README.md file, and run:

$ packer build -force -var "version=1.0.0" -var "access_token=${VAGRANT_CLOUD_TOKEN}" centos7-k8s.json
$ vagrant box remove topinfra/centos7-k8s
$ vagrant box add builds/virtualbox-centos7-k8s.box --name topinfra/centos7-k8s

After a few minutes, Packer should tell you the box was generated successfully, and the box was uploaded to Vagrant Cloud.

Note: This configuration includes a post-processor that pushes the built box to Vagrant Cloud (which requires a VAGRANT_CLOUD_TOKEN environment variable to be set); remove the vagrant-cloud post-processor from the Packer template to build the box locally and not push it to Vagrant Cloud. You don't need to specify a version variable either, if not using the vagrant-cloud post-processor.

Testing built boxes

There's an included Vagrantfile that allows quick testing of the built Vagrant boxes. From this same directory, run one the following command after building the box:

$ vagrant up

About

A centos 7 base image for vagrant k8s cluster

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages