diff options
author | Marcia Ramos <virtua.creative@gmail.com> | 2017-08-15 11:20:11 -0300 |
---|---|---|
committer | Marcia Ramos <virtua.creative@gmail.com> | 2017-08-15 11:20:11 -0300 |
commit | 35c9a75eff464ff7bb0e58c67488a6fa1bdebaaa (patch) | |
tree | b78097fd10cad31f45b8b6613d45960f2872802c /doc/install | |
parent | 0112d13314e1aea350c7dacc02c0f1c527566809 (diff) | |
parent | fe09c25d68a61c5874e9beb0f018c05a4d789d70 (diff) | |
download | gitlab-ce-docs-topic-permissions.tar.gz |
fix conflictdocs-topic-permissions
Diffstat (limited to 'doc/install')
-rw-r--r-- | doc/install/installation.md | 17 | ||||
-rw-r--r-- | doc/install/kubernetes/gitlab_chart.md | 6 | ||||
-rw-r--r-- | doc/install/kubernetes/gitlab_omnibus.md | 171 | ||||
-rw-r--r-- | doc/install/kubernetes/gitlab_runner_chart.md | 4 | ||||
-rw-r--r-- | doc/install/kubernetes/index.md | 13 | ||||
-rw-r--r-- | doc/install/requirements.md | 4 |
6 files changed, 197 insertions, 18 deletions
diff --git a/doc/install/installation.md b/doc/install/installation.md index 22aedb5403e..b14cb2d44c4 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -66,6 +66,9 @@ Install the required packages (needed to compile Ruby and native extensions to R sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libre2-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate python-docutils pkg-config cmake +Ubuntu 14.04 (Trusty Tahr) doesn't have the `libre2-dev` package available, but +you can [install re2 manually](https://github.com/google/re2/wiki/Install). + If you want to use Kerberos for user authentication, then install libkrb5-dev: sudo apt-get install libkrb5-dev @@ -296,9 +299,9 @@ sudo usermod -aG redis git ### Clone the Source # Clone GitLab repository - sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 9-4-stable gitlab + sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 9-5-stable gitlab -**Note:** You can change `9-4-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! +**Note:** You can change `9-5-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! ### Configure It @@ -507,15 +510,17 @@ Check if GitLab and its environment are configured correctly: sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production + +### Compile GetText PO files + + sudo -u git -H bundle exec rake gettext:pack RAILS_ENV=production + sudo -u git -H bundle exec rake gettext:po_to_json RAILS_ENV=production + ### Compile Assets sudo -u git -H yarn install --production --pure-lockfile sudo -u git -H bundle exec rake gitlab:assets:compile RAILS_ENV=production NODE_ENV=production -### Compile GetText PO files - - sudo -u git -H bundle exec rake gettext:compile RAILS_ENV=production - ### Start Your GitLab Instance sudo service gitlab start diff --git a/doc/install/kubernetes/gitlab_chart.md b/doc/install/kubernetes/gitlab_chart.md index d2442a4fbde..0fad181f59e 100644 --- a/doc/install/kubernetes/gitlab_chart.md +++ b/doc/install/kubernetes/gitlab_chart.md @@ -1,7 +1,7 @@ # GitLab Helm Chart -> Officially supported cloud providers are Google Container Service and Azure Container Service. +> These Helm charts are in beta. GitLab is working on a [cloud-native](http://docs.gitlab.com/omnibus/package-information/cloud_native.html) set of [Charts](https://gitlab.com/charts/helm.gitlab.io) which will replace these. -> Officially supported schedulers are Kubernetes and Terraform. +> Officially supported cloud providers are Google Container Service and Azure Container Service. The `gitlab` Helm chart deploys GitLab into your Kubernetes cluster. @@ -207,7 +207,7 @@ its class in an annotation. >**Note:** The Ingress alone doesn't expose GitLab externally. You need to have a Ingress controller setup to do that. Setting up an Ingress controller can be done by installing the `nginx-ingress` helm chart. But be sure -to read the [documentation](https://github.com/kubernetes/charts/blob/master/stable/nginx-ingress/README.md). +to read the [documentation](https://github.com/kubernetes/charts/blob/master/stable/nginx-ingress/README.md). >**Note:** If you would like to use the Registry, you will also need to ensure your Ingress supports a [sufficiently large request size](http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size). diff --git a/doc/install/kubernetes/gitlab_omnibus.md b/doc/install/kubernetes/gitlab_omnibus.md new file mode 100644 index 00000000000..bd3a85272d0 --- /dev/null +++ b/doc/install/kubernetes/gitlab_omnibus.md @@ -0,0 +1,171 @@ +# GitLab-Omnibus Helm Chart +> These Helm charts are in beta. GitLab is working on a [cloud-native](http://docs.gitlab.com/omnibus/package-information/cloud_native.html) set of [Charts](https://gitlab.com/charts/helm.gitlab.io) which will replace these. + +> Officially supported cloud providers are Google Container Service and Azure Container Service. + +This work is based partially on: https://github.com/lwolf/kubernetes-gitlab/. GitLab would like to thank Sergey Nuzhdin for his work. + +## Introduction + +This chart provides an easy way to get started with GitLab, provisioning an installation with nearly all functionality enabled. SSL is automatically provisioned as well via [Let's Encrypt](https://letsencrypt.org/). + +The deployment includes: + +- A [GitLab Omnibus](https://docs.gitlab.com/omnibus/) Pod, including Mattermost, Container Registry, and Prometheus +- An auto-scaling [GitLab Runner](https://docs.gitlab.com/runner/) using the Kubernetes executor +- [Redis](https://github.com/kubernetes/charts/tree/master/stable/redis) +- [PostgreSQL](https://github.com/kubernetes/charts/tree/master/stable/postgresql) +- [NGINX Ingress](https://github.com/kubernetes/charts/tree/master/stable/nginx-ingress) +- Persistent Volume Claims for Data, Registry, Postgres, and Redis + +A video demonstration of GitLab utilizing this chart [is available](https://about.gitlab.com/handbook/sales/demo/). + +Terms: + +- Google Cloud Platform (**GCP**) +- Google Container Engine (**GKE**) +- Azure Container Service (**ACS**) +- Kubernetes (**k8s**) + +## Prerequisites + +- _At least_ 4 GB of RAM available on your cluster, in chunks of 1 GB. 41GB of storage and 2 CPU are also required. +- Kubernetes 1.4+ with Beta APIs enabled +- [Persistent Volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) provisioner support in the underlying infrastructure +- An [external IP address](#networking-prerequisites) +- A [wildcard DNS entry](#networking-prerequisites), which resolves to the external IP address +- The `kubectl` CLI installed locally and authenticated for the cluster +- The Helm Client installed locally +- The Helm Server (Tiller) already installed and running in the cluster, by running `helm init` +- The GitLab Helm Repo [added to your Helm Client](index.md#add-the-gitlab-helm-repository) + +### Networking Prerequisites + +This chart configures a GitLab server and Kubernetes cluster which can support dynamic [Review Apps](https://docs.gitlab.com/ee/ci/review_apps/index.html), as well as services like the integrated [Container Registry](https://docs.gitlab.com/ee/user/project/container_registry.html) and [Mattermost](https://docs.gitlab.com/omnibus/gitlab-mattermost/). + +To support the GitLab services and dynamic environments, a wildcard DNS entry is required which resolves to the external Load Balancer IP. + +To provision an external IP on GCP and Azure, simply request a new address from the Networking section. Ensure that the region matches the region your container cluster is created in. Note, it is important that the IP is not assigned at this point in time. It will be automatically assigned once the Helm chart is installed, and assigned to the Load Balancer. + +Now that an external IP address has been allocated, ensure that the wildcard DNS entry you would like to use resolves to this IP. Please consult the documentation for your DNS service for more information on creating DNS records. + +## Configuring and Installing GitLab + +For most installations, only two parameters are required: +- `baseIP`: the desired [external IP address](#networking-prerequisites) +- `baseDomain`: the [base domain](#networking-prerequisites) with the wildcard host entry resolving to the `baseIP`. For example, `mycompany.io`. + +Other common configuration options: +- `gitlab`: Choose the [desired edition](https://about.gitlab.com/products), either `ee` or `ce`. `ce` is the default. +- `gitlabEELicense`: For Enterprise Edition, the [license](https://docs.gitlab.com/ee/user/admin_area/license.html) can be installed directly via the Chart +- `provider`: Optimizes the deployment for a cloud provider. The default is `gke` for GCP, with `acs` also supported for Azure. +- `legoEmail`: Email address to use when requesting new SSL certificates from Let's Encrypt + +For additional configuration options, consult the [values.yaml](https://gitlab.com/charts/charts.gitlab.io/blob/master/charts/gitlab-omnibus/values.yaml). + +These settings can either be passed directly on the command line: +```bash +helm install --name gitlab --set baseDomain=gitlab.io,baseIP=1.1.1.1,gitlab=ee,gitlabEELicense=$LICENSE,legoEmail=email@gitlab.com gitlab/gitlab-omnibus +``` + +or within a YAML file: +```bash +helm install --name gitlab -f values.yaml gitlab/gitlab-omnibus +``` + +> **Note:** +If you are using a machine type with support for less than 4 attached disks, like an Azure trial, you should disable dedicated storage for [Postgres and Redis](#persistent-storage). + +### Choosing a different GitLab release version + +The version of GitLab installed is based on the `gitlab` setting (see [section](#choosing-gitlab-edition) above), and +the value of the corresponding helm setting: `gitlabCEImage` or `gitabEEImage`. + +```yaml +gitlab: CE +gitlabCEImage: gitlab/gitlab-ce:9.1.2-ce.0 +gitlabEEImage: gitlab/gitlab-ee:9.1.2-ee.0 +``` + +The different images can be found in the [gitlab-ce](https://hub.docker.com/r/gitlab/gitlab-ce/tags/) and [gitlab-ee](https://hub.docker.com/r/gitlab/gitlab-ee/tags/) +repositories on Docker Hub. + +> **Note:** +There is no guarantee that other release versions of GitLab, other than what are +used by default in the chart, will be supported by a chart install. + +### Persistent storage + +By default, persistent storage is enabled for GitLab and the charts it depends +on (Redis and PostgreSQL). + +Components can have their claim size set from your `values.yaml`, along with whether to provision separate storage for Postgres and Redis. + +Basic configuration: + +```yaml +redisImage: redis:3.2.10 +redisDedicatedStorage: true +redisStorageSize: 5Gi +postgresImage: postgres:9.6.3 +# If you disable postgresDedicatedStorage, you should consider bumping up gitlabRailsStorageSize +postgresDedicatedStorage: true +postgresStorageSize: 30Gi +gitlabRailsStorageSize: 30Gi +gitlabRegistryStorageSize: 30Gi +gitlabConfigStorageSize: 1Gi +``` + +### Routing and SSL + +Ingress routing and SSL are automatically configured within this Chart. An NGINX ingress is provisioned and configured, and will route traffic to any service. SSL certificates are automatically created and configured by [kube-lego](https://github.com/kubernetes/charts/tree/master/stable/kube-lego). + +> **Note:** +Let's Encrypt limits a single TLD to five certificate requests within a single week. This means that common DNS wildcard services like [xip.io](http://xip.io) and [nip.io](http://nip.io) are unlikely to work. + +## Installing GitLab using the Helm Chart +> You may see a temporary error message `SchedulerPredicates failed due to PersistentVolumeClaim is not bound` while storage provisions. Once the storage provisions, the pods will automatically restart. This may take a couple minutes depending on your cloud provider. If the error persists, please review the [prerequisites](#prerequisites) to ensure you have enough RAM, CPU, and storage. + +Once you have reviewed the [configuration settings](#configuring-and-installing-gitlab) and [added the Helm repository](index.md#add-the-gitlab-helm-repository), you can install the chart. We recommending saving your configuration options in a `values.yaml` file for easier upgrades in the future. + +For example: +```bash +helm install --name gitlab -f values.yaml gitlab/gitlab-omnibus +``` + +or passing them on the command line: +```bash +helm install --name gitlab --set baseDomain=gitlab.io,baseIP=1.1.1.1,gitlab=ee,gitlabEELicense=$LICENSE,legoEmail=email@gitlab.com gitlab/gitlab-omnibus +``` + +## Updating GitLab using the Helm Chart + +Once your GitLab Chart is installed, configuration changes and chart updates +should we done using `helm upgrade` + +```bash +helm upgrade -f <CONFIG_VALUES_FILE> <RELEASE-NAME> gitlab/gitlab +``` + +where: + +- `<CONFIG_VALUES_FILE>` is the path to values file containing your custom + [configuration] (#configuring-and-installing-gitlab). +- `<RELEASE-NAME>` is the name you gave the chart when installing it. + In the [Install section](#installing-gitlab-using-the-helm-chart) we called it `gitlab`. + +## Uninstalling GitLab using the Helm Chart + +To uninstall the GitLab Chart, run the following: + +```bash +helm delete <RELEASE-NAME> +``` + +where: + +- `<RELEASE-NAME>` is the name you gave the chart when installing it. + In the [Install section](#installing) we called it `gitlab`. + +[kube-srv]: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services---service-types +[storageclass]: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#storageclasses diff --git a/doc/install/kubernetes/gitlab_runner_chart.md b/doc/install/kubernetes/gitlab_runner_chart.md index 515b2841d08..b0fe91d6337 100644 --- a/doc/install/kubernetes/gitlab_runner_chart.md +++ b/doc/install/kubernetes/gitlab_runner_chart.md @@ -1,7 +1,7 @@ # GitLab Runner Helm Chart -> Officially supported cloud providers are Google Container Service and Azure Container Service. +> These Helm charts are in beta. GitLab is working on a [cloud-native](http://docs.gitlab.com/omnibus/package-information/cloud_native.html) set of [Charts](https://gitlab.com/charts/helm.gitlab.io) which will replace these. -> Officially supported schedulers are Kubernetes and Terraform. +> Officially supported cloud providers are Google Container Service and Azure Container Service. The `gitlab-runner` Helm chart deploys a GitLab Runner instance into your Kubernetes cluster. diff --git a/doc/install/kubernetes/index.md b/doc/install/kubernetes/index.md index 5ea08869a9b..3608aa6b2d6 100644 --- a/doc/install/kubernetes/index.md +++ b/doc/install/kubernetes/index.md @@ -1,7 +1,7 @@ # Installing GitLab on Kubernetes -> Officially supported cloud providers are Google Container Service and Azure Container Service. +> These Helm charts are in beta. GitLab is working on a [cloud-native](http://docs.gitlab.com/omnibus/package-information/cloud_native.html) set of [Charts](https://gitlab.com/charts/helm.gitlab.io) which will replace these. -> Officially supported schedulers are Kubernetes, Terraform and Tectonic. +> Officially supported cloud providers are Google Container Service and Azure Container Service. The easiest method to deploy GitLab in [Kubernetes](https://kubernetes.io/) is to take advantage of the official GitLab Helm charts. [Helm] is a package @@ -35,12 +35,11 @@ helm init ## Using the GitLab Helm Charts -GitLab makes available two Helm Charts, one for the GitLab server and another -for the Runner. More detailed information on installing and configuring each -Chart can be found below: +GitLab makes available three Helm Charts: an easy to use bundled chart, and a specific chart for GitLab itself and the Runner. -- [Install GitLab](gitlab_chart.md) -- [Install GitLab Runner](gitlab_runner_chart.md) +- [gitlab-omnibus](gitlab_omnibus.md): The easiest way to get started. Includes everything needed to run GitLab, including: a Runner, Container Registry, automatic SSL, and an Ingress. +- [gitlab](gitlab_chart.md): Just the GitLab service, with optional Postgres and Redis. +- [gitlab-runner](gitlab_runner_chart.md): GitLab Runner, to process CI jobs. [chart]: https://github.com/kubernetes/charts [helm-quick]: https://github.com/kubernetes/helm/blob/master/docs/quickstart.md diff --git a/doc/install/requirements.md b/doc/install/requirements.md index 141df55f6bc..175dfc62096 100644 --- a/doc/install/requirements.md +++ b/doc/install/requirements.md @@ -104,6 +104,10 @@ features of GitLab work with MySQL/MariaDB: See [issue #30472][30472] for more information. 1. GitLab Geo does [not support MySQL](https://docs.gitlab.com/ee/gitlab-geo/database.html#mysql-replication). 1. [Zero downtime migrations][zero] do not work with MySQL +1. GitLab [optimizes the loading of dashboard events](https://gitlab.com/gitlab-org/gitlab-ce/issues/31806) using [PostgreSQL LATERAL JOINs](https://blog.heapanalytics.com/postgresqls-powerful-new-join-type-lateral/). +1. In general, SQL optimized for PostgreSQL may run much slower in MySQL due to + differences in query planners. For example, subqueries that work well in PostgreSQL + may not be [performant in MySQL](https://dev.mysql.com/doc/refman/5.7/en/optimizing-subqueries.html) 1. We expect this list to grow over time. Existing users using GitLab with MySQL/MariaDB are advised to |