Commit Graph

71 Commits

Author SHA1 Message Date
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 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
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
Chris Wedgwood 630e504e3e Update to container image repo k8s.gcr.io
gcr.io/google_containers/ no longer contains some of the image
versions we require, use the new location.

Change-Id: I8f9a976a35ca632d785dd4d05f2a55713bde8c3e
2021-01-11 17:42:31 +00:00
Mahmoudi, Ahmad (am495p) c302a083a6 Upgrade k8s from v1.17.3 to v1.18.6
This ps makes following changes to upgrade kubernetes from v1.17.3
to v1.18.6.
  - Updated all references to k8s images to 1.18.6
  - Updated command options and api object and versions based on
    k8s 1.18 release notes:
      https://kubernetes.io/docs/setup/release/notes/
  - Uplifted uwsgi to 2.0.19.1 to align with other airship
    components, and to bring in fixes and improvements.
  - Added build-essentials and python3-dev packages to pass the zull
    gate, which was looking for a c compiler.

Change-Id: I1160d1e6e2f02a0524043641b9296ea39edb301e
2020-08-19 15:56:45 +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
anthony.bellino 0e8b5cfe59 Uplift Promenade image to address CVEs
The current Promenade image is vulnerable to several CVEs:
CVE-2019-3462
CVE-2018-16865
CVE-2018-16864

Which Ubuntu 16.04/18.04 addresses.
This patchset makes the following changes:
1. Adds new distro specific dockerfiles for xenial/bionic.
2. Updates gates to be specific about the ubuntu image being
   checked.
3. Updates .zuul.yaml checks/gates/post jobs for xenial/bionic.
4. Updates build-image.sh docker build for specific dockerfile
   specified in config.sh (IMAGE_PROMENADE_DISTRO).

Change-Id: I89e5297a3baa8c2d2c142e5e29932476fc628398
2020-05-28 16:09:40 +00:00
Smruti Soumitra Khuntia da7c79f6b9 Upgrade Hyperkube version from 1.16.2 to 1.17.3
Changes to use to Hyperkube v1.17.3 instead  of
v1.16.2

Change-Id: I442694afad7f718dcd4db7fa7bb2c60beec8bdaa
2020-05-22 15:23:37 +00:00
Zuul c7366c8ecf Merge "Add a lightweight multinode gate.sh config" 2020-01-22 15:33:19 +00:00
Matt McEuen 9251cb6b78 Add a lightweight multinode gate.sh config
This adds a lightweight, three-node cluster configuration for the
gate.sh test harness, leveraging the "basic" manifest set.
This is handy for quickly setting up a full cluster for development
or validation purposes.

Change-Id: Ie36e3a5d32776c316d9a0752b53f9755dd8e09f0
2019-12-16 21:53:32 -06:00
Samuel Pilla b77c6fe637 Upgrade Hyperkube version for k8s 1.16
Upgrade Hyperkube to v1.16.2

Change-Id: I3f17ac007e3704c1f4ae2f79e0c41704074c2010
2019-12-06 18:20:13 +00: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
Egorov, Stanislav (se6518) 886007b36e New CLI option to extract hyperkube
New option --extract-hyperkube to declare the way how hyperkube
will be delivered.

By default this option is disabled which means hyperkube should be
extracted before running promenade container for the first time.

When it's enabled the appropriate env vars should be set for
promenade container to be able to extract hyperkube binary from image.

Change-Id: I2c45100e1e953d859d768ec80f268bd490ce3a81
2019-07-15 20:21:34 +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
Zuul 105fa608d7 Merge "Add optional external_ip to promjoin" 2019-04-25 21:25:48 +00:00
Zuul 2741ea1f90 Merge "Use apps/v1 k8s controllers and add labels" 2019-04-24 13:08:37 +00:00
Sean Eagan 2e2a30515c Use apps/v1 k8s controllers and add labels
Daemonset update strategy defaults to OnDelete in v1beta1, whereas
it defaults to RollingUpdate in v1, which seems prefereable.

This also adds helm-toolkit based labels at the controller level
to match standard usage such as for example by armada as wait labels.

This change has been tested using the promenade resiliency gate.

Change-Id: I9fd1bc4caedc0a6717b779e5333640ca8dc78b7e
2019-04-23 09:24:53 -05:00
Matt McEuen c18e3a8d9d Add optional external_ip to promjoin
Adds an optional external_ip parameter to the prom join script API,
and to the Genesis and KubernetesNode schema.
This is used to populate the host's IP address in its /etc/hosts
file if present, according to normal hosts conventions.
If the value is not passed to prom-join or is absent from a
Genesis or KubernetesNode document, then the hosts file defaults
to the current loopback IP for the hostname (business as usual).

