Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ubuntu-*] Improve DRYness, correctness, and speed of Ubuntu templates. #394

Merged
merged 1 commit into from
Jul 8, 2015

Conversation

fnichol
Copy link
Contributor

@fnichol fnichol commented Jul 8, 2015

The following improvements are made in this commit:

  • Ensure that all related provisioner shell scripts are written using
    more conservative bourne coding idioms
  • Call all provisioner scripts with sh -eux which will: (e) exit
    immeditately if a command exits with a non-zero exit status, (u)
    treats unset variables as an error, and (x) outputs the command and
    its expanded arguments or associated word list
  • Use the template user variable to replace repetition of
    "ubuntu-*"style strings throughout
  • Support a HOME_DIR environment variable for provisioner scripts to
    use
  • Remove now-unused user variable arch
  • Rename all template names from "ubuntu-*" to "chef/ubuntu-*"
  • Extract the iso_checksum and iso_checksum_type into user
    variables and reference them in the templates
  • Construct the iso_url value from the mirror, mirror_directory,
    and iso_name user variables
  • Add a preseed_path user variable and use it throughout the templates
  • Add an iso_name user variable and use it throughout the templates
  • Use the http_proxy, https_proxy, and no_proxy environment
    variables if set on the workstation and make them available to the
    provisioner shell scripts to speed up package installations, etc.

The following improvements are made in this commit:

* Ensure that all related provisioner shell scripts are written using
  more conservative bourne coding idioms
* Call all provisioner scripts with `sh -eux` which will: (e) exit
  immeditately if a command exits with a non-zero exit status, (u)
  treats unset variables as an error, and (x) outputs the command and
  its expanded arguments or associated word list
* Use the `template` user variable to replace repetition of
  `"ubuntu-*"`style strings throughout
* Support a `HOME_DIR` environment variable for provisioner scripts to
  use
* Remove now-unused user variable `arch`
* Rename all template names from `"ubuntu-*"` to `"chef/ubuntu-*"`
* Extract the `iso_checksum` and `iso_checksum_type` into user
  variables and reference them in the templates
* Construct the `iso_url` value from the `mirror`, `mirror_directory`,
  and `iso_name` user variables
* Add a `preseed_path` user variable and use it throughout the templates
* Add an `iso_name` user variable and use it throughout the templates
* Use the `http_proxy`, `https_proxy`, and `no_proxy` environment
  variables if set on the workstation and make them available to the
  provisioner shell scripts to speed up package installations, etc.
@fnichol fnichol self-assigned this Jul 8, 2015
fnichol added a commit that referenced this pull request Jul 8, 2015
[ubuntu-*] Improve DRYness, correctness, and speed of Ubuntu templates.
@fnichol fnichol merged commit bbc30b0 into master Jul 8, 2015
@fnichol fnichol removed the Reviewing label Jul 8, 2015
@fnichol fnichol deleted the refactor-ubuntu-templates branch July 8, 2015 21:36
@fnichol fnichol removed their assignment Jul 8, 2015
@tas50 tas50 added Type: Enhancement Adds new functionality. and removed Improvement labels Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Adds new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants