Skip to content

Commit

Permalink
Merge branch 'v2-master' into user-favorites
Browse files Browse the repository at this point in the history
* v2-master: (34 commits)
  v2/v3 api docs updates
  Fix create-services script used to set CF up for E2E tests
  Only prevent copy & paste in confirm dialog for production
  Fix for bug causing intermittment E2E Test failures on org tests (#3366)
  Allow e2e createService 3 attempts at creating service
  Weekly updaye 18 January (#3365)
  Change log for 2.3.0 (#3364)
  Ensure the loading indicator and the refresh button animated at the correct time. (#3363)
  Fix fetching of stats in app wall for some cases when list is maxed (#3360)
  Fix CF-Level Metrics permissions check (#3348)
  About Page Title customization support (#3356)
  Revert loading indicator fixes
  Fix app state to allow start action for offline while updating (#3350)
  Fix display of percent tooltip on metrics chart (#3361)
  Ensure the SCM type is included in store keys (#3353)
  Manually make the date selector date a moment object (#3352)
  Fix filter panel size on services and marketplace pages (#3358)
  Tidy up org spce reducer logic
  Remove full stops from empty list messages - fixes #3340
  Fix search by space name in manage users space roles table - fixes #3329
  ...
  • Loading branch information
Nathan Jones committed Jan 29, 2019
2 parents 1a809f9 + 856e13f commit cea44ab
Show file tree
Hide file tree
Showing 78 changed files with 1,184 additions and 386 deletions.
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,66 @@
# Change Log

## 2.3.0

[Full Changelog](https://github.com/cloudfoundry-incubator/stratos/compare/2.2.0...2.3.0)

This release contains a number of fixes and improvements:

**Fixes:**
- Service instance names should be limited to 50 chars [\#3262](https://github.com/cloudfoundry-incubator/stratos/issues/3262)
- Metrics Charts: CPU usage tooltip should round value [\#3336](https://github.com/cloudfoundry-incubator/stratos/issues/3336)
- Allow apps in "offline while updating" state to be started[\#3332](https://github.com/cloudfoundry-incubator/stratos/issues/3332)
- Manage Users - space table filtering does not work “Search by space name” [\#3329](https://github.com/cloudfoundry-incubator/stratos/issues/3329)
- Make it clearer that you can manage roles for multiple users [\#3250](https://github.com/cloudfoundry-incubator/stratos/issues/3250)
- Register an endpoint arrow misaligned [\#3221](https://github.com/cloudfoundry-incubator/stratos/issues/3221)
- Fix exception when navigating away from the first deploy app step [\#3277](https://github.com/cloudfoundry-incubator/stratos/pull/3277)
- Ensure we don't try to get length of undefined endpoint description [\#3274](https://github.com/cloudfoundry-incubator/stratos/pull/3274)
- Fix null exception after creating a space in an new org [\#3351](https://github.com/cloudfoundry-incubator/stratos/pull/3351)
- Fixes double requests when single cf connected for lists with cf filter [\#3313](https://github.com/cloudfoundry-incubator/stratos/pull/3313)
- Fix auto select of single items in multi filter list [\#3306](https://github.com/cloudfoundry-incubator/stratos/pull/3306)
- Ensure an empty errorResponse gets picked up as a jetstream error [\#3301](https://github.com/cloudfoundry-incubator/stratos/pull/3301)
- Validate entity names locally [\#3296](https://github.com/cloudfoundry-incubator/stratos/pull/3296)
- Application Environment Variables fixes & improvements [\#3286](https://github.com/cloudfoundry-incubator/stratos/pull/3286)
- Hide app vars tab if user is not a space developer [\#3247](https://github.com/cloudfoundry-incubator/stratos/pull/3247)
- Limit card titles to two-lines with ellipsis/fade out [\#3241](https://github.com/cloudfoundry-incubator/stratos/pull/3241)
- Fix CLI info formatting [\#3237](https://github.com/cloudfoundry-incubator/stratos/pull/3237)
- Add Route: Use correct label for submit button [\#3231](https://github.com/cloudfoundry-incubator/stratos/pull/3231)
- Fix for cancel broken on add route [\#3228](https://github.com/cloudfoundry-incubator/stratos/pull/3228)
- Fix display of generic error bar [\#3214](https://github.com/cloudfoundry-incubator/stratos/pull/3214)
- Only show + icon when we have at least one connected CF [\#3211](https://github.com/cloudfoundry-incubator/stratos/pull/3211)
- Cannot deploy application from folder upload [\#3188](https://github.com/cloudfoundry-incubator/stratos/pull/3188)
- Fix issue where only first 100 services were shown in service marketplace [\#3161](https://github.com/cloudfoundry-incubator/stratos/pull/3161)
- Fix marketplace provisioning for asynchronous services [\#3086](https://github.com/cloudfoundry-incubator/stratos/pull/3086)

**Improvements:**
- App Deploy: Add Public GitLab Repository support [\#3239](https://github.com/cloudfoundry-incubator/stratos/pull/3239)
- Add a routes list to the CF tabs, Routes Refactor & Route Bug Fixes [\#3292](https://github.com/cloudfoundry-incubator/stratos/pull/3292)
- Add deployment info for apps deployed via docker & fix info for local/archive apps [\#3291](https://github.com/cloudfoundry-incubator/stratos/pull/3291)
- Add service plan list to service pages [\#3275](https://github.com/cloudfoundry-incubator/stratos/pull/3275)
- Add Org and Space status bar to Org/Space Cards [\#3265](https://github.com/cloudfoundry-incubator/stratos/pull/3265)
- Add service provider name to marketplace service card [\#3268](https://github.com/cloudfoundry-incubator/stratos/pull/3268)
- Add link to dashboard in service instance table [\#3267](https://github.com/cloudfoundry-incubator/stratos/pull/3267)
- Add confirmation dialog to `Restage` app [\#3263](https://github.com/cloudfoundry-incubator/stratos/pull/3263)
- Add support for JSON Schemas when binding services to applications [\#3050](https://github.com/cloudfoundry-incubator/stratos/pull/3050)
- Scalability Improvements: Handle large number of apps in cf dashboards [\#3212](https://github.com/cloudfoundry-incubator/stratos/pull/3212)
- Support prometheus-boshrelease as a metrics endpoint [\#3202](https://github.com/cloudfoundry-incubator/stratos/pull/3202)
- Show better error message on login screen when account locked [\#3235](https://github.com/cloudfoundry-incubator/stratos/pull/3235)
- Helm Chart Service port configuration improvements [\#3264](https://github.com/cloudfoundry-incubator/stratos/pull/3264)
- List Multifilter Improvements [\#3270](https://github.com/cloudfoundry-incubator/stratos/pull/3270)
- Stratos can now be deployed as a CF App using docker image [\#3294](https://github.com/cloudfoundry-incubator/stratos/pull/3294)
- Create stable docker image [\#3307](https://github.com/cloudfoundry-incubator/stratos/issues/3307)
- About Page Title customization support [\#3356](https://github.com/cloudfoundry-incubator/stratos/pull/3356)
- Make the table multi actions more obvious [\#3251](https://github.com/cloudfoundry-incubator/stratos/pull/3251)
- Use SHA256 to compare SSH public key fingerprint [\#3249](https://github.com/cloudfoundry-incubator/stratos/pull/3249)
- Show refresh button for latest modified application lists [\#3213](https://github.com/cloudfoundry-incubator/stratos/pull/3213)
- Improve focus & tabbing [\#3288](https://github.com/cloudfoundry-incubator/stratos/pull/3288)
- Tidy up CLI login info [\#3269](https://github.com/cloudfoundry-incubator/stratos/pull/3269)
- Reduce size of Docker All-in-one image [\#3261](https://github.com/cloudfoundry-incubator/stratos/pull/3261)
- Remove global manage apps link [\#3259](https://github.com/cloudfoundry-incubator/stratos/pull/3259)
- Add user has roles filter to users tables [\#3258](https://github.com/cloudfoundry-incubator/stratos/pull/3258)
- Deploy App: Add notification toast [\#3242](https://github.com/cloudfoundry-incubator/stratos/pull/3242)
- Update app instance cell data when scaling up [\#3133](https://github.com/cloudfoundry-incubator/stratos/pull/3133)

## 2.2.0

[Full Changelog](https://github.com/cloudfoundry-incubator/stratos/compare/2.1.2...2.2.0)
Expand Down
5 changes: 1 addition & 4 deletions deploy/ci/automation/cfallinonetest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ set +e
# Kill the docker container
docker kill $CONTAINER_ID

# Pause the PCF Dev instance for now
echo "Suspending PCF Dev"
cf pcfdev suspend
cf pcfdev status
echo "All done"

# Return exit code form the e2e tests
exit $RET
5 changes: 1 addition & 4 deletions deploy/ci/automation/cfdockercomposetest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ fi
docker-compose -f docker-compose.development.yml down
popd

# Pause the PCF Dev instance for now
echo "Suspending PCF Dev"
cf pcfdev suspend
cf pcfdev status
echo "All done"

# Return exit code form the e2e tests
exit $RET
6 changes: 1 addition & 5 deletions deploy/ci/automation/cfpushtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,7 @@ fi

set +e

# Pause the PCF Dev instance for now
sleep 5
echo "Suspending PCF Dev"
cf pcfdev suspend
cf pcfdev status
echo "All done"

# Return exit code form the e2e tests
exit $RET
29 changes: 4 additions & 25 deletions deploy/ci/automation/cfutils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,37 +60,16 @@ if [ -z "${TEST_CONFIG_URL}" ]; then
exit 1
fi

echo "Checking PCF Dev status"
FULL_STATUS=$(cf pcfdev status)
echo "$FULL_STATUS"

STATUS=$(echo "$FULL_STATUS" | head -n 1)
if [ "$STATUS" == "Not Created" ]; then
echo "PCF DEV not created... starting"
cf pcfdev start -m 10240 -c 4 -s none
echo "Setting PCF DEV up for E2E Tests ..."
"${DIRPATH}/../../tools/init-cf-for-e2e.sh"
# Ensure that PCF Dev's UAA is configured to allow SSO Login
"${DIRPATH}/init-pcfdev-uaa.sh"
else if [ "$STATUS" == "Running" ]; then
echo "PCF DEV is already running"
else if [ "$STATUS" == "Stopped" ]; then
echo "PCF DEV stopped... starting"
cf pcfdev start
else if [ "$STATUS" == "Suspended" ]; then
echo "Resuming PCF DEV"
cf pcfdev resume
else
echo "Stopping and starting PCF DEV"
cf pcfdev stop
cf pcfdev start
fi
fi
fi
if [ "$STATUS" != "Running" ]; then
echo "PCF Dev is not running... aborting"
exit 1
fi

# Wait 5 seconds for PCFDev
sleep 5

cf login -a https://api.local.pcfdev.io --skip-ssl-validation -u admin -p admin -o e2e -s e2e
cf apps

Expand Down
168 changes: 168 additions & 0 deletions deploy/ci/automation/helmtest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
#!/bin/bash

echo "================="
echo "Stratos Helm Test"
echo "================="

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

CYAN="\033[96m"
YELLOW="\033[93m"
RESET="\033[0m"
BOLD="\033[1m"

set -e

# We should be running in the Stratos GitHub folder

NAME=stratos-test
NAMESPACE=stratos-ns
HELM_REPO=https://cloudfoundry-incubator.github.io/stratos
HELM_REPO_NAME=cfstratos

DEV_IMAGE_VERSION=2.0.0-dev

function deleteRelease {
helm delete ${NAME} --purge
kubectl delete namespace ${NAMESPACE}

local DONE="false"
while [ $DONE != "true" ]; do
COUNT=$(kubectl get namespaces | grep ${NAMESPACE} | wc -l)
if [ $COUNT -eq 0 ]; then
DONE="true"
else
echo "Waiting for namespace to terminate..."
sleep 10
fi
done
}

function waitForHelmRelease {
echo "Waiting for Stratos Helm Release to be ready..."
local DONE="false"
while [ $DONE != "true" ]; do
COUNT=$(kubectl get po --namespace=${NAMESPACE} | wc -l)
kubectl get po --namespace=${NAMESPACE}
if [ $COUNT -eq 3 ]; then
READY=$(kubectl get po --namespace=${NAMESPACE} | grep "Running" | wc -l)
if [ $READY -eq 2 ]; then
READY1=$(kubectl get po --namespace=${NAMESPACE} | grep "3/3" | wc -l)
READY2=$(kubectl get po --namespace=${NAMESPACE} | grep "1/1" | wc -l)
READY=$(($READY1 + $READY2))
if [ $READY -eq 2 ]; then
DONE="true"
fi
fi
fi
if [ "$DONE" != "true" ]; then
echo "Waiting for Stratos Helm release to be ready..."
sleep 5
fi
done
}

function checkVersion {
VERS=$1
STATUS=$(helm list ${NAME} | grep ${NAME})
STATUS=$(echo $STATUS | awk '{$1=$1};1')
local HELM_STATUS_REGEX='^([a-z\-]*) ([0-9]*) ([A-Z][a-z][a-z] [A-Z][a-z][a-z] [0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9][0-9][0-9][0-9]) ([A-Z]*) ([0-9\.a-z\-]*) ([0-9\.]*) ([a-z\-]*)'
echo -e $STATUS
if [[ "${STATUS}" =~ ${HELM_STATUS_REGEX} ]]; then
# 6 is version
if [ "${BASH_REMATCH[5]}" != "${VERS}" ]; then
echo "Deployed version number incorrect"
exit 1
fi
else
echo "Helm status parsing failed"
exit 1
fi
}

function log {
MSG=$1
echo -e "${CYAN}${BOLD}${MSG}${RESET}"
}

log "Performing checks..."

# Check that a helm release from a previous run is not still deployed
EXISTING=$(helm list | grep ${NAME} | wc -l)
if [ "$EXISTING" -ne 0 ]; then
echo "Stratos is already deployed - deleting"
deleteRelease
fi

# Check that we have the Stratos Open Source Helm Repository
EXISTING=$(helm repo list | grep ${HELM_REPO_NAME} | wc -l)
if [ "$EXISTING" -ne 1 ]; then
echo "Stratos Helm Repository not added - adding"
helm repo add ${HELM_REPO_NAME} ${HELM_REPO}
fi

# Update repos
helm repo update

# List Helm chart latest version
helm search ${HELM_REPO_NAME}/console

# Install latest version first
log "Installing latest release"
helm install ${HELM_REPO_NAME}/console --name ${NAME} --namespace ${NAMESPACE}

# Wait for the chart to deploy and be ready
waitForHelmRelease

# Try and upgrade to the latest Chart

# Copy the helm chart folder to a temp location
TMP_DIR=${TMP_DIR:-/tmp}
HELM_TMP=${TMP_DIR}/stratos_helm_test
echo $HELM_TMP

rm -rf ${HELM_TMP}
mkdir -p ${HELM_TMP}
cp -R "${STRATOS}/deploy/kubernetes/console" ${HELM_TMP}

pushd ${HELM_TMP} > /dev/null
# Make sure we can package the chart
helm package ${HELM_TMP}/console

CHART_FILE=$(ls ${HELM_TMP}/*.tgz)
CHART_FILE=$(printf %q "${CHART_FILE}")
echo "Chart file path: ${CHART_FILE}"

popd > /dev/null

log "Upgrading using latest Helm Chart"
helm upgrade ${NAME} ${CHART_FILE} --recreate-pods --debug --set consoleVersion=${DEV_IMAGE_VERSION} --set imagePullPolicy=Always

checkVersion console-0.1.0
waitForHelmRelease

# Change just the chart version and try to upgrade
sed -i.bak -e 's/version: 0.1.0/version: 0.2.0/g' ${HELM_TMP}/console/Chart.yaml
sed -i.bak -e 's/appVersion: 0.1.0/appVersion: 0.2.0/g' ${HELM_TMP}/console/Chart.yaml
cat ${HELM_TMP}/console/Chart.yaml

log "Upgrading using latest Helm Chart (checking chart upgrade)"
helm upgrade ${NAME} ${HELM_TMP}/console --recreate-pods --debug --set consoleVersion=${DEV_IMAGE_VERSION} --set imagePullPolicy=Always

waitForHelmRelease
checkVersion console-0.2.0

# Upgrade test passed - try simple install of latest chart
deleteRelease

log "Installing using latest Helm Chart"
helm install ${CHART_FILE} --name ${NAME} --namespace ${NAMESPACE} --set consoleVersion=${DEV_IMAGE_VERSION} --set imagePullPolicy=Always

waitForHelmRelease
checkVersion console-0.1.0

# All okay
deleteRelease

log "All checks completed"
Loading

0 comments on commit cea44ab

Please sign in to comment.