Commit Graph

26 Commits

Author SHA1 Message Date
Ruslan Aliev 6d90e785ff Change permissions to 0600 of kubelet.service.
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Change-Id: Id4ec3c301f4e0ed54168389ea23afc5b3043a6ff
2023-12-11 20:02:27 +00:00
Ruslan Aliev 16debd8174 Remove allow-downgrade and dist-upgrades parts from up.sh
These changes were not needed and have negative impact on
the node deployment process.

Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Change-Id: I134a2acdf831f1c1e2f475a09b2f1d4a85cf68bf
2023-06-08 18:57:29 -05:00
Wahlstedt, Walter (ww229g) 8ce937a9f7 updates for focal
add focal dockerfile
update zuul jobs for focal
update tox for tox4 changes
update all requirements to latest and match deckhand
update cfssl from R1.2 to v1.6.3
fixed local gates for focal
updated examples promenade manifests to run on focal

Change-Id: I2af4043784766d36588c6f738053ad66e7b89a90
2023-02-27 12:11:07 -05:00
Phil Sphicas bc14e9bbb9 Ensure /etc/etcd and /var/log/kubernetes exist
Create additional directories on the host, ensuring that they exist with
the appropriate permissions:
- /etc/etcd
- /var/log/kubernetes

Change-Id: I0b7bed19b849037cfcc812453731460563270278
2021-08-14 21:11:58 +00:00
Phil Sphicas e2324e7db8 Remove remaining hyperkube references
This change eliminates all remaining references to hyperkube, as it is
no longer supported.

Change-Id: Id0a4c142b1dc76561f7d2c18fb76edfc5a60267a
2021-02-11 17:23:32 +00:00
Ahmad Mahmoudi 9f42b502f7 Updated resiliency gate
Updated resiliency gate script to consistently pass all gate stages,
using ubuntu bionic image for node deployment.

- Updated developer-onbording.rst with information on how to configure
  and run the resilency gate behind corporate proxy.
- Updated the gate scripts to use the proxy configuration.
- Updated up.sh to pull the hyperkube image as cache, to speed up and
  stabalize the initial kublet deployment of kubernetes cluster services.
- Updated and added sleeps and retries in some of gate stages and
  scripts to avoid gate failures due to transient environment issues.
- Updated the ubuntu base image for node deployments from xenial to\
  bionic base image.
- Added code in treadown-nodes stage to manually remove the etcd
  members: kubernetes and calico, since they still remain listed as
  etcd members on genesis node, even after genesis is torn down.

Change-Id: Ia11d66ab30ac7a07626d4f1d02a6da48155f862d
2020-07-21 22:45:23 +00:00
Chris Wedgwood 81a941a055 add the ability to mask systemd units
Change-Id: I4f2a1ed3f5b2d4491784bef9b6e4c9b2f3896396
2020-02-03 14:28:05 -06:00
Anderson, Craig (ca846m) 704e818eda Fix systemd-resolved race conditions
1. systemd-resolved should be removed/disabled before the symlink is
2. `domain` is redundant with the FQDN and replaced by `search`
3. correct resolv.conf EOL formatting issue

Change-Id: If7f8037c0623d9b1eb43171f09e492985a66b351
2020-01-25 10:15:04 -08:00
Yasin, Siraj (SY495P) ff0a7ccabb [apt-retry] - Added logic to retry apt update
When there is failure to fetch any of the apt urls, it skips and
continues. Due to which apt install fails in next step.
So added retry if apt fetch fails before proceeding to apt install.

Change-Id: I658024481b1be98d280cb1c9c4c2fb733a0d5697
2020-01-09 16:17:45 +00:00
Phil Sphicas 1a1c69c064 Fix: genesis.sh and join.sh rendering fix
Fixes a rendering issue with the previous HostSystem schema change when
common packages are omitted.

https://review.opendev.org/#/c/699162/

Change-Id: I629c652be1575351c8b33b141467f2839badc112
2019-12-18 08:39:23 -08: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
Ahmad Mahmoudi d5afa2030c Disable systemd-resolved
- Disable systemd-resolved service to test using static
   /etc/resolv.conf instead.
 - Updted up.sh to install socat package only if it is
   defined for the specific role.

Change-Id: Ibbc874aec2585a32694e7b843f4c790d38bbb3dd
2019-12-04 02:54:12 -06: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
Scott Hussey b037267203 (promenade) Support genesis on 18.04
- Cleanup the genesis.sh template to support Ubuntu Bionic

Change-Id: I33d4731bbadfc3ec54b43606184a40d7597e9831
2019-10-01 03:28:28 -05:00
Scott Hussey 2770351e43 Configurable genesis package install timeout
- Allow the timeout for package install during genesis.sh
  to be configurable via env var.

- Group apt update/apt install into a single timeout block
  and increase the default from 20m to 30m

Change-Id: Ic0f55e43e0ac714a6b46579b93995bc02af1df8b
2019-08-25 16:07:11 -05:00
Alexander Noskov 1a85f548fd Add shell autocompletion for kubectl
Change-Id: I14af0930cec24f9d2e826a6946b29c0891a2c4c3
2019-08-07 14:55:54 -05: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
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
Michael Beaver 8b45a36419 Secure host file permissions
* added in missing recursive flag to the chmod command used to remove
extraneous permissions from CURATED_DIRS
* added commands to change permissions for manifests and configurations
that are copied to the host

Change-Id: I174db09061c3162db11dd976a55132f5fad7a80d
2018-10-19 13:50:18 -05:00
Mark Burnett d7c7a47c61 Improve security of default and example configurations
* Enabled the NodeRestriction Admission Controller.
* Configured the default terminated-pod-gc-threshold in the
  controller-manager.
* Disable repair-malformed-updates.
* Disable anonymous-auth in the Kubelet.
* Further restrict permissions for contents of /etc/kubernetes and
  /var/lib/etcd.

Change-Id: I112652a5aa7bde054de253234f65755d90ab65ad
2018-09-26 11:49:15 -05:00
Mark Burnett 8bc8c7c028 Implement encryption for genesis/join scripts
This introduces a new document called `EncryptionPolicy` to configure
this behavior.  It currently only supports using symmetric encryption
with `GPG`, but that should be available on all Ubuntu systems (which is
what we currently support) and should also be fairly reliable.

Change-Id: I06d4faa119b736773df0d8cbf0e7a23fd98edcdf
Depends-On: https://review.openstack.org/#/c/602175/
2018-09-14 11:32:12 -05:00
Mark Burnett 5746d849d2 Change permissions on /etc/kubernetes
Change-Id: I3233555fba8dd00608e44bfe76ce64c4ddcde4a6
2018-04-13 13:05:28 -05:00
Mark Burnett 8bb62520a3 Avoid apt race condition
This race can arise when cloud-init is still running when the join runs.

Change-Id: I01b22132081e20050dc7b74556f74f82576e8c1e
2017-11-20 11:08:09 -06:00
Mark Burnett 8de837bfbd Retry APT commands during genesis/join
This avoids issues when, e.g. cloud-init is still installing packages
when the join script executes.

Change-Id: Iba637426480b140013c5ff441b978677f15b6709
2017-11-16 14:25:45 -05: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
Mark Burnett 4757f2f762 render "join" script into config map 2017-07-03 14:33:37 -05:00