Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-09-14terraform: Rename generic "playbook.yml"Patrick Steinhardt
We're about to introduce a second playbook for cluster creation, so let's rename the generic "playbook.yml" to "configure.yml".
2020-09-14terraform: Convert terraform wrappers to use shellPatrick Steinhardt
Both `destroy-demo-cluster` and `print-info` are simple wrappers around terraform. Using Ruby for that is overkill. Let's convert both scripts to shell onliners.
2020-09-04Add omnibus gitaly to terraform setupJames Fargher
Setup the omnibus gitaly as a storage "internal"
2020-08-20Makefile: Inline check-mod-tidyPatrick Steinhardt
With PATH now containing a broken version of Git by design, we need to adjust all callers of Git to use the real executable instead of the broken one. The script `check-mod-tidy` is one of those which needs adjusting. Given it's such a tiny script, let's just inline it into our Makefile and have it use the `${GIT}` variable.
2020-08-05terraform: Fix fetching modulesPatrick Steinhardt
Starting with commit 36437f18 (PgBouncer deployment with terraform, 2020-07-29), we've introduced a new dependency on the pgbouncer module for Terraform. To download the module, the commit in question added a call to `terraform get`, which causes us to download the module. But as we're only executing `terraform init` in case no `.terraform` directory exists and `terraform get` will unconditionally create that directory, the result is that `terraform init` will never be executed. Fix the issue by just removing the call to `terraform get`. Initialization will fetch the pgbouncer module anyway, so there's no need to do it explicitly.
2020-08-05terraform: Create Ansible playbook to roll out configurationPatrick Steinhardt
Right now, our Terraform scripts only handle creation of machines in GCP, but not their respective configuration. As it's a task we're doing rather frequently which takes some time, this commit creates an Ansible playbook which automates this task. On creation of the cluster, our scripts now automatically generate a `hosts.ini` file containing all necessary connection information. With this file, the admin may now run `./configure-demo-cluster`, which will invoke Ansible and automatically generate and apply configuration for each of the nodes, restarting services as required. The task can be run repeatedly in order to update configuration on the target nodes.
2020-07-30Merge branch 'ps-pgbouncer-terraform' into 'master'Paul Okstad
PgBouncer deployment with terraform Closes #2975 See merge request gitlab-org/gitaly!2418
2020-07-30PgBouncer deployment with terraformPavlo Strokov
Resulting name of the IP for the SQL connection renamed to praefect_pgbouncer_ip. Closes: https://gitlab.com/gitlab-org/gitaly/-/issues/2975
2020-07-30PgBouncer deployment with terraformPavlo Strokov
Assignment of the dedicated IP address to PgBouncer instance in order to narrow the set of public IP addresses allowed to connect to PostgreSQL instance. Closes: https://gitlab.com/gitlab-org/gitaly/-/issues/2975
2020-07-29PgBouncer deployment with terraformPavlo Strokov
Terraform requires a new module to be installed: pgbouncer In order to install all required modules automatically the `terraform get` command added to main script. The command installs all missed dependencies recursively. Closes: https://gitlab.com/gitlab-org/gitaly/-/issues/2975
2020-07-28Update of PostgeSQL instance versionPavlo Strokov
As the target PostgeSQL version currently is 11 we should use this version for tests and demo.
2020-07-24PgBouncer deployment with terraformPavlo Strokov
In order to verify usage of PgBouncer in front of Postgres database PgBouncer included into terraform deployment. It uses separate machine with internal IP that is accessible to Praefect instances. Cloud SQL authorized networks changed to '0.0.0.0/0' because it is not possible to use PgBouncer IP for it, as PgBouncer requires IP of Cloud SQL instance in setup (circular dependency). The output of 'praefect_postgresql_ip' is a private IP of the PgBouncer instance that should be used instead of a public Cloud SQL instance to proxy SQL requests. Closes: https://gitlab.com/gitlab-org/gitaly/-/issues/2975
2020-07-22Remove Praefect primary from configPaul Okstad
2020-06-24Set GitLab root password during installJames Ramsay
2020-06-18Makefile: Get rid of templatingPatrick Steinhardt
We currently use templating to generate the Makefile, which causes us to split up build information across a set of multiple different files. The initial motivation for this was two-fold, where one reason was to make the Makefile more predictable and the second was performance. The downside of generating Makefiles is added complexity, though, and that reading Makefiles got kind of awkward because of huge generated lines. This commit restructures our Makefile in order to get rid of the templating scheme in order to unify build information into a single place again. To make them predictable, the new Makefile makes strong use of variables that hold various information about paths. Furthermore, to not pay a performance penalty, the dynamic parts of discovering packages, source files and commands was moved into callable functions that only get executed when the current target actually requires that kind of information. The resulting Makefile seems easier to manage in the long term and doesn't seem to perform any worse than the generated Makefile. It'll also make future refactoring and improvements a lot easier to implement.
2020-06-17Only use version tags for version stringPaul Okstad
2020-06-16Fix default Git version in makegen.goChristian Couder
2020-06-02Merge branch 'pks-build-git-fixes' into 'master'Zeger-Jan van de Weg
Fix build-git target on musl-based systems See merge request gitlab-org/gitaly!2171
2020-06-02Upgrade to Git 2.27Christian Couder
- update Docker base image - update CI testing matrix Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/2829
2020-06-01Dependency inject gitlab apiJohn Cai
2020-05-29Check auth before limit handlerJohn Cai
2020-05-15Merge branch 'jc-support-bindir-in-makefile' into 'master'Patrick Steinhardt
Support bindir in Makefile Closes gitlab#213467 See merge request gitlab-org/gitaly!2167
2020-05-14Support bindir in MakefileJohn Cai
2020-05-14Praefect: primary election must support multi virtual storagesPavlo Strokov
Election of the new primary node must take into account relation of the node to the proper virtual storage. To speed up SQL operations index were introduced based on 'virtual_storage' and 'target_node_storage' values. As an addition down migration was fixed to remove new type.
2020-05-14makegen: Fix building Git on musl-based platformsPatrick Steinhardt
By default, Git will assume that the regex implementation of libc support the `REG_STARTEND` feature. As this feature started out as a non-standard glibc extension, it's not available to all systems. Most notably, musl libc doesn't implement it as it tries to be as strictly POSIX compliant as it makes sense. Fix the issue by amending NO_REGEX=YesPlease to Git's build options. This will cause it to use its own embedded regex implementation which obviously supports this feature.
2020-05-14makegen: Avoid hardcoding number of make jobs when building gitPatrick Steinhardt
We currently hardcode the number of jobs to "8", which may be optimal on some platforms, but definitely not on most. Some systems with a smaller amount of CPU cores may thus be overloaded while others with a lot more cores will be underloaded. Let's improve this by using the number of cores available to the system, plus one.
2020-05-07Use bundler for version management for grpc_toolsZeger-Jan van de Weg
The `grpc_tools` gem was installed using a `gem` invocation, which lead to different versions of the same gem being used among developers. By using the Gemfile for version management this should be resolved. The gem is added as development dependency, and as such will not make its way to production. To support using bundler, `bundle exec` had to be used in the support script, which required the execution context to be changed to the ruby sub-directory. `Dir.chdir` is not thread safe, but currently I think it's fair to assume this is not required.
2020-05-04Merge branch 'zj-default-git-version' into 'master'Zeger-Jan van de Weg
git: Default to latest supported version to build See merge request gitlab-org/gitaly!2131
2020-05-01Merge branch 'terraform-multiple-prafects' into 'master'Paul Okstad
Add load balancer and multiple Praefect nodes Closes #2639 See merge request gitlab-org/gitaly!2098
2020-04-30git: Default to latest supported version to buildZeger-Jan van de Weg
Gitaly's Makefile can build Git, and currently defaults to master. For local development this is inconvenient given there might be differences which could lead to issues which are hard to debug. The downside of this change, is that it locks the version, and requires the Gitaly team to bump this version along with other Git version upgrades.
2020-04-29Merge branch 'add-build-git-target' into 'master'Zeger-Jan van de Weg
Add build-git target to Makefile See merge request gitlab-org/gitaly!1532
2020-04-29Add download-git target to MakefileChristian Couder
The new 'download-git' target can be used like this: $ make GIT_REV=test-next download-git to download a tarball from: https://gitlab.com/gitlab-org/gitlab-git/-/jobs/artifacts/test-next/raw/git_full_bins.tgz?job=build
2020-04-24docs: terraform provisions the demo databaseZeger-Jan van de Weg
In 86e90ec2711025a69ab3bb696783de324fdf9b51, support was added for PG provisioning through terraform. The readme did still include the manual steps however.
2020-04-23Merge branch 'po-junit-report-failures' into 'master'Sami Hiltunen
JUnit reports should be captured on test failures See merge request gitlab-org/gitaly!2087
2020-04-23Add load balancer and multiple Praefect nodesJames Ramsay
Praefect now stores state in SQL so that multiple nodes can be run behind a load balancer. This updates the Terraform configuration to reflect this.
2020-04-23Revert "Merge branch 'update-grpc-tools' into 'master'"Patrick Steinhardt
The update to gRPC v1.27.0 introduced issues with various setups, most notably with CentOS 6 due to an old compiler toolchain and musl-based Linux distributions like Alpine Linux because of non-POSIX-compliant use of symbols. As a result, the equivalent update in the GitLab repository was reverted already. Let's do the same for Gitaly to fix these issues. This reverts commit 998db420d6b68b81e1ac9974854a700e7985db91, reversing changes made to 9f35085fd2f69bf0a892746037da7e2c9511c1f6.
2020-04-22JUnit even on test failuresPaul Okstad
2020-04-14Merge branch 'sh-add-multiple-praefects' into 'master'Jacob Vosmaer
Add support for multiple Praefects in Terraform config See merge request gitlab-org/gitaly!1993
2020-04-09Add SQL-based election strategyStan Hu
This commit adds the following strategy to enable redundant Praefect nodes to run simultaenously: 1. Every Praefect node periodically (every second) performs a health check RPC with a Gitaly node. 2. For each node, Praefect updates a row in a new table (`node_status`) with the following information: a. The name of the Praefect instance (`praefect_name`) b. The name of the virtual storage name (`shard_name`) c. The name of the Gitaly storage name (`storage_name`) d. The timestamp of the last time Praefect tried to reach that node (`last_contact_attempt_at`) e. The timestamp of the last successful health check (`last_seen_active_at`) 3. Periodically every Praefect node does a `SELECT` from `node_status` to determine **healthy nodes**. A healthy node is defined by: a. A node that has a recent successful error check (e.g. one in the last 10 s). b. A majority of the available Praefect nodes have entries that match the two above. 4. To determine the majority, we use a lightweight service discovery protocol: a Praefect node is deemed a voting member if the `praefect_name` has a recent `last_contact_attempt_at` in the `node_status` table. The name is derived from a combination of the hostname and listening port/socket. 5. The primary of each shard is listed in the `shard_primaries`. If the current primary is in the healthy node list, then no election needs to be done. 6. Otherwise, if there is no primary or it is unhealthy, any Praefect node can elect a new primary by choosing candidate from the healthy node list and inserting a row into the table. Closes https://gitlab.com/gitlab-org/gitaly/-/issues/2547
2020-04-09Add support for multiple Praefects in Terraform configStan Hu
This will help test multiple Praefect nodes to test SQL leader elections. Currently `count` is set to 1; it can be increased to 3 or more.
2020-04-09Merge branch 'ps-lint-enhancement' into 'master'Pavlo Strokov
lint (static code analysis) enhancements See merge request gitlab-org/gitaly!2033
2020-04-09lint (static code analysis) enhancementsPavlo Strokov
lint must use Go1.13 as it is highest supported version. Fix deprecated use of `grpc_logrus.Extract`. New linters introduced and replacement of old ones in favor of new ones with same purpose. Fix of new linter errors.
2020-04-08Upgrade to Git 2.26Christian Couder
- update Docker base image - update CI testing matrix Part of: https://gitlab.com/gitlab-org/gitaly/issues/2497
2020-04-07output junit report when tests failSami Hiltunen
In 5109ed2d, pipefail was turned on in order to produce a correct exit code on test failure. This caused the JUnit reporter not to run on test failures. This commit turns off pipefail, ensuring the JUnit reporter runs even after tests fail and returns the exit code of 'go test'.
2020-04-06Update grpc-tools 1.0.1 -> 1.27.0Pirate Praveen
2020-04-06Merge branch 'jv-terraform-cloudsql' into 'master'Sami Hiltunen
Create Gitaly HA PostgreSQL instance with Terraform See merge request gitlab-org/gitaly!1990
2020-04-03print test output to console and junit reportSami Hiltunen
Currently the test output is only written in to the junit report. This commit modifies the makefile to tee the output also to console.
2020-04-03Merge branch 'osw-enable-stackdriver-profiler' into 'master'Jacob Vosmaer
Add stackdriver profiler support with LabKit See merge request gitlab-org/gitaly!1842
2020-04-03Provision PostgreSQL demo database with TerraformJacob Vosmaer
2020-04-02Merge branch 'jv-terraform-counter' into 'master'Paul Okstad
Terraform: deduplicate gitaly instance definition See merge request gitlab-org/gitaly!2002