Change-Id: I58dc219923b18aaf9c83453b896ce509664d8766
2019-04-23 08:45:34 -05:00
leledashenqi c09ca80bf0 Change image pull policy from Always to IfNotPresent.
No need to repeat pulling image when container recreate.

Change-Id: I6b3b1e3b963093644faa88ba084138684d78cfab
Story:2004662
Task:28629
2018-12-21 15:01:15 +08:00
Chris Wedgwood 9b4814ad0c [gate] Mask AVX2 to prevent 16.04 on 16.04 VMs boot crashes
16.04 on 16.04 VMs will crash (illegal instruction in
raid6_avx21_gen_syndrome) on boot if the host has AVX2 and we pass
that through.

The issue seems to be the guest kernel sees presence of AVX2 so raid6
module makes use of it - though it's not enabled (different bits).

Until this is resolved in the host hypervisor (kvm) and/or guest
kernel, mask out AVX2 to prevent crashes in L1/L2 VMs.

Change-Id: I0ca8edb8f62f9f2e96aa5e265bac631c346d0eac
2018-09-21 22:16:56 +00: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 ee10b894bf Enable gate shell linting
This enables linting the various supporting shell scripts for the gate
during the unit test job.

Change-Id: I95dc098a602b2ae6807165d3d08c1cb57ba0c702
2018-08-29 08:13:59 -05:00
pallav ea5de25b1a Adding node-labels api
Blueprint: https://review.openstack.org/#/c/583343

1. Added node-labels api for managing node labels in
   kubernetes cluster
2. Added unit test cases
3. Updated documents
4. Resiliency gate script update

Change-Id: Iebd49706b3fdbb3650f2e46c5a7fbd21d236b906
2018-08-09 23:58:59 +05:30
Zuul 9a4882ec4e Merge "Update examples to use new image/repo locations" 2018-07-03 00:16:49 +00: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 eb13fe8e46 Update examples to use new image/repo locations
Change-Id: I284369af2f822c559afbd9ffaf0b1df537baa533
2018-06-27 13:57:12 -05:00
Mark Burnett 9cb2c5a5ca Add local file cache for Builder tarball fetch
Change-Id: I4741b50c4a4b505f4f70ff2cbc5e9689b9f28b7b
2018-06-25 07:51:44 -05:00
Mark Burnett 15658a088e Use Kubernetes lease endpoint reconciler
In the resiliency gate:
* Enable the --endpoint-reconciler-type=least option for the apiserver.
* Extract etcd validation into its own stages.
* Test joining a node while one control plane node is down.

Change-Id: Id89b0816e91ab6427c5e2f4833ad4ec4e1e3d133
Depends-On: I2150d40e917567a4072a1565c1b96089f3d6fd2b
2018-06-15 13:13:02 -05:00
Mark Burnett 309f1d2959 Merge "Bump Kubernetes version from 1.8.6 to 1.10.2" 2018-05-07 12:53:40 +00:00
Mark Burnett 8a7791e13a Bump Kubernetes version from 1.8.6 to 1.10.2
* Updates version references
* Increase memory of test VMs due to higher usage with bump
* Move etcd chart scripts from /tmp to /tmp/bin
* Remove certificate signing options for controller manager
* Remove -a from `kubectl get pods`, since that is deprecated in 1.10
* Shorten liveness/readiness probe times for CoreDNS

Change-Id: I16db0370f1c619e16002dd58e29025eb1538691f
2018-05-04 09:21:18 -05:00
Mark Burnett 38efdf4a53 Add make tests entrypoint
* Fixes some gate script lint issues

Change-Id: I333c7144d0cfc0af42f7f58faf651050e726fbf8
2018-05-03 11:57:20 -05:00
Scott Hussey b9670d70a2 Merge "Add a second auxiliary etcd server for bootstrap" 2018-05-01 21:41:28 +00:00
Mark Burnett 26e6792690 Allow adding new definitions to PKICatalog
* Detect and re-use existing Certs/Keys
* Negative functional test for join with missing cert
* Positive functional test to generate cert after initial construction
* Extract some promenade test code into tools/g2/lib/promenade.sh
* Add timestamps to tar'd up files

