72 Commits

Author SHA1 Message Date
Dustin Specker
e9696dca0a feat: support setting up Vagrant behind corporate proxy with TLS
This is a squashed commit, keeping previous messages intact for history.

- chore(tools/gate/jarvis): remove unused http_proxy

- fix(tools/gate/deploy-k8s): pre-pull Calico images

By pre-pulling Calico images, we can better ensure the timeout for
`kubectl wait` for `k8s-app=kube-dns` is sufficient, since most of the
time spent is on pulling images.

- fix(tools/gate/jarvis): skip loki Helm test when proxy is set

The Loki test attempts to install `curl` and `jq`, which will fail when
a proxy is required since the pod doesn't setup proxy environment
variables.

- feat(tools/deployment/vagrant): support providing a cert for proxy

- feat(ubuntu-base/standard-container): support internal-certs

The Vagrant file mounts an additional synced folder to
/airship_charts/tools/gate/jarvis/ubuntu-base/internal-certs.

This internal-certs dir has been added to this Git repository using a
placeholder `.gitkeep` file to keep the directory non-empty. This
directory has also been added to .gitignore to prevent any changes such
as the mounted internal certs from being committed.

The ubuntu-base image sets the proxy env vars as well as contains the
internal certs. The standard container is then based on the ubuntu-base
image.

The ubuntu-base image is published as library/ubuntu:focal in harbor.

- fix(tools/gate/jarvis): support Harbor behind proxy with cert

Change-Id: I602dfa3b04b798a1a2096242ffb6dfe7f2ba92e4
2021-03-08 08:56:29 -06:00
Zuul
877149a753 Merge "chore(**/config_map.yaml): use linux line endings" 2021-03-05 17:30:36 +00:00
Zuul
7381fdb2cc Merge "Add image CVE scan report link to Gerrit" 2021-03-05 16:29:58 +00:00
Dustin Specker
1b55812eca chore(**/config_map.yaml): use linux line endings
Change-Id: I1dfbf5b3c9891fc62a1607690680e423b5d2e125
2021-03-05 08:57:54 -06:00
Bartra, Rick (rb560u)
e2a4819184 Add image CVE scan report link to Gerrit
A link to the change's built image CVE scan report is added
to "Checks->Message" section in Gerrit. The link is posted in both
success and failure result of the 'jarvispipeline' check.

For the Task-createFailure and Task-createSuccess, the taskRun uid
is obtained from the 'microflow-setup-image' pod in the
corresponding namespace.

Additionally, the 800 script is updated to immediately fail the
CI pipeline if the development pipeline fails.

Change-Id: I9be8a486d71247385280a863f22a9bf9973333bb
2021-03-04 13:13:50 -05:00
Tin Lam
edffb77823 feat(ldap): adds LDAP group to project membership
This adds LDAP group as member to the respective harbor project in the
jarvis-projects chart.

Signed-off-by: Tin Lam <tin@irrational.io>
Change-Id: Icb50ccb2d3bb82dd630c87c372caadf04730a536
2021-03-03 22:32:37 +00:00
Zuul
d55c4271b4 Merge "Fixing development-pipeline regression" 2021-03-03 21:07:28 +00:00
Danny Massa
d2692c2e70 Fixing development-pipeline regression
Change-Id: I2f9838a04f332e61cdbfabc3ad2cc18d7b0fc9a5
2021-03-03 12:39:40 -06:00
Zuul
b2771e526e Merge "feat(ldap): adds appropriate ldap groups" 2021-03-03 16:47:55 +00:00
FLETCHER
beefa8dd30 feat(entrypoint) Create entrypoints
This patchset moves all of the Tekton task script sections to use
a defined entrypoint instead of an ansible-playbook command. This is
a step to keeping all business logic out of the tekton tasks, i.e. the
tekton tasks should work with any standard container given, not just one
using Ansible.

Change-Id: I5e106a8a75b79c0c2948cda638fbe532fd12fae3
2021-03-02 09:38:19 -06:00
Tin Lam
44e370875f feat(ldap): adds appropriate ldap groups
This adds in LDAP groups and associated the newly created project-
based users into these groups.

