From a4aaac0071e7a77cfba7194a738e552fa0f0dae8 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 14 May 2019 13:20:59 -0500 Subject: [PATCH 1/2] Add some additional tips for debugging These were helpful when I was trying to get gitlab-monitor and Grafana working. --- doc/development/index.md | 72 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/doc/development/index.md b/doc/development/index.md index 2527ae0d34..992d1cc5fd 100644 --- a/doc/development/index.md +++ b/doc/development/index.md @@ -266,3 +266,75 @@ Please keep in mind that Registry uses the external domain name of Minio service encounter an error when using internal domain names, e.g. with custom TLDs for development environment. The common symptom is that you can login to the Registry but you can't push or pull images. This is generally because the Registry container(s) can not resolve the Minio domain name and find the correct endpoint (you can see the errors in container logs). + +## Debugging Tips + +The [Kubernetes +documentation](https://kubernetes.io/docs/tasks/debug-application-cluster) +has some good tips on how to debug various components: + +* [Init containers](https://kubernetes.io/docs/tasks/debug-application-cluster/debug-init-containers/) +* [Pods and ReplicationControllers](https://kubernetes.io/docs/tasks/debug-application-cluster/debug-pod-replication-controller/) +* [Services](https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/) + +### task-runner container + +Most containers do not have any system tools to run Rails console or use +other system debug tools, but there is a separate `task-runner` +container that does have these. For example, you can find the +name of the pod via: + + + ``` + kubectl get pods -l app=task-runner + ``` + + Sample output: + + ``` + NAME READY STATUS RESTARTS AGE + gitlab-task-runner-5864dcc4c5-wvg2h 1/1 Running 0 25h + ``` + +1. Enter the container: + + ``` + kubectl exec -it gitlab-task-runner-5864dcc4c5-wvg2h /bin/bash + ``` + +1. From here, you can run a number of commands. For example: + + * gitlab-rake console + * curl + * ping + * etc. + +### Installing the Helm Chart without SSL + +By default, the GitLab Helm Chart will try to use SSL and enable HTTPS where +it can. You can disable this behavior by disabling the cert manager by +specifying the `--set global.ingress.configureCertmanager=false` argument. +For example: + +``` +helm upgrade --namespace gitlab --install gitlab . \ + --set global.hosts.domain=35.202.200.217.xip.io \ + --set global.hosts.externalIP=35.202.200.217 \ + --set certmanager.install=false \ + --set global.ingress.configureCertmanager=false +``` + +### How do I get the initial GitLab root password? + +There are number of ways to do this. The first is to look at the Kubernetes secret: + +``` +kubectl get secret gitlab-gitlab-initial-root-password -ojsonpath='{.data.password}' | base64 --decode ; echo +``` + +If you have doubts whether that is using that value, you can also check the logs of the `gitlab-migration` container +if the root password were set: + +``` +kubectl logs -l app=migration +``` -- GitLab From 4311572a6d87eb77bfc15b3b60b641fd5dc16431 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 14 May 2019 13:22:44 -0500 Subject: [PATCH 2/2] Fix formatting --- doc/development/index.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/doc/development/index.md b/doc/development/index.md index 992d1cc5fd..70a08cf6ec 100644 --- a/doc/development/index.md +++ b/doc/development/index.md @@ -284,17 +284,16 @@ other system debug tools, but there is a separate `task-runner` container that does have these. For example, you can find the name of the pod via: +``` +kubectl get pods -l app=task-runner +``` - ``` - kubectl get pods -l app=task-runner - ``` - - Sample output: +Sample output: - ``` - NAME READY STATUS RESTARTS AGE - gitlab-task-runner-5864dcc4c5-wvg2h 1/1 Running 0 25h - ``` +``` +NAME READY STATUS RESTARTS AGE +gitlab-task-runner-5864dcc4c5-wvg2h 1/1 Running 0 25h +``` 1. Enter the container: -- GitLab