You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+67Lines changed: 67 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,8 +18,75 @@ Requirements
18
18
------------
19
19
20
20
* a [AWS account](https://aws.amazon.com/) (**Be careful this template implies creating billable resources on AWS cloud**)
21
+
22
+
You will need an [AWS access key](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html) and enough admin permissions to create AWS ressources
21
23
* a [AWS Route 53 DNS zone](http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/Welcome.html) already created (the template will add new subdomain DNS A records)
22
24
* a SSH Key pair to connect to Gitlab and AWS instances (see [Github help for examples](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/))
23
25
*[Packer](https://www.packer.io/) >= 0.12
24
26
*[Terraform](https://www.terraform.io/) >= 8.2
25
27
* GNU Make or some Unix equivalent Implementation
28
+
**(optional)*[Graphiz](http://www.graphviz.org/) to generate Terraform config Graph Images
29
+
```sh
30
+
# on ubuntu/debian
31
+
sudo apt-get install graphviz
32
+
```
33
+
34
+
35
+
Usage
36
+
-----
37
+
38
+
### To create the Gitlab infrastructure
39
+
40
+
1. Copy and edit the configuration files :
41
+
42
+
***terraform** : `terraform/terraform.dist.tvars` to `terraform/terraform.tvars`
43
+
***packer** : `packer/config.dist.json` to `packer/config.json`
44
+
45
+
2. create Amazon Machine Images :
46
+
47
+
* Gitlab
48
+
* Gitlab-CI-multirunner
49
+
50
+
```sh
51
+
make ami
52
+
```
53
+
54
+
3. check Terraform plan
55
+
56
+
```sh
57
+
make plan
58
+
```
59
+
60
+
3. if terraform plan is correct, create AWS resources by applying the terraform plan
61
+
62
+
```sh
63
+
make apply
64
+
```
65
+
66
+
* you can check again the terraform exported variables output
67
+
```sh
68
+
make output
69
+
```
70
+
* you can also get Graphviz graphs of all terraform config
71
+
```sh
72
+
# in PNG image format
73
+
make graphs
74
+
# or in SVG
75
+
make graphs format=svg
76
+
```
77
+
78
+
After creation, waitfor a few minutes the autoscaled gitlab instances finish self initialization.
79
+
80
+
if variables are setin`packer/config.json` like :
81
+
```
82
+
aws_dns_zone = "my-aws.net"
83
+
gitlab_dns_subdomain = "gitlab"
84
+
```
85
+
86
+
The Gitlab server should be available to http://gitlab.my-aws.net/
0 commit comments