Signed-off-by: Tin Lam <tin@irrational.io>
Change-Id: I082d342cccce1f7de9942f0915d4c23b53863b64
2021-02-28 18:01:17 -06:00
Zuul
5d3d0df24b Merge "(move) Move the dev pipeline / standard-container" 2021-02-26 17:52:53 +00:00
FLETCHER
183854482b (move) Move the dev pipeline / standard-container
This patchset copies the development-pipeline and standard-container
into the sample network mongodb directory to begin testing the pipeline
and standard-container in a namespace created by jarvis-system.

Change-Id: I8448a122e8da218752ea57b15fb2983881e90ec9
2021-02-26 01:20:22 +00:00
Zuul
d997106369 Merge "chore(version): updates and pins chart version" 2021-02-25 21:39:42 +00:00
Zuul
3892be195a Merge "feat(CI) optional gating" 2021-02-24 23:25:52 +00:00
Tin Lam
8315406f19 chore(version): updates and pins chart version
For all upstream charts we use, this PS pins and/or updates the chart
version to the latest in the respective chart repo.

Signed-off-by: Tin Lam <tin@irrational.io>
Change-Id: I39d2c1e13503d495b48bf93a7c0371de6eed6c96
2021-02-24 12:59:59 -06:00
Zuul
3fac7a245e Merge "chore(ldap): adds in ldap user setup" 2021-02-23 18:44:19 +00:00
Zuul
b7796718d7 Merge "feat(notary): enables notary support" 2021-02-23 18:17:01 +00:00
Tin Lam
3e0c8adeb9 chore(ldap): adds in ldap user setup
This patch set places in additional users in the openLDAP deployment in
the gate.

Signed-off-by: Tin Lam <tin@irrational.io>
Change-Id: I1564da86e5299ae4e10e0d5d53cb0c1fa97704af
2021-02-22 09:28:36 -06:00
Zuul
9675bafb3b Merge "(feat) Create namespace, service_account, role and rolebinding" 2021-02-19 19:18:58 +00:00
Danny Massa
baec5970e5 feat(CI) optional gating
This change adds two repositories intended to be used as templates to the Gerrit setup. One repository will utilize the 'Verified' label, one repository will not. This will divide the repositories into two groups, a group where the checks provided by Jarvis is enforced as CI, and a group where the checks provided by Jarvis are informational only, and do not block patch sets. This is configurable in the Jarvis-Project Helm chart.

Change-Id: Iff8a2b1a29883837ac7dab49056fe0c64d675e10
2021-02-19 12:53:06 -06:00
Zuul
890b6a7c3f Merge "feat(gate) adding retry mechanism to jarvis-projects verification" 2021-02-19 16:58:51 +00:00
Stacey Fletcher
1bb4af812b (feat) Create namespace, service_account, role and rolebinding
This patchset dynamically creates a namespace with the changeset and
patchset number that is triggered via gerrit.

Change-Id: Id257fcb6a12711ae1a6341337cf6e1b0bec8c7e5
2021-02-19 15:14:00 +00:00
Tin Lam
a1a67625cd fix(aio): updates cert-manager
This patch set updates the cert manager deployment to latest.

Signed-off-by: Tin Lam <tin@irrational.io>
Change-Id: I50368c1bdf43aa7cdf72116401f7febed5526c4d
2021-02-18 23:41:27 +00:00
Danny Massa
613ed796a0 feat(gate) adding retry mechanism to jarvis-projects verification
Occasionally, the request made to Gerrit is made before the Verified label is applied by the pipeline. To remedy this we will send the request multiple times until the expected result is returned (or until it has been tried 6 times in 30 seconds)

Change-Id: Ie876cf94e4a56684f25d868008a1b78054cac09b
2021-02-18 22:46:02 +00:00
Tin Lam
8f985e48b0 feat(notary): enables notary support
This patch set initializes the notary key and places it into the harbor
notary server which can be used to sign images. A follow on patch set
will update the ansible to utilize this key.

