From a7bf416580097865f94b04a6aef76642993fdd9c Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sun, 21 Apr 2024 05:18:01 +0200 Subject: [PATCH] chore(gitlab): improve installation commands --- knowledge base/cloud computing/aws/ssm.md | 7 +++++++ knowledge base/gitlab.md | 21 ++++++++++++++++++++- snippets/gitlab.omnibus.install.sh | 6 ------ snippets/gitlab.omnibus.reconfigure.sh | 10 ++++++++-- 4 files changed, 35 insertions(+), 9 deletions(-) diff --git a/knowledge base/cloud computing/aws/ssm.md b/knowledge base/cloud computing/aws/ssm.md index fec4056..b8f66ff 100644 --- a/knowledge base/cloud computing/aws/ssm.md +++ b/knowledge base/cloud computing/aws/ssm.md @@ -40,6 +40,10 @@ aws ssm start-session \ --target 'instance-id' \ --document-name 'CustomCommandSessionDocument' \ --parameters '{"logpath":["/var/log/amazon/ssm/amazon-ssm-agent.log"]}' +aws ssm send-command \ + --instance-ids 'i-0123456789abcdef0' \ + --document-name 'AWS-RunShellScript' \ + --parameters commands="echo 'hallo!'" ``` @@ -52,6 +56,9 @@ instance_id='i-08fc83ad07487d72f' \ && eval $(aws ssm get-connection-status --target "$instance_id" --query "Status=='connected'" --output text) \ && aws ssm start-session --target "$instance_id" \ || (echo "instance ${instance_id} not available" >&2 && false) + +aws ssm send-command --instance-ids "i-08fc83ad07487d72f" \ + --document-name "AWS-RunShellScript" --parameters commands="echo 'hallo!'" ``` diff --git a/knowledge base/gitlab.md b/knowledge base/gitlab.md index f2f0ff1..643eef6 100644 --- a/knowledge base/gitlab.md +++ b/knowledge base/gitlab.md @@ -22,18 +22,33 @@ ## Omnibus +
+ Installation + +Refer [Install self-managed GitLab]. + +
Configuration +[Template][omnibus configuration template] + The application of configuration changes is handled by [Chef Infra].
It runs checks, ensures directories, permissions, and services are in place and working, and restarts components if any of their configuration files have changed. ```sh -# Edit and validate. +# Validate. +# Just makes sure the file is readable from a ruby app. +# Gitlab's internal checks do not really do anything. sudo vim '/etc/gitlab/gitlab.rb' sudo ruby -c '/etc/gitlab/gitlab.rb' +sudo gitlab-ctl show-config + +# Check if there are any configuration in the configuration file that is removed in specified versions. +# Useless by experience. sudo gitlab-ctl check-config +sudo gitlab-ctl check-config -v '16.11.0' # Make Gitlab aware of the changes. sudo gitlab-ctl reconfigure @@ -556,6 +571,8 @@ Solution: give that user _developer_ access or have somebody else with enough pr - [Tutorial: Use Buildah in a rootless container with GitLab Runner Operator on OpenShift] - [Use kaniko to build Docker images] - [Specify when jobs run with `rules`][specify when jobs run with rules] +- [Install self-managed GitLab] +- [Omnibus configuration template]