• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..02-Jun-2021-

roles/H02-Jun-2021-287238

terraform/H02-Jun-2021-264215

.gitignoreH A D02-Jun-202144 43

README.mdH A D02-Jun-20211.8 KiB7147

configure-demo-clusterH A D02-Jun-202164 31

configure.ymlH A D02-Jun-2021304 2118

create-demo-clusterH A D02-Jun-202161 31

create.ymlH A D02-Jun-2021856 2322

destroy-demo-clusterH A D02-Jun-202144 31

print-infoH A D02-Jun-202143 31

README.md

1# Terraform for Gitaly HA demo
2
3## Prerequisites
4
5### Google Cloud SDK
6
7- For most platforms, including macOS, use the [official
8   guide](https://cloud.google.com/sdk/docs/quickstarts)
9- For Arch Linux, go to [this
10   AUR](https://aur.archlinux.org/packages/google-cloud-sdk)
11
12### Install Terraform
13
14On macOS with homebrew, use `brew install terraform`. For other
15platforms see [the Terraform download
16page](https://www.terraform.io/downloads.html).
17
18### Install Ansible
19
20Please refer to [Ansible's
21documentation](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
22to install it on your system.
23
24## Provision your cluster
25
26### 1. Create cluster
27
28```
29./create-demo-cluster
30```
31
32This will open a browser to sign into GCP if necessary. Ansible will then ask
33you a set of questions before it performs the deplyoment.
34
35When the script is done, `apt-get install gitlab-ee` is still busy
36running in the background on your new VM's.
37
38One of the provisioned resources is the database, which can take up to 10
39minutes to be created.
40
41### 2. Configure cluster
42
43```
44./configure-demo-cluster
45```
46
47Configuration of the cluster has been automated via Ansible. The cluster
48creation script has automatically created a `hosts.ini` file for use by
49Ansible containing all necessary information to configure the cluster.
50
51If you wish to manually configure the cluster, please consult
52https://docs.gitlab.com/ee/administration/gitaly/praefect.html.
53
54To see the list of IP's for your machines, run:
55
56```
57./print-info
58```
59
60### 3. Destroy cluster
61
62When you run the command below Terraform will print a plan of things
63to destroy, that you then have to confirm (or abort with Ctrl-C).
64
65Be careful! Double check how many nodes are being destroyed, and what
66their names are.
67
68```
69./destroy-demo-cluster
70```
71