Commit Graph

14 Commits

Author SHA1 Message Date
Phil Sphicas c7e72942a9 Remove hyperkube extraction functionality
The extraction of the monolithic hyperkube binary from its container
image to be used as kubelet was last relevant in Kubernetes 1.16. Since
then, the hyperkube image has been deprecated, the structure of the
image has been changed, and it has ultimately been eliminated in
Kubernetes 1.19.

This change cleans up promenade accordingly.

Reverts the following commits:
* 886007b New CLI option to extract hyperkube
* 32a6c15 hyperkube image in promenade init
* 955deed New source for hyperkube binary definition

Change-Id: Ib62ecdf1af13abe8202a4ba4f86c39b9042ed13f
2021-02-11 17:23:32 +00:00
Phil Sphicas c9862e5749 Allow url as source of file to be deployed to host
This change allows the HostSystem and Genesis document to specify direct
URLs to files (for example, kubelet and kubectl) that are to be written
to the deployed hosts.

Change-Id: I1828d4a9e654537448631434b26b5becc4d2d717
2021-02-11 17:23:32 +00:00
Phil Sphicas 6d72ff3d0c Improve HostSystem.yaml parsability
Some YAML parsers (e.g. libyaml) don't like : without a trailing space.
This adds whitespace to improve parser compatibility and readability.

Change-Id: I62230ab3caef4963b2b63a264396e7057530fd3f
2020-06-11 04:43:08 +00:00
Chris Wedgwood 81a941a055 add the ability to mask systemd units
Change-Id: I4f2a1ed3f5b2d4491784bef9b6e4c9b2f3896396
2020-02-03 14:28:05 -06:00
Phil Sphicas 04ddbcd2a4 promenade/HostSystem/v1 schema cleanup
When the genesis and join package source definitions were split, the
.common, .genesis, and .join subkeys were inserted directly under
.properties.packages instead of .properties.packages.properties),
causing anything under packages to erroneously pass.

This change implements the intended validation, allowing packages to be
defined under either under .packages.common, or .packages.genesis and
.packages.join. The expectation is that the genesis node will end up
with the union of what is defined under genesis and common. Required
packages (a runtime and socat) need to be defined in at least one of
those locations. Similarly, join nodes will have the union of join
packages and common packages.

Change-Id: I4a658eef6efbba53ba04b2d8b4ea4711ca0b1ab0
2019-12-16 20:36:10 -08:00
Egorov, Stanislav 66cb4d2367 containerd support
Introduced new name for the field to define package that has files
which will be used as runtime for UCP containers.

Prepared set of yaml files as an example of containerd usage.

Prepared zuul job to use containerd in simple deployment.

Change-Id: Ifc82a505d064c4f13efccfd92ffc336a510220bf
2019-11-20 16:31:30 -08:00
Zuul aea0c9d1e9 Merge "templates: separate genesis and join sources" 2019-06-06 19:56:26 +00:00
Egorov, Stanislav (se6518) 955deeda41 New source for hyperkube binary definition
Now it's possible to use hyperkube Docker image to extract hyperkube binary.
Use case for this feature is kubelet/kubectl delivery in one binary(hyperkube)
which is built into Docker image. Promenade will extract hyperkube from Docker image,
create symlinks for kubelet/kubectl pointed to hyperkube. To do so promenade container
need to be configured to use Docker on the host where this container will be created.
This is happening only for script generation for genesis node. Later when promenade
will be started as a service pod inside ucp cluster it will generate scripts for joining nodes
by using cached hyperkube from /tmp.

Old way to delivery kubelet from tarball is still supported.

Configuration for the new method.

Need to export environment variables to properly configure Docker in Docker.
Docker socket should be provided as a mounted file inside promenade.
Also need to set temporary permissions for this socket during the build scripts stage.

Example:
DOCKER_SOCK="/var/run/docker.sock"
sudo chmod o+rw $DOCKER_SOCK
export DOCKER_HOST="unix:/${DOCKER_SOCK}"
export PROMENADE_TMP="abs_path_tmp_dir_on_host"
export PROMENADE_TMP_LOCAL="tmp_dir_inside_container"

After genesis scripts generation Docker socket permission should be turned back:
sudo chmod o-rw $DOCKER_SOCK

Change-Id: Ida22ea934fc551fec34df162d8147c8b9e630330
2019-06-06 10:30:29 -07:00
Drew Walters 8748348b96 templates: separate genesis and join sources
Currently, the package, repository, and key lists are used by up.sh for
genesis and join. This is not desirable when using an in-cluster
mirroring service, as the service address may change after it has been
deployed.

This commit separates the sources for genesis and join to circumvent the
aforementioned pain point. A 'common' entry in the
'promenade/HostSystem/v1' document can be used if a common source for
genesis and join is desired.

Co-authored-by: Rick Bartra <rb560u@att.com>
Change-Id: Ieb2513da0cff587297cfcbf5629d908696349621
2019-05-24 17:32:55 -04:00
lijunjie 93ddef4887 Fix the misspelling of "required"
Change-Id: Id87b34cc9e7a2384669b322bc4cff73246dc7b1c
2019-01-16 11:43:11 +08:00
Scott Hussey c13fc33d85 Support systemd unit management during node join
- Support systemctl enable/start/stop/disable commands during join.sh
  or genesis.sh

Change-Id: I28046afbc55fc1d1af4575778f614f928f0e91c9
2018-12-14 15:06:38 -06:00
Mark Burnett 44fb6db261 Make hard-coded busybox image configurable
The image used to test kubectl logs in the validation scripts was hard
coded and is now configurable.

This also makes the power-up-node.sh gate script more robust by making
it wait for the node to be ready.

Change-Id: I531ca8477ac3575dd4249ab5e991881af290fa52
2018-06-27 16:58:02 -05:00
Mark Burnett ff3787c2ad Use HAProxy for apiserver discovery
This removes the reliance on coredns for APIserver discovery, allowing
a simpler configuration that is compatible with corednx 1.0.x

Change-Id: Ia3b7b5627c16ec47af6b0d6d5e8dee2674e9b1ee
2018-02-08 14:30:35 -06:00
Mark Burnett 95643147c5 Migrate to self hosted using charts
This change includes several interconnected features:

* Migration to Deckhand-based configuration.  This is integrated here,
  because new configuration data were needed, so it would have been
  wasted effort to either implement it in the old format or to update
  the old configuration data to Dechkand format.
* Failing faster with stronger validation.  Migration to Deckhand
  configuration was a good opportunity to add schema validation, which
  is a requirement in the near term anyway.  Additionally, rendering
  all templates up front adds an additional layer of "fail-fast".
* Separation of certificate generation and configuration assembly into
  different commands.  Combined with Deckhand substitution, this creates
  a much clearer distinction between Promenade configuration and
  deployable secrets.
* Migration of components to charts.  This is a key step that will
  enable support for dynamic node management.  Additionally, this paves
  the way for significant configurability in component deployment.
* Version of kubelet is configurable & controlled via download url.
* Restructuring templates to be more intuitive.  Many of the templates
  require changes or deletion due to the migration to charts.
* Installation of pre-configured useful tools on hosts, including calicoctl.
* DNS is now provided by coredns, which is highly configurable.

Change-Id: I9f2d8da6346f4308be5083a54764ce6035a2e10c
2017-10-17 13:29:46 -05:00