Signed-off-by: Tin Lam <tin@irrational.io>
Change-Id: I7ef9239518dbb1e45bd4de965a43524e1c8fc93d
2021-02-18 00:22:13 +00:00
Zuul
0cef6abcbe Merge "feat(Gerrit) Adding Verified Label functionality" 2021-02-16 21:21:38 +00:00
Zuul
673d29436c Merge "Add Kyverno to Jarvis AIO" 2021-02-16 20:05:23 +00:00
Zuul
2e6d653759 Merge "(logs) Add tekton objects to log collection" 2021-02-16 19:49:19 +00:00
Danny Massa
2c6b9faf3b feat(Gerrit) Adding Verified Label functionality
+1 is posted to a patchset when pipeline is successful, -1 is posted when a pipeline fails

Change-Id: I3cef616b80f18ed4457d9202718b19b0ca93e371
2021-02-16 08:30:16 -06:00
Bartra, Rick (rb560u)
ed882b533f Add Kyverno to Jarvis AIO
Kyverno is a policy engine designed for Kubernetes that will
be used to make sure Kubernetes resources are compliant to a
defined set of rules. For example, a rule can be implemented in
Kyverno stating that no containers can run as privileged. Kyverno
would then block Kubernetes resources from being created or updated
that violate this rule (if in enforce mode). Kyverno also has auditing
capability that scans existing resources and creates compliance reports
at the namespace level.

Kyverno via its CLI (kyverno apply command), also allows scans of
resource definitions(yaml) to report violations that may exists without
the need of creating or updating a resource. This could be useful down
the line if there is a desire to create a CI gate to test a incoming
change for policy violations - essentially pushing the testing to the
left as opposed to getting policy violation feedback when the Kubernetes
admission controller is invoked.


Change-Id: Ie8537fa625a6508211aa17f929c5803773a8fda5
2021-02-12 20:18:44 +00:00
Tin Lam
99ff9ae29e chore(aio): cleans up start up script
This removes the script's redundant project creation curl calls as
this is created by the project code here [0]. This also moved the
wedged temporary script last to allow projects creation to occur
prior to the dev pipeline run.

[0] 1169477e65/charts/jarvis-project/templates/Job-project.yaml (L53-L72)

Signed-off-by: Tin Lam <tin@irrational.io>
Change-Id: Ie6ca362cf7d05dd07881e8540c556f7a3ad534e7
2021-02-11 15:45:25 -06:00
FLETCHER
a934750a58 (logs) Add tekton objects to log collection
This adds pipeline, pipelinerun, tasks, and taskruns logs to appear
in Zuul

Change-Id: I100fc87899205cd81d11b9ce9fe4e9f4579cb906
2021-02-11 09:52:19 -06:00
Zuul
1077b28b33 Merge "feat(chart) Development Pipeline and Standard Container" 2021-02-04 22:52:49 +00:00
Bartra, Rick (rb560u)
9c8bb8756a Update tmpfs etcd path
Update tmpfs for etcd from /data to /var/lib/minikube/etcd

Reference: 
- hostPath:
    path: /var/lib/minikube/etcd
    type: DirectoryOrCreate
  name: etcd-data
Change-Id: I4c422b01d3f353d378a4cc7ac4bcdd7cff0cf674
2021-02-04 19:13:19 +00:00
Stacey Fletcher
2e8e00f461 feat(chart) Development Pipeline and Standard Container
Updating example configmap data and adding an example standardized container
to be used for the gates.

Added Chart tasks in order to make testing easier for the chart workflow.
Removing the triggers and cluster roles settings to get ready to move the pipeline to
a new location.
Added pipelinerun to allow for testing via kubectl create -f

co-author: sshturm@mirantis.com - Combined feat(chart) Chart task in Development Pipeline
Change-Id: Icdb6bfe391e0e30883eeca661668763515a5565a
Signed-off-by: Pete Birley <pete@port.direct>
2021-02-04 15:45:54 +00:00
Zuul
37b6d1c63a Merge "gate(update): Add SAN to K8s Certs" 2021-02-01 14:37:08 +00:00
Stacey Fletcher
02aabeba99 Revert "feat(Gatekeeper): Adds gatekeeper to K8s deployment"
This reverts commit 7522da6cc14154dea964a4d25362c426c0ee0034.

Reason for revert: Gate is sporadically failing

Change-Id: I813f16505b23dcd97980b149b440af53130df908
2021-01-29 05:14:43 +00:00
Pete Birley
7522da6cc1 feat(Gatekeeper): Adds gatekeeper to K8s deployment
This PS adds the gatekeeper chart to the deployment, which is required
to provide safeguards surreounding pipelines.

Signed-off-by: Pete Birley <pete@port.direct>
Change-Id: Ie434d4052435cde83f0ff91d068f25882cebe1de
2021-01-26 23:44:56 +00:00
Zuul
270a14d379 Merge "Push Jarvis test projects into gerrit repositories" 2021-01-25 22:25:15 +00:00
Pete Birley
aba4fd2398 gate(update): Add SAN to K8s Certs
This PS simply cleans the minikube deployment slightly and adds
a SAN to the K8s API certs matching the hostname of the vm. This
Enables the K8s api to be accessed more cleanly from outside of
the vagrant environment, and opens the door to deploying an IDC
for K8s.

Signed-off-by: Pete Birley <pete@port.direct>
Change-Id: Idd86fe9b3f449fc794586b1a7d8c8f2e51eeb9d7
2021-01-25 21:20:50 +00:00
Bartra, Rick (rb560u)
fb715f669b Push Jarvis test projects into gerrit repositories
Change-Id: Ia183ce961ee8d0c12c0b2fb371d7f81475467cca
2021-01-25 16:07:39 -05:00
Tin Lam
6a5335b413 fix(make): updates makefile
This patch addresses a few issues with the Makefile

- removes redundant directory checks;
- removes requirements.yaml check as helm3 moved that into Charts.yaml;
- fixes so "helm dep up" would work;
- removes loki and harbor from exclusion as they are now actual charts;
- updates the script to use the makefile.

Signed-off-by: Tin Lam <tin@irrational.io>
Change-Id: Ie6133bce4a45dd085569c51abc4c4c3c52b14378
2021-01-25 13:56:43 -06:00
Zuul
0cd4381cd1 Merge "feat(ldap): adds ldap support for Harbor" 2021-01-25 19:09:36 +00:00
Zuul
72d0f3fab4 Merge "feat(ldap): adds ldap support for Grafana" 2021-01-25 18:28:35 +00:00
Tin Lam
714a550ffd feat(ldap): adds ldap support for Harbor
This adds a chart that allows LDAP support for Harbor dashboard.

Signed-off-by: Tin Lam <tin@irrational.io>
Change-Id: I60849d720f09296e5cc6872a77053667a6f5b69e
2021-01-23 11:31:03 -06:00
Tin Lam
406c024b59 feat(ldap): adds ldap support for Grafana
This adds example configurations in the gate to leverage LDAP
auth for Grafana dashboard.

This patch also fixes up minor indentation errors in YAML.

Signed-off-by: Tin Lam <tin@irrational.io>
Change-Id: I0961ced71b8a4d1c4f639fd898bc70761f8de995
2021-01-23 11:07:47 -06:00
Pete Birley
2dab74898b feat: Tekton/Gerrit interaction
This PS adds the basic gerrit<->tekton interaction, which consists of
two charts:
 * Jarvis-System: which launches a utility to scrape pending gerrit
   checks and rechecks, before forwarding requests to a tekton event-
   listener. This event listener then launches a pipeline that sets up
   the environment for the pipeline in the project repo to make use of.
 * Jarvis-Project: which launches a job, which sets up a repo in gerrit,
   configures the checks upon it, and addtionally sets up appropriate
   repos in harbor for oci images and helm charts.

Note: This change makes use of the Jarvis-Connector, which is hosted here:
 * https://github.com/att-comdev/jarvis-connector

Change-Id: I0ca023e357fb562b4f65e081a06ac6581471b4bc
Signed-off-by: Pete Birley <pete@port.direct>
2021-01-22 09:12:32 -06:00
Zuul
aaeaa1710b Merge "Adding Harbor Docker Pull test to AIO" 2021-01-21 15:21:47 +00:00
Zuul
1b1dcea22b Merge "feat(jarvis): Add Jarvis Test Artifacts" 2021-01-20 21:27:48 +00:00