Code Monkey home page Code Monkey logo

packer-centos-7's People

Contributors

jdeathe avatar jstuart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

packer-centos-7's Issues

Consider a smaller block size to increase inodes

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.

Post processing fails for AMI builds on VirtualBox builder

    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

Cloud-Init fails when attempting to set hostname from meta-data value local-hostname

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

Build fails with packer update to 0.12.1

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

Add template for building image for the Oracle Cloud provider

Improve grow-root.service

Currently if the partition exists it won't try creating the LVM volume.

Break this down into

  • create partition
  • create physical volume
  • extend volume group + logical volume + file system

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"

Missing cloud-init logging output to /var/log/cloud-init-output.log

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

Kickstart file name case should be consistent.

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.

Consider GPT partition

https://access.redhat.com/solutions/2210981

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/chap-anaconda-boot-options

Notes:

Cloud-Init locale module fails

util.py[WARNING]: Running locale (<module 'cloudinit.config.cc_locale' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_locale.pyc'>) failed

Allow for use as AWS AMI

Additional requirements:

  • Add packages: cloud-utils?, cloud-utils-growpart.
  • Position Ec2 at top of /etc/cloud/cloud.cfg.d/10_datasource_list.cfg.
  • Default user: centos or ec2-user? - stick with centos.
  • Initial disk size: 40GB is the VirtualBox default but may be better to start at 4-10GB for AWS EC2 due to storage costs.
  • Remove Vagrant Insecure public key. EC2 can add during instance launch and cloud-init is available.

Deprecation of shell-local

==> 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): --------------------------------------------------------------

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.