diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-10 07:53:40 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-10 07:53:40 +0000 |
commit | cfc792b9ca064990e6540cb742e80529ea669a81 (patch) | |
tree | 147cd4256319990cebbc02fe8e4fbbbe06f5720a /doc/development | |
parent | 93c6764dacd4c605027ef1cd367d3aebe420b223 (diff) | |
download | gitlab-ce-cfc792b9ca064990e6540cb742e80529ea669a81.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development')
-rw-r--r-- | doc/development/packages.md | 7 | ||||
-rw-r--r-- | doc/development/testing_guide/review_apps.md | 99 |
2 files changed, 83 insertions, 23 deletions
diff --git a/doc/development/packages.md b/doc/development/packages.md index b2045c699a3..7ae3cd53e66 100644 --- a/doc/development/packages.md +++ b/doc/development/packages.md @@ -23,19 +23,12 @@ The goal of the Package group is to build a set of features that, within three y | [Bower](https://gitlab.com/gitlab-org/gitlab/issues/36888) | Boost your front end development by hosting your own Bower components. | | [Chef](https://gitlab.com/gitlab-org/gitlab/issues/36889) | Configuration management with Chef using all the benefits of a repository manager. | | [CocoaPods](https://gitlab.com/gitlab-org/gitlab/issues/36890) | Speed up development with Xcode and CocoaPods. | -| [Conan](https://docs.gitlab.com/ee/user/packages/conan_repository/) *12.6+* | A standardized way to share and version control C/C++ libraries across projects. | | [Conda](https://gitlab.com/gitlab-org/gitlab/issues/36891) | Secure and private local Conda repositories. | | [CRAN](https://gitlab.com/gitlab-org/gitlab/issues/36892) | Deploy and resolve CRAN packages for the R language. | | [Debian](https://gitlab.com/gitlab-org/gitlab/issues/5835) | Host and provision Debian packages. | -| [Docker](https://docs.gitlab.com/ee/user/packages/container_registry/) *8.8+* | Host your own secure private Docker registries and proxy external Docker registries such as Docker Hub. | | [Go](https://gitlab.com/gitlab-org/gitlab/issues/9773) | Resolve Go dependencies from and publish your Go packages to GitLab. | -| [Helm](https://gitlab.com/gitlab-org/gitlab/issues/18997) | Manage your Helm Charts in GitLab and gain control over deployments to your Kubernetes cluster. | -| [Maven](https://docs.gitlab.com/ee/user/packages/maven_repository/index.html) *11.3+*| The GitLab Maven Repository enables every project in GitLab to have its own space to store Maven packages. | -| [npm](https://docs.gitlab.com/ee/user/packages/npm_registry/index.html) *11.7+* | Host your own node.js packages. | -| [NuGet](https://gitlab.com/gitlab-org/gitlab/issues/20050) *Planned for 12.7*| Host NuGet packages in GitLab, and pull libraries into your various Visual Studio .NET applications. | | [Opkg](https://gitlab.com/gitlab-org/gitlab/issues/36894) | Optimize your work with OpenWrt using Opkg repositories. | | [P2](https://gitlab.com/gitlab-org/gitlab/issues/36895) | Host all your Eclipse plugins in your own GitLab P2 repository. | -| [PHP Composer](https://gitlab.com/gitlab-org/gitlab/issues/15886) | Provision Composer packages from GitLab and access Packagist and other remote Composer metadata repositories. | | [Puppet](https://gitlab.com/gitlab-org/gitlab/issues/36897) | Configuration management meets repository management with Puppet repositories. | | [PyPi](https://gitlab.com/gitlab-org/gitlab/issues/10483) | Host PyPi distributions. | | [RPM](https://gitlab.com/gitlab-org/gitlab/issues/5932) | Distribute RPMs directly from GitLab. | diff --git a/doc/development/testing_guide/review_apps.md b/doc/development/testing_guide/review_apps.md index eddfb561748..b06ea41d91f 100644 --- a/doc/development/testing_guide/review_apps.md +++ b/doc/development/testing_guide/review_apps.md @@ -186,22 +186,89 @@ secure note named `gitlab-{ce,ee} Review App's root password`. `review-qa-raise-e-12chm0-migrations.1-nqwtx`. 1. Click on the `Container logs` link. -### Diagnosing unhealthy review-app releases - -If [Review App Stability](https://gitlab.com/gitlab-org/quality/team-tasks/issues/93) dips this may be a signal -that the `review-apps-ce/ee` cluster is unhealthy. Leading indicators may be healthcheck failures leading to restarts or majority failure for Review App deployments. - -The following items may help diagnose this: - -- [Review Apps Health dashboard](https://app.google.stackdriver.com/dashboards/6798952013815386466?project=gitlab-review-apps&timeDomain=1d) - - Aids in identifying load spikes on the cluster, and if nodes are problematic or the entire cluster is trending towards unhealthy. -- `kubectl top nodes | sort --key 3 --numeric` - can identify if node spikes are common or load on specific nodes which may get rebalanced by the Kubernetes scheduler. -- `kubectl top pods | sort --key 2 --numeric` - -- [K9s] - K9s is a powerful command line dashboard which allows you to filter by labels. This can help identify trends with apps exceeding the [review-app resource requests](https://gitlab.com/gitlab-org/gitlab/blob/master/scripts/review_apps/base-config.yaml). Kubernetes will schedule pods to nodes based on resource requests and allow for CPU usage up to the limits. - - In K9s you can sort or add filters by typing the `/` character - - `-lrelease=<review-app-slug>` - filters down to all pods for a release. This aids in determining what is having issues in a single deployment - - `-lapp=<app>` - filters down to all pods for a specific app. This aids in determining resource usage by app. - - You can scroll to a Kubernetes resource and hit `d`(describe), `s`(shell), `l`(logs) for a deeper inspection +## Diagnosing unhealthy Review App releases + +If [Review App Stability](https://app.periscopedata.com/app/gitlab/496118/Engineering-Productivity-Sandbox?widget=6690556&udv=785399) +dips this may be a signal that the `review-apps-ce/ee` cluster is unhealthy. +Leading indicators may be healthcheck failures leading to restarts or majority failure for Review App deployments. + +The [Review Apps Overview dashboard](https://app.google.stackdriver.com/dashboards/6798952013815386466?project=gitlab-review-apps&timeDomain=1d) +aids in identifying load spikes on the cluster, and if nodes are problematic or the entire cluster is trending towards unhealthy. + +### Node count is always increasing (i.e. never stabilizing or decreasing) + +**Potential cause:** + +That could be a sign that the [`schedule:review-cleanup`][gitlab-ci-yml] job is +failing to cleanup stale Review Apps and Kubernetes resources. + +**Where to look for further debugging:** + +Look at the latest `schedule:review-cleanup` job log, and identify look for any +unexpected failure. + +### p99 CPU utilization is at 100% for most of the nodes and/or many components + +**Potential cause:** + +This could be a sign that Helm is failing to deploy Review Apps. When Helm has a +lot of `FAILED` releases, it seems that the CPU utilization is increasing, probably +due to Helm or Kubernetes trying to recreate the components. + +**Where to look for further debugging:** + +Look at a recent `review-deploy` job log, and at the Tiller logs. + +**Useful commands:** + +```shell +# Identify if node spikes are common or load on specific nodes which may get rebalanced by the Kubernetes scheduler +› kubectl top nodes | sort --key 3 --numeric + +# Identify pods under heavy CPU load +› kubectl top pods | sort --key 2 --numeric +``` + +### The `logging/user/events/FailedMount` chart is going up + +**Potential cause:** + +This could be a sign that there are too many stale secrets and/or config maps. + +**Where to look for further debugging:** + +Look at [the list of Configurations](https://console.cloud.google.com/kubernetes/config?project=gitlab-review-apps) +or `kubectl get secret,cm --sort-by='{.metadata.creationTimestamp}' | grep 'review-'`. + +Any secrets or config maps older than 5 days are suspect and should be deleted. + +**Useful commands:** + +``` +# List secrets and config maps ordered by created date +› kubectl get secret,cm --sort-by='{.metadata.creationTimestamp}' | grep 'review-' + +# Delete all secrets that are 5 to 9 days old +› kubectl get secret --sort-by='{.metadata.creationTimestamp}' | grep '^review-' | grep '[5-9]d$' | cut -d' ' -f1 | xargs kubectl delete secret + +# Delete all secrets that are 10 to 99 days old +› kubectl get secret --sort-by='{.metadata.creationTimestamp}' | grep '^review-' | grep '[1-9][0-9]d$' | cut -d' ' -f1 | xargs kubectl delete secret + +# Delete all config maps that are 5 to 9 days old +› kubectl get cm --sort-by='{.metadata.creationTimestamp}' | grep 'review-' | grep -v 'dns-gitlab-review-app' | grep '[5-9]d$' | cut -d' ' -f1 | xargs kubectl delete cm + +# Delete all config maps that are 10 to 99 days old +› kubectl get cm --sort-by='{.metadata.creationTimestamp}' | grep 'review-' | grep -v 'dns-gitlab-review-app' | grep '[1-9][0-9]d$' | cut -d' ' -f1 | xargs kubectl delete cm +``` + +### Using K9s + +[K9s] is a powerful command line dashboard which allows you to filter by labels. This can help identify trends with apps exceeding the [review-app resource requests](https://gitlab.com/gitlab-org/gitlab/blob/master/scripts/review_apps/base-config.yaml). Kubernetes will schedule pods to nodes based on resource requests and allow for CPU usage up to the limits. + +- In K9s you can sort or add filters by typing the `/` character + - `-lrelease=<review-app-slug>` - filters down to all pods for a release. This aids in determining what is having issues in a single deployment + - `-lapp=<app>` - filters down to all pods for a specific app. This aids in determining resource usage by app. +- You can scroll to a Kubernetes resource and hit `d`(describe), `s`(shell), `l`(logs) for a deeper inspection ![K9s](img/k9s.png) |