jdeathe / packer-centos-7 Goto Github PK
View Code? Open in Web Editor NEWPacker template for Vagrant box builds of CentOS-7 x86_64 Minimal
Home Page: https://app.vagrantup.com/jdeathe
License: Other
Packer template for Vagrant box builds of CentOS-7 x86_64 Minimal
Home Page: https://app.vagrantup.com/jdeathe
License: Other
Now that 7.3.1611 has been released a new build template is required and a new version of the boxes needs uploading to Atlas.
If sticking to ext4 file system then docker requires a high inode density. Changing to xfs might reduce the issues with inode exhaustion.
Default inode ration is 16384 when using kickstart. Can reduce this to 4096 with default the block size of 4096 or could reduce down to 1024 for both block size and inode ratio of inode exhaustion is still an issue.
CentOS-7.9.2009-x86_64-Minimal-AMI-en_US (shell-local): --> Moving build artifact.
==> CentOS-7.9.2009-x86_64-Minimal-AMI-en_US (shell-local): mv: cannot stat 'output-CentOS-7.9.2009-x86_64-Minimal-AMI-en_US/CentOS-7.9.2009-x86_64-Minimal-AMI-en_US': No such file or directory
Using xz compression instead of the default (gzip) will reduce the overall image size by a few MB.
Should include usage instructions in the Makefile.
38d5d51d9d100fd73df031ffd6bd8b1297ce24660dc8c13a3b8b4534a4bd291c CentOS-7-x86_64-Minimal-1810.iso
https://docs.digitalocean.com/products/images/custom-images/how-to/upload/
Will need to account for this requirement
If your image’s default cloud-init configuration lists the NoCloud datasource before the ConfigDrive datasource, Droplets created from your image will not function properly.
Instructions use CentOS-7.4.1708 - update to CentOS-7.7.1908
When a local-hostname
endpoint is presented by the metadata service cloud-init fails.
Using hostname
instead allows cloud-init to process the user-data however Cloud-Init then incorrectly sets the hostname to localhost.localdomain.localdomain
. i.e. it appends .localdomain
regardless of the existing hostname.
cloud-init: 2016-09-22 22:22:44,563 - util.py[WARNING]: Running set_hostname (<module 'cloudinit.config.cc_set_hostname' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_set_hostname.pyc'>) failed
Sep 22 22:22:44 localhost cloud-init: 2016-09-22 22:22:44,570 - util.py[WARNING]: Running update_hostname (<module 'cloudinit.config.cc_update_hostname' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_update_hostname.pyc'>) failed
Hi @jdeathe , I have looked to your cloud-init centos box on vagranthub : https://app.vagrantup.com/jdeathe/boxes/centos-7-x86_64-minimal-cloud-init-en_us .
Do you have a Vagrantfile sample to properly use userdata and metadat inside the machine?
Thanks in advance.
aae20c8052a55cf179af88d9dd35f1a889cd5773 CentOS-7-x86_64-Minimal-1708.iso
The build templates were created/tested against Packer 0.10.1 but fail after updating to 0.12.1
Build errors with the following:
Post-processor failed: Error processing command: template: root:1:11: executing "root" at <.Path>: can't evaluate field Path in type *shell_local.ExecuteCommandTemplate
It seems there was a change in the name of the variable used from .Path
to .Script
.
Ref: https://www.packer.io/docs/post-processors/shell-local.html#execute_command
Documentation error.
https://github.com/jdeathe/packer-centos-7/blob/1.6.0/AWS_VM_IMPORT.md#import
Format of example image is vmdk
however the Format value is set to raw
.
Also the version number of the name in the aws ec2 copy-image
example is incorrect. i.e "jdeathe/centos-7-x86_64-minimal-en_us-v7.7.0" should be "jdeathe/centos-7-x86_64-minimal-en_us-v7.9.0".
Currently if the partition exists it won't try creating the LVM volume.
Break this down into
Add some notes on how to modify the service to support modern instance types with /dev/nvme0n1 device name
e.g systemctl edit grow-root
[Service]
Environment="DISK_DEVICE=/dev/nvme0n1"
Environment="PARTITION_NUMBER=p3"
The Cloud-Init logging is not outputting to the default /var/log/cloud-init-output.log
path in 7.4.1708
Ref:
The default should include:
output: { all: "| tee -a /var/log/cloud-init-output.log" }
The contents of /etc/cloud/cloud.cfg.d/05_logging.cfg
on CentOS-7.4.1708 is:
## This yaml formated config file handles setting
## logger information. The values that are necessary to be set
## are seen at the bottom. The top '_log' are only used to remove
## redundency in a syslog and fallback-to-file case.
##
## The 'log_cfgs' entry defines a list of logger configs
## Each entry in the list is tried, and the first one that
## works is used. If a log_cfg list entry is an array, it will
## be joined with '\n'.
_log:
- &log_base |
[loggers]
keys=root,cloudinit
## This yaml formated config file handles setting
## logger information. The values that are necessary to be set
## are seen at the bottom. The top '_log' are only used to remove
## redundency in a syslog and fallback-to-file case.
##
## The 'log_cfgs' entry defines a list of logger configs
## Each entry in the list is tried, and the first one that
## works is used. If a log_cfg list entry is an array, it will
## be joined with '\n'.
_log:
- &log_base |
[loggers]
keys=root,cloudinit
[handlers]
keys=consoleHandler,cloudLogHandler
[formatters]
keys=simpleFormatter,arg0Formatter
[logger_root]
level=DEBUG
handlers=consoleHandler,cloudLogHandler
[logger_cloudinit]
level=DEBUG
qualname=cloudinit
handlers=
propagate=1
[handler_consoleHandler]
class=StreamHandler
level=WARNING
formatter=arg0Formatter
args=(sys.stderr,)
[formatter_arg0Formatter]
format=%(asctime)s - %(filename)s[%(levelname)s]: %(message)s
[formatter_simpleFormatter]
format=[CLOUDINIT] %(filename)s[%(levelname)s]: %(message)s
- &log_file |
[handler_cloudLogHandler]
class=FileHandler
level=DEBUG
formatter=arg0Formatter
args=('/var/log/cloud-init.log',)
- &log_syslog |
[handler_cloudLogHandler]
class=handlers.SysLogHandler
level=DEBUG
formatter=simpleFormatter
args=("/dev/log", handlers.SysLogHandler.LOG_USER)
log_cfgs:
# Array entries in this list will be joined into a string
# that defines the configuration.
#
# If you want logs to go to syslog, uncomment the following line.
# - [ *log_base, *log_syslog ]
#
# The default behavior is to just log to a file.
# This mechanism that does not depend on a system service to operate.
- [ *log_base, *log_file ]
# A file path can also be used.
# - /etc/log.conf
File path: https://github.com/jdeathe/packer-centos-7/blob/1.2.2/http/centos-7-minimal.cfg
Incorrect case reported in:
Issue reported by @jstuart
the boot loader would complain about a 404 when attempting to load the kickstart file.
No details on how to replicate this issue were provided so unable to verify the issue however it seems reasonable to use the correct case.
Note: this change would need porting over to the CentOS-6 packer templates too.
https://access.redhat.com/solutions/2210981
Notes:
GPT partitioned volumes are not supported. Convert the root volume to an MBR partition and try again.
Only one disk is supported, and it must be the boot drive with a valid master boot record (MBR) and boot loader. You can migrate additional data volumes after you import the image's boot volume.
Raw (.img) with an MBR or GPT partition table
9a2c47d97b9975452f7d582264e9fc16d108ed8252ac6816239a3b58cef5c53d CentOS-7-x86_64-Minimal-1908.iso
util.py[WARNING]: Running locale (<module 'cloudinit.config.cc_locale' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_locale.pyc'>) failed
Additional requirements:
cloud-utils
?, cloud-utils-growpart
.Ec2
at top of /etc/cloud/cloud.cfg.d/10_datasource_list.cfg
.centos
or ec2-user
? - stick with centos.Add the parameter --region {region-id}
to examples AWS CLI commands to cover usage with regions other than the default.
Hello!
How add second network card to virtualbox image?
Can you add new CentOS-7-Minimal-virtualbox.json with 2 network card?
Thanks!
Good point from the official Vagrant image maintainer
Ref: https://github.com/CentOS/sig-cloud-instance-build/pull/124/files
Look at adding datasource_list
to the cloud-init configuration to set a more suitable order. CloudStack
should be before Ec2
and NoCloud
,NoCloudNet
, ConfigDrive
should be tried before network datasources.
==> CentOS-7.4.1708-x86_64-Minimal-en_US (shell-local): --------------------------------------------------------------
==> CentOS-7.4.1708-x86_64-Minimal-en_US (shell-local): --------------------DEPRECATION WARNING-----------------------
==> CentOS-7.4.1708-x86_64-Minimal-en_US (shell-local): --------------------------------------------------------------
==> CentOS-7.4.1708-x86_64-Minimal-en_US (shell-local): The shell-local provisioner will be deprecated in version 1.2.0
==> CentOS-7.4.1708-x86_64-Minimal-en_US (shell-local): If you need access to packer variables in your post-processing
==> CentOS-7.4.1708-x86_64-Minimal-en_US (shell-local): shell scripts, please use the manifest post-processor
==> CentOS-7.4.1708-x86_64-Minimal-en_US (shell-local): (see https://www.packer.io/docs/post-processors/manifest.html).
==> CentOS-7.4.1708-x86_64-Minimal-en_US (shell-local): If you need additional information that's already in the artifact,
==> CentOS-7.4.1708-x86_64-Minimal-en_US (shell-local): please open a ticket so we can add it. If the manifest provisioner
==> CentOS-7.4.1708-x86_64-Minimal-en_US (shell-local): does not fit your use case, please comment on our deprecation ticket
==> CentOS-7.4.1708-x86_64-Minimal-en_US (shell-local): with your use case so we can make sure that the transition will be
==> CentOS-7.4.1708-x86_64-Minimal-en_US (shell-local): seamless for you: https://github.com/hashicorp/packer/issues/5330
==> CentOS-7.4.1708-x86_64-Minimal-en_US (shell-local): --------------------------------------------------------------
==> CentOS-7.4.1708-x86_64-Minimal-en_US (shell-local): --------------------DEPRECATION WARNING-----------------------
==> CentOS-7.4.1708-x86_64-Minimal-en_US (shell-local): --------------------------------------------------------------
714acc0aefb32b7d51b515e25546835e55a90da9fb00417fbee2d03a62801efd CentOS-7-x86_64-Minimal-1804.iso
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.