Change-Id: Ib717785fc2c8f6cd1db1970ecdf1f5184ed40e92
2018-05-01 14:01:03 +00:00
Mark Burnett 637b7f09f7 Merge "Update gate for Ubuntu 18.04 and proxy" 2018-04-30 14:25:20 +00:00
Mark Burnett 8bbb84af97 Add a second auxiliary etcd server for bootstrap
This adds stability to etcd and enables cleaner waiting by tiller during
deployment of the Kubernetes apiserver and etcd.

* Adds second auxiliary etcd process.
* Enables "sequenced" for remaining ChartGroups.
* Removes unused disks from test VMs.
* Add readiness and liveness probes for kubernetes components

Change-Id: I6f83bb912f76b0ec35503723b417ba45d69e39c5
2018-04-27 13:31:39 -05:00
Mark Burnett 702f5dcb11 Remove kubectl & credentials on join
This behavior can be disabled with the `leave_kubectl` query parameter
to the `join-scripts` endpoint.

Change-Id: Ia2d9d11f2e900aed0b69394de6ba30442921d5a0
2018-04-25 15:12:09 +00:00
Scott Hussey c52027332f Update gate for Ubuntu 18.04 and proxy
- Remove apt conf for proxy, rely on environment
- Update schema to correctly support no_proxy
- Update build-image stage to support a proxy

Change-Id: Ie07a72ad35fde57596af88f838c8c1836b1e8510
2018-04-24 14:11:14 -05:00
One-Fine-Day 01d0b17d8e Promenade Test Fix
Required for Promenade validateDesign for Shipyard

Change-Id: I37eaceb1d57123d4d38737e1d3e6e0ae822f50f1
2018-04-24 16:33:05 +00:00
Aaron Sheffield 05e51de7aa Removed Token Logging from Test Script
- Replaced the logged token in the test script with a md5sum.
   The md5sum can be used for comparison but will not be the token.

Change-Id: I8a8f0751f032413590648ad57fb0b0563b167c78
2018-04-23 13:46:05 -05:00
Mark Burnett 09cdb0459d Add node selector to coredns chart
Change-Id: I5ffb775ed4d78ca0ee0badfca04a6d4383c0085e
2018-03-23 16:30:09 -05:00
Aaron Sheffield cf0037597d Fixes etcd race condition bug
- During genesis there was a race condition on the genesis node leaving
   and other nodes joining.
- Updated etcd anchor to update the config when a host is not healthy.

fixes #54

Change-Id: I0ba2c831c73cc3136ee635e7d0c0efcc8b009858
2018-03-21 20:14:00 -05:00
Samantha Blanco a3b79eabc0 Add policy to validatedesign
Adds policy enforcement to validatedesign and adds testing for
validatedesign endpoint. Also fixes error when raising
ValidationException.

Change-Id: Ie48fc49a05f7890866d2dd3480c4d6333ef3a087
2018-03-19 19:58:34 -04:00
Mark Burnett 47bf886ddd Fix: Issues with integration gate
* Armada document schema errors
* Update for a few breaking changes in OSH charts

Change-Id: I84f32ad01ae5f2847602ad51ceae7a225dfd4c94
2018-03-15 09:24:12 -05:00
Mark Burnett 14d26d7763 Add on_error to manifest schema
This fixes the gate-lint test.

Change-Id: I964a3cbf22aec1c05afe1e000c87aaf4a5b14a0e
2018-03-05 10:16:56 -06:00
Mark Burnett 23840f8f6f Make gate scripts more robust
* remove unused kube-proxy credential substitutions
* add liveness & readiness probes to promenade-api
* fix misleading log message about tar file caching
* don't accidentally overwrite TEMP_DIR variable in functions
* add on_error script for genesis

Change-Id: I5d5b46489fa8c0a10200cbac8cf59462030eb144
2018-02-14 14:27:26 -06:00
Mark Burnett 856b6017ca Merge "Report disk IO in resiliency gate" 2018-02-13 16:02:26 -05:00
Mark Burnett a1388dd40e Report disk IO in resiliency gate
This is to help monitor disk performance in the gate.

Change-Id: I9db1c35ac6df8200deefde04d54144396e0218be
2018-02-13 12:49:44 -06:00
Hassan Kaous f9c8481927 Refactor the generator function to use PKIcatalog.
Change-Id: I9c049b8499a14a537e7cc862ca96f84cf80b6694
2018-02-13 11:24:02 -05:00
Mark Burnett 9e0ab1871a Update complete example to reflect recent changes
* Adds retries to parts of the teardown script.
* Caches tar_urls from Promenade config.

Change-Id: I009eff2479cf486d03bececc975aba6c08b9a8f6
2018-02-12 14:22:11 -06: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