Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make GitLab instance CIS level 2 compliant (#5990) #6694

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions terraform/gitlab/gitlab.tf.json.template.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,15 @@
# To then format the volume, you can then either attach it to some other Linux
# instance and format it there or use `make terraform` to create the actual
# Gitlab instance and attach the volume. For the latter you would need to ssh
# into the Gitlab instance, format `/dev/xvdf` (`/dev/nvme1n1` on newer
# into the Gitlab instance, format `/dev/xvdg` (`/dev/nvme2n1` on newer
# instance types) and reboot the instance. For example:
#
# docker stop gitlab-runner
# docker stop gitlab
# docker stop gitlab-dind
# sudo mv /mnt/gitlab /mnt/gitlab.deleteme
# sudo mkdir /mnt/gitlab
# sudo mkfs.ext4 /dev/nvme1n1
# sudo mkfs.ext4 /dev/nvme2n1
# sudo reboot
# sudo rm -rf /mnt/gitlab.deleteme
#
Expand Down Expand Up @@ -244,10 +244,10 @@
# For instructions on finding the latest CIS-hardened AMI, see
# OPERATOR.rst#upgrading-linux-ami
#
# CIS Amazon Linux 2 Kernel 4.14 Benchmark - Level 1 - v09 -4c096026-c6b0-440c-bd2f-6d34904e4fc6
# CIS Amazon Linux 2 Benchmark - Level 2 - v10 -c41d38c4-3f6a-4434-9a86-06dd331d3f9c
#
ami_id = {
'us-east-1': 'ami-080cfaeb213b9f981'
'us-east-1': 'ami-085f8ec68dc857b57'
}

gitlab_mount = '/mnt/gitlab'
Expand Down Expand Up @@ -1421,7 +1421,7 @@ def merge(sets: Iterable[Iterable[str]]) -> Iterable[str]:
},
'aws_volume_attachment': {
'gitlab': {
'device_name': '/dev/sdf',
'device_name': '/dev/sdg',
'volume_id': '${data.aws_ebs_volume.gitlab.id}',
'instance_id': '${aws_instance.gitlab.id}',
'provisioner': {
Expand Down Expand Up @@ -1607,7 +1607,7 @@ def merge(sets: Iterable[Iterable[str]]) -> Iterable[str]:
'user_data_replace_on_change': True,
'user_data': '#cloud-config\n' + yaml.dump({
'mounts': [
['/dev/nvme1n1', gitlab_mount, 'ext4', '']
['/dev/nvme2n1', gitlab_mount, 'ext4', '']
],
'packages': [
'docker',
Expand Down
Loading