Skip to content

Commit c7a7c99

Browse files
authored
Merge pull request #1298 from wireapp/release/2020-12-21
Release 2020/12/21
2 parents d2b7b82 + ee5b103 commit c7a7c99

File tree

385 files changed

+14653
-574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

385 files changed

+14653
-574
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,7 @@ deploy/dockerephemeral/build/smtp/
8383
/libs/libzauth/bzauth-c/deb/usr
8484

8585
# Generated hie.yaml
86-
hie.yaml
86+
hie.yaml
87+
88+
# generated files under .local
89+
.local

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,42 @@
1414
1515
-->
1616

17+
# [2020-12-21]
18+
19+
## Release Notes
20+
21+
* upgrade spar before brig
22+
* upgrade nginz
23+
24+
## Features
25+
26+
* Increase the max allowed search results from 100 to 500. (#1282)
27+
28+
## Bug fixes and other updates
29+
30+
* SCIM: Allow strings for boolean values (#1296)
31+
* Extend SAML IdP/SCIM permissions to admins (not just owners) (#1274, #1280)
32+
* Clean up SCIM-invited users with expired invitation (#1264)
33+
* move-team: CLI to export/import team data (proof of concept, needs testing) (#1288)
34+
* Change some error labels for status 403 responses under `/identity-providers` (used by team-settings only) (#1274)
35+
* [federation] Data.Qualified: Better field names (#1290)
36+
* [federation] Add endpoint to get User Id by qualified handle (#1281, #1297)
37+
* [federation] Remove DB tables for ID mapping (#1287)
38+
* [federation] servantify /self endpoint, add `qualified_id` field (#1283)
39+
40+
## Documentation
41+
42+
* Integrate servant-swagger-ui to brig (#1270)
43+
44+
## Internal changes
45+
46+
* import all charts from wire-server-deploy/develop as of 2012-12-17 (#1293)
47+
* Migrate code for easier CI (#1294)
48+
* unit test and fix for null values in rendered JSON in UserProfile (#1292)
49+
* hscim: Bump upper bound for servant packages (#1285)
50+
* drive-by fix: allow federator to locally start up by specifying config (#1283)
51+
52+
1753
# 2020-12-15
1854

1955
## Release Notes

Makefile

Lines changed: 107 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
SHELL := /usr/bin/env bash
2-
LANG := en_US.UTF-8
3-
DOCKER_USER ?= quay.io/wire
4-
DOCKER_TAG ?= local
1+
SHELL := /usr/bin/env bash
2+
LANG := en_US.UTF-8
3+
DOCKER_USER ?= quay.io/wire
4+
# default docker image tag is your system username, you can override it via environment variable.
5+
DOCKER_TAG ?= $(USER)
6+
# default helm chart version must be 0.0.42 for local development (because 42 is the answer to the universe and everything)
7+
HELM_SEMVER ?= 0.0.42
8+
# The list of helm charts needed for integration tests on kubernetes
9+
CHARTS_INTEGRATION := wire-server databases-ephemeral fake-aws
10+
# The list of helm charts to publish on S3
11+
# FUTUREWORK: after we "inline local subcharts", i.e. move charts/brig to charts/wire-server/brig this list could be generated from the folder names under ./charts/
12+
CHARTS_RELEASE := wire-server databases-ephemeral fake-aws aws-ingress backoffice calling-test demo-smtp elasticsearch-curator elasticsearch-external fluent-bit minio-external cassandra-external nginx-ingress-controller nginx-ingress-services reaper wire-server-metrics sftd
513

614
default: fast
715

@@ -198,10 +206,105 @@ db-reset:
198206
libzauth:
199207
$(MAKE) -C libs/libzauth install
200208

209+
#################################
201210
# Useful when using Haskell IDE Engine
202211
# https://github.com/haskell/haskell-ide-engine
203212
#
204213
# Run this again after changes to libraries or dependencies.
205214
.PHONY: hie.yaml
206215
hie.yaml:
207216
stack exec gen-hie > hie.yaml
217+
218+
#####################################
219+
# Today we pretend to be CI and run integration tests on kubernetes
220+
# (see also docs/developer/processes.md)
221+
#
222+
# NOTE: This uses local helm charts from .local/charts (which it builds before running this)
223+
#
224+
# NOTE/WARNING: By default, it uses local docker image tags,
225+
# which will not work at this time on your remote kubernetes cluster. [FUTUREWORK: local kubernetes cluster]
226+
#
227+
# If you wish to use docker images that are uploaded to quay.io, you must set DOCKER_TAG
228+
#
229+
# DOCKER_TAG=<desired-wire-server-docker-tag> make kube-integration
230+
#
231+
# and if you don't know what a good DOCKER_TAG might be, you can run
232+
#
233+
# make latest-brig-tag
234+
#
235+
# This task requires: [FUTUREWORK: add tooling setup to wire-server]
236+
# - helm (version 3.1.1)
237+
# - kubectl
238+
# - a valid kubectl context configured (i.e. access to a kubernetes cluster)
239+
.PHONY: kube-integration
240+
kube-integration: charts
241+
# by default "test-<your computer username> is used as namespace
242+
export NAMESPACE=test-$(USER); ./hack/bin/integration-setup.sh
243+
export NAMESPACE=test-$(USER); ./hack/bin/integration-test.sh
244+
245+
.PHONY: kube-integration-teardown
246+
kube-integration-teardown:
247+
export NAMESPACE=test-$(USER); ./hack/bin/integration-teardown.sh
248+
249+
.PHONY: latest-brig-tag
250+
latest-brig-tag:
251+
./hack/bin/find-latest-docker-tag.sh
252+
253+
.PHONY: release-chart-%
254+
release-chart-%:
255+
@if [ "${HELM_SEMVER}" = "0.0.42" ]; then \
256+
echo "Environment variable HELM_SEMVER not set to non-default value. Re-run with HELM_SEMVER=<something>"; \
257+
exit 1; \
258+
fi
259+
@if [ "${DOCKER_TAG}" = "${USER}" ]; then \
260+
echo "Environment variable DOCKER_TAG not set to non-default value. Re-run with DOCKER_TAG=<something>"; \
261+
exit 1; \
262+
fi
263+
make chart-$(*)
264+
265+
266+
# Rationale for copying charts to a gitignored folder before modifying helm versions and docker image tags:
267+
#
268+
# * we want to keep git history clean and not clutter it with version bump commits
269+
# * synchronizing version bumps with multiple PRs, releases to master and merges back to develop is hard to do in git
270+
# * we don't want to spend time modifying version tags manually all the time
271+
# * we want version pinning for helm charts and docker images for reproducible results during deployments
272+
# * CI will keep track of versioning and upload charts to an S3 mirror
273+
# * if you need to do this locally, also use this make target and set desired versions accordingly.
274+
.PHONY: chart-%
275+
chart-%:
276+
./hack/bin/copy-charts.sh $(*)
277+
./hack/bin/set-wire-server-image-version.sh $(DOCKER_TAG)
278+
./hack/bin/set-helm-chart-version.sh "$*" $(HELM_SEMVER)
279+
280+
# Usecase for this make target:
281+
# * for local integration testing of wire-server inside kubernetes
282+
.PHONY: charts-integration
283+
charts-integration: $(foreach chartName,$(CHARTS_INTEGRATION),chart-$(chartName))
284+
285+
# Usecase for this make target:
286+
# 1. for releases of helm charts
287+
# 2. for testing helm charts more generally
288+
.PHONY: charts-release
289+
charts-release: $(foreach chartName,$(CHARTS_RELEASE),release-chart-$(chartName))
290+
291+
.PHONY: clean-charts
292+
clean-charts:
293+
rm -rf .local/charts
294+
295+
##########################################
296+
# Helm chart releasing (mirroring to S3)
297+
# Only CI should run these targets ideally
298+
299+
# Usecases for this make target:
300+
# To release one single helm chart to S3 mirror
301+
# (assummption: CI sets DOCKER_TAG and HELM_SEMVER)
302+
.PHONY: upload-chart-%
303+
upload-chart-%: release-chart-%
304+
./hack/bin/upload-helm-charts-s3.sh .local/charts/$(*)
305+
306+
# Usecases for this make target:
307+
# To uplaod all helm charts in the CHARTS_RELEASE list (see top of the time)
308+
# (assummption: CI sets DOCKER_TAG and HELM_SEMVER)
309+
.PHONY: upload-charts
310+
upload-charts: $(foreach chartName,$(CHARTS_RELEASE),upload-chart-$(chartName))

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ It also contains
6363
- **build**: Build scripts and Dockerfiles for some platforms
6464
- **deploy**: (Work-in-progress) - how to run wire-server in an ephemeral, in-memory demo mode
6565
- **doc**: Documentation
66+
- **hack**: scripts and configuration for kuberentes helm chart development/releases mainly used by CI
67+
- **charts**: kubernetes helm charts
6668

6769
## Architecture Overview
6870

charts/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# helm generated files
2+
*.tgz
3+
requirements.lock

charts/account-pages/.helmignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj

charts/account-pages/Chart.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: v1
2+
description: A Helm chart for the Wire account pages in Kubernetes
3+
name: account-pages
4+
version: 0.0.42

charts/account-pages/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Basic web application that provides a frontend with functionality for account activation and password reset
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/*
3+
Expand the name of the chart.
4+
*/}}
5+
{{- define "account-pages.name" -}}
6+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7+
{{- end -}}
8+
9+
{{/*
10+
Create a default fully qualified app name.
11+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12+
*/}}
13+
{{- define "account-pages.fullname" -}}
14+
{{- $name := default .Chart.Name .Values.nameOverride -}}
15+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
16+
{{- end -}}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: account-pages
5+
labels:
6+
wireService: account-pages
7+
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
8+
release: {{ .Release.Name }}
9+
heritage: {{ .Release.Service }}
10+
spec:
11+
replicas: {{ .Values.replicaCount }}
12+
strategy:
13+
type: RollingUpdate
14+
rollingUpdate:
15+
maxUnavailable: 0
16+
maxSurge: {{ .Values.replicaCount | mul 2 }}
17+
selector:
18+
matchLabels:
19+
wireService: account-pages
20+
app: account-pages
21+
template:
22+
metadata:
23+
labels:
24+
wireService: account-pages
25+
app: account-pages
26+
release: {{ .Release.Name }}
27+
spec:
28+
containers:
29+
- name: account-pages
30+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
31+
env:
32+
- name: BACKEND_REST
33+
value: https://{{ .Values.config.externalUrls.backendRest }}
34+
- name: APP_BASE
35+
value: https://{{ .Values.config.externalUrls.appHost }}
36+
{{- range $key, $val := .Values.envVars }}
37+
- name: {{ $key }}
38+
value: {{ $val | quote }}
39+
{{- end }}
40+
ports:
41+
- name: http
42+
containerPort: {{ .Values.service.http.internalPort }}
43+
readinessProbe:
44+
httpGet:
45+
path: /_health/
46+
port: {{ .Values.service.http.internalPort }}
47+
scheme: HTTP
48+
livenessProbe:
49+
initialDelaySeconds: 30
50+
timeoutSeconds: 3
51+
httpGet:
52+
path: /_health/
53+
port: {{ .Values.service.http.internalPort }}
54+
scheme: HTTP
55+
resources:
56+
{{ toYaml .Values.resources | indent 12 }}
57+
dnsPolicy: ClusterFirst
58+
restartPolicy: Always

0 commit comments

Comments
 (0)