Skip to content

Commit

Permalink
Merge branch 'v2-master' into fixAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaine Forbush committed Oct 5, 2018
2 parents f5916b0 + 5a72e70 commit 8a11495
Show file tree
Hide file tree
Showing 162 changed files with 4,291 additions and 736 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ jobs:
- name: E2E Tests
before_script:
- chmod +x ./deploy/ci/travis/run-e2e-tests.sh
# Install ffmpeg so we can capture a video of the display as the tests run
# We will install ffmpeg so we can capture a video of the display as the tests run
- sudo add-apt-repository -y ppa:mc3man/trusty-media
- sudo apt-get -qq update
- sudo apt-get install -y ffmpeg
script:
- "./deploy/ci/travis/fetch-depcache.sh"
- "./deploy/ci/travis/run-e2e-tests.sh video"
- "./deploy/ci/travis/upload-e2e-test-report.sh"
notifications:
Expand Down
24 changes: 0 additions & 24 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions deploy/ci/travis/depcache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

echo "============================="
echo "Generate Dep Cache for Travis"
echo "============================="

# Install go and dep
apt-get update
apt-get install -y curl
apt-get install -y git
curl -sL -o ./gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
chmod +x ./gimme
eval "$(./gimme 1.9.7)"
mkdir -p /root/go/bin
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
export PATH=/root/go/bin:$PATH
export DEPPROJECTROOT=./stratos
cd /stratos
dep ensure -v --vendor-only

SUM=$(cat Gopkg.toml Gopkg.lock | md5sum | awk '{ print $1 }')
tar -czf travis-vendor-${SUM}.tgz ./vendor
echo $SUM
echo "Completed"

32 changes: 32 additions & 0 deletions deploy/ci/travis/fetch-depcache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
set -e

# Download the go dep cache if configured
DIRPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd ../../.. && pwd)"
GODEPCACHEURL=${STRATOS_GODEP_CACHE:false}

unamestr=`uname`

if [ "${GODEPCACHEURL}" != "false" ]; then
pushd "$DIRPATH" > /dev/null
if [ "$unamestr" == "Darwin" ]; then
CACHEMD5=$(cat Gopkg.toml Gopkg.lock | md5 -q)
else
CACHEMD5=$(cat Gopkg.toml Gopkg.lock | md5sum | awk '{ print $1 }')
fi
popd > /dev/null
DEPFILE="travis-vendor-${CACHEMD5}.tgz"
echo "Looking for vendor cache file : $DEPFILE"
set +e

echo "${GODEPCACHEURL}/${DEPFILE}"
curl -L -s -f "${GODEPCACHEURL}/${DEPFILE}" -o depcache.tgz
if [ $? -eq 0 ]; then
echo "Unpacking depcache"
tar -xvf depcache.tgz -C "${DIRPATH}" > /dev/null
else
echo "Could not find vendor cache to download"
fi
set -e
fi

8 changes: 8 additions & 0 deletions deploy/ci/travis/generate-depcache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

# Create a vendor cache package for use in Travis

DIRPATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd ../../.. && pwd)"

echo $DIRPATH
docker run -v ${DIRPATH}:/stratos ubuntu:trusty /stratos/deploy/ci/travis/depcache.sh
19 changes: 14 additions & 5 deletions deploy/ci/travis/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ export CERTS_PATH=./dev-certs
# Single arg if set to 'video' will use ffmpeg to capture the browser window as a video as the tests run
CAPTURE_VIDEO=$1

# Test report folder name override
TIMESTAMP=`date '+%Y%m%d-%H.%M.%S'`

export E2E_REPORT_FOLDER="./e2e-reports/${TIMESTAMP}-Travis-Job-${TRAVIS_JOB_NUMBER}"
mkdir -p "${E2E_REPORT_FOLDER}"

if [ "$CAPTURE_VIDEO" == "video" ]; then
echo "Starting background install of ffmpeg"
sudo apt-get install -y ffmpeg > ${E2E_REPORT_FOLDER}/ffmpeg-install.log &
FFMPEG_INSTALL_PID=$!
fi

echo "Using local deployment for e2e tests"
# Quick deploy locally
# Start a local UAA - this will take a few seconds to come up in the background
Expand All @@ -47,13 +59,10 @@ popd

E2E_TARGET="e2e -- --dev-server-target= --base-url=https://127.0.0.1:5443"

# Test report folder name override
TIMESTAMP=`date '+%Y%m%d-%H.%M.%S'`
export E2E_REPORT_FOLDER="./e2e-reports/${TIMESTAMP}-Travis-Job-${TRAVIS_JOB_NUMBER}"
mkdir -p "${E2E_REPORT_FOLDER}"

# Capture video if configured
if [ "$CAPTURE_VIDEO" == "video" ]; then
echo "Waiting for ffmpeg install to complete..."
wait ${FFMPEG_INSTALL_PID}
echo "Starting video capture"
ffmpeg -video_size 1366x768 -framerate 25 -f x11grab -draw_mouse 0 -i :99.0 ${E2E_REPORT_FOLDER}/ScreenCapture.mp4 >/dev/null 2>&1 &
FFMPEG=$!
Expand Down
19 changes: 15 additions & 4 deletions deploy/kubernetes/console/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ spec:
template:
metadata:
labels:
app: "{{ .Release.Name }}"
component: "console"
app.kubernetes.io/name: "stratos"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
app.kubernetes.io/component: "console"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
spec:
containers:
- image: {{.Values.kube.registry.hostname}}/{{.Values.kube.organization}}/{{.Values.images.console}}:{{.Values.consoleVersion}}
Expand Down Expand Up @@ -243,12 +246,20 @@ kind: Deployment
metadata:
name: console-mariadb
labels:
app: "{{ .Release.Name }}"
app.kubernetes.io/name: "stratos"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
app.kubernetes.io/component: "console-mariadb"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
spec:
template:
metadata:
labels:
app: "{{ .Release.Name }}"
app.kubernetes.io/name: "stratos"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
app.kubernetes.io/component: "console-mariadb"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
spec:
containers:
- name: mariadb
Expand Down
18 changes: 15 additions & 3 deletions deploy/kubernetes/console/templates/pre-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ kind: PersistentVolumeClaim
metadata:
name: "{{ .Release.Name }}-encryption-key-volume"
labels:
app: "{{ .Release.Name }}"
app.kubernetes.io/name: "stratos"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
app.kubernetes.io/component: "console-encryption-volume"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
annotations:
{{- if .Values.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.storageClass | quote }}
Expand All @@ -26,7 +30,11 @@ apiVersion: v1
metadata:
name: console-mariadb
labels:
app: "{{ .Release.Name }}"
app.kubernetes.io/name: "stratos"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
app.kubernetes.io/component: "console-mariadb-volume"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
annotations:
{{- if .Values.mariadb.persistence.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.mariadb.persistence.storageClass | quote }}
Expand All @@ -50,7 +58,11 @@ kind: PersistentVolumeClaim
metadata:
name: "{{ .Release.Name }}-upgrade-volume"
labels:
app: "{{ .Release.Name }}"
app.kubernetes.io/name: "stratos"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
app.kubernetes.io/component: "console-upgrade-volume"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
annotations:
{{- if .Values.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.storageClass | quote }}
Expand Down
18 changes: 15 additions & 3 deletions deploy/kubernetes/console/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ type: Opaque
metadata:
name: "{{ .Release.Name }}-secret"
labels:
app: "{{ .Release.Name }}"
app.kubernetes.io/name: "stratos"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
app.kubernetes.io/component: "console-secret"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
data:
stolon: {{ .Values.dbPassword | b64enc }}
db-password: {{ .Values.mariadb.mariadbPassword | b64enc }}
Expand All @@ -16,7 +20,11 @@ kind: Secret
metadata:
name: "{{ .Release.Name }}-mariadb-secret"
labels:
app: "{{ .Release.Name }}"
app.kubernetes.io/name: "stratos"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
app.kubernetes.io/component: "console-mariadb-secret"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
type: Opaque
data:
{{- if .Values.mariadb.mariadbRootPassword }}
Expand All @@ -38,7 +46,11 @@ type: kubernetes.io/dockercfg
metadata:
name: {{ .Values.dockerRegistrySecret }}
labels:
app: "{{ .Release.Name }}"
app.kubernetes.io/name: "stratos"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
app.kubernetes.io/component: "console-dockerreg-secret"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
data:
.dockercfg: {{ template "imagePullSecret" . }}
{{- end}}
16 changes: 12 additions & 4 deletions deploy/kubernetes/console/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ apiVersion: v1
kind: Service
metadata:
labels:
app: "{{ .Release.Name }}"
app.kubernetes.io/name: "stratos"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
app.kubernetes.io/component: "console-ext-service"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
name: "{{ .Release.Name }}-ui-ext"
spec:
ports:
Expand All @@ -25,7 +29,7 @@ spec:
protocol: TCP
targetPort: 443
selector:
app: "{{ .Release.Name }}"
app.kubernetes.io/instance: "{{ .Release.Name }}"
component: console
{{- if or .Values.useLb .Values.services.loadbalanced }}
type: LoadBalancer
Expand All @@ -41,12 +45,16 @@ kind: Service
metadata:
name: "{{ .Release.Name }}-mariadb"
labels:
app: "{{ .Release.Name }}"
app.kubernetes.io/name: "stratos"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/version: "{{ .Chart.AppVersion }}"
app.kubernetes.io/component: "console-mariadb-service"
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
spec:
type: ClusterIP
ports:
- name: mysql
port: 3306
targetPort: mysql
selector:
app: "{{ .Release.Name }}"
app.kubernetes.io/instance: "{{ .Release.Name }}"
16 changes: 16 additions & 0 deletions docs/status_updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

Weekly status updates are published here.

## 5th October 2018

The team have been preparing for the CF Summit in Basel next week.

Highlights for this week (continuing from last week):

- E2E Tests and Automation - Focusing on making the E2E tests more resilient to timing issues.

- Metrics - Added Diego Cell to the App Instances table when metrics are available and added a Cell view which shows metrics for a given Diego cell.

Fixes:

- Ensure we handle orgs with no users [\#3098](https://github.com/cloudfoundry-incubator/stratos/pull/3098) - fixes a bug creating a space in a new org.

- Endpoint Registration: Only show SSO option for CF Endpoint type [#\3105](https://github.com/cloudfoundry-incubator/stratos/pull/3105)

## 28th September 2018

This week saw the release of 2.1.1 and an update 2.1.2. It was necessary to tag a 2.1.2 release to resolve a broken backend dependency that would affect users deploying via 'cf push'. You should use 2.1.2 and not 2.1.1.
Expand Down
Loading

0 comments on commit 8a11495

Please sign in to comment.