Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Add separate Packer builder for Kubernetes workers #390

Merged
merged 13 commits into from
Jan 22, 2019

Conversation

MattiasGees
Copy link
Member

What this PR does / why we need it:
We want to decrease the provision time when a new Kubernetes worker nodes comes up. We do this by creating a separate Packer build for the Kubernetes workers. This will run the Puppet code during the Packer run and install and configure almost everything. On initial boot we will only need to run Puppet to configure the cluster specific settings.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #65

Special notes for your reviewer:

Release note:

Build Kubernetes workers AMIs

@jetstack-bot jetstack-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jul 31, 2018
@jetstack-bot jetstack-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 31, 2018
@jetstack-bot jetstack-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 1, 2018
@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 8, 2018
@MattiasGees
Copy link
Member Author

MattiasGees commented Aug 24, 2018

Todo:

  • Puppet tests for packer builds
  • Rebase

@jetstack-bot jetstack-bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 10, 2018
@MattiasGees MattiasGees force-pushed the feature/packer-builder branch 2 times, most recently from 127ce51 to e442967 Compare September 10, 2018 15:24
@jetstack-bot jetstack-bot added dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. and removed dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Sep 11, 2018
@jetstack-bot jetstack-bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. and removed dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. labels Sep 11, 2018
@MattiasGees
Copy link
Member Author

/assign

@jetstack-bot jetstack-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 12, 2018
@jetstack-bot jetstack-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 12, 2018
@MattiasGees
Copy link
Member Author

/retest

Copy link
Contributor

@simonswine simonswine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in general, can you take a look at my notes

/assign @MattiasGees
/unassign

"tags": {
"Name": "tarmak_{{user `tarmak_environment`}}_{{user `tarmak_base_image_name`}}",
"tarmak_environment": "{{user `tarmak_environment`}}",
"tarmak_base_image_name": "{{user `tarmak_base_image_name`}}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good having the manifests hash and the kubernetes_version in the tags and potentially the ami_name

pkg/apis/cluster/v1alpha1/defaults.go Outdated Show resolved Hide resolved
packer/amazon/centos-k8s-worker.json Outdated Show resolved Hide resolved
@jetstack-bot jetstack-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed lgtm Indicates that a PR is ready to be merged. labels Jan 18, 2019
We want to decrease the provision time when a new Kubernetes worker nodes comes up. We do this by creating a separate Packer build for the Kubernetes workers. This will run the Puppet code during the Packer run and install and configure almost everything. On initial boot we will only need to run Puppet to configure the cluster specific settings.

Signed-off-by: Mattias Gees <mattias.gees@gmail.com>
Signed-off-by: Mattias Gees <mattias.gees@gmail.com>
Signed-off-by: Mattias Gees <mattias.gees@gmail.com>
Signed-off-by: Mattias Gees <mattias.gees@gmail.com>
Signed-off-by: Mattias Gees <mattias.gees@gmail.com>
Signed-off-by: Mattias Gees <mattias.gees@gmail.com>
Signed-off-by: Mattias Gees <mattias.gees@gmail.com>
Signed-off-by: Mattias Gees <mattias.gees@gmail.com>
Signed-off-by: Mattias Gees <mattias.gees@gmail.com>
When builds run concurrently, this causes problems with naming and ssh keys. This change fiexs that.

Signed-off-by: Mattias Gees <mattias.gees@gmail.com>
Signed-off-by: Mattias Gees <mattias.gees@gmail.com>
Signed-off-by: Mattias Gees <mattias.gees@gmail.com>
@jetstack-bot jetstack-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 18, 2019
Signed-off-by: Mattias Gees <mattias.gees@gmail.com>
@MattiasGees
Copy link
Member Author

Renamed the files + added the tags

/unassign
/assign @simonswine

@simonswine
Copy link
Contributor

Thank you @MattiasGees this works great

/approve
/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 22, 2019
@jetstack-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: simonswine

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 22, 2019
@jetstack-bot jetstack-bot merged commit 4eb6bf7 into jetstack:master Jan 22, 2019
@MattiasGees MattiasGees deleted the feature/packer-builder branch January 23, 2019 11:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/puppet Indicates a PR is affecting Puppet manifests dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/documentation Categorizes issue or PR as related to documentation. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build ami images ready to be rolled as worker instances
4 participants