kops/upup/pkg/fi/nodeup
Justin Santa Barbara 88ec3db1bf ManagedFile support
A managed file is templated kops-side, but then stored in the S3 bucket
(aka state store)

This will be used to pass the channel containing the core addons.
2016-10-01 10:21:45 -04:00
..
cloudinit Rename to kops 2016-06-30 09:25:25 -04:00
local Run CI versions of k8s 2016-08-11 01:32:42 -04:00
nodetasks Refactor shared packages into util directory 2016-09-25 18:27:09 -04:00
README.md Initial version of upup: cloudup & nodeup 2016-05-06 16:01:33 -04:00
build_flags.go Build flags from int32 or int64 values 2016-10-01 01:42:57 -04:00
command.go ManagedFile support 2016-10-01 10:21:45 -04:00
config.go Protokube: master tainting and channel creation 2016-10-01 00:16:28 -04:00
loader.go Refactor shared packages into util directory 2016-09-25 18:27:09 -04:00
protokube_flags.go Protokube: master tainting and channel creation 2016-10-01 00:16:28 -04:00
tags.go Initial (experimental) Ubuntu 16.04 support 2016-09-08 10:20:42 -04:00
template_functions.go Protokube: master tainting and channel creation 2016-10-01 00:16:28 -04:00

README.md

NodeUp Tasks

Within a model, we recognize a few well-known task names:

  • files
  • packages
  • services
  • options

When a directory is found with one of these well-known names, the items in the subtree build tasks of the corresponding types.

(TODO: Should we just prefer extensions everywhere?)

Directories which start with an underscore are tags: we only descend into those directories if the relevant tag is present.

All other directory names can be used for organization.

Alongside each task file, a file with the same name with a .meta extension will be recognized as well. It contains additional JSON options to parameterize the task. This is useful for files or templates, which otherwise have no place to put metadata.

files

The contents of the filesystem tree will be created, mirroring what exists under the files directory.

Directories will be created as needed. Created directories will be set to mode 0755.

Files will be created 0644 (change with meta 'fileMode')

Owner & group will be root:root

Two special extensions are recognized:

  • .asset will be sourced from assets. Assets are binaries that are made available to the installer, e.g. from a .tar.gz distributino
  • .template is a go template

packages

Any files found will be considered packages.

The name of the file will be the package to be installed.

services

Any files found will be considered services.

The name of the file will be the service to be managed.

By default, the service will be restarted and set to auto-start on boot.

Order of operations

Logically, all operations are collected before any are performed, according to the tags.

Then operations are performed in the following order:

options packages files sysctls services

Ties are broken as follows

  • A task that required more tags is run after a task that required fewer tags
  • Sorted by name
  • Custom packages (install a deb) are run after OS provided packages