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

[TEMPLATE] Add GitLab template #2638

Merged
merged 5 commits into from
Jul 25, 2024
Merged

Conversation

GunniBusch
Copy link
Contributor

@GunniBusch GunniBusch commented Jun 23, 2024

Added a gitlab template
Fixes #2635
/claim #2635

@GunniBusch GunniBusch marked this pull request as draft June 23, 2024 01:55
@GunniBusch GunniBusch marked this pull request as ready for review June 23, 2024 01:55
@compgeniuses
Copy link

compgeniuses commented Jun 23, 2024

HEllo @GunniBusch ,
Thank you for working on this PR

I think we also need to Add these as well SMH
We also Have

    - GITLAB_SECRETS_DB_KEY_BASE=long-and-random-alphanumeric-string
    - GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alphanumeric-string
    - GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alphanumeric-string
    - GITLAB_ROOT_PASSWORD=StrongPassw0rd
    - GITLAB_ROOT_EMAIL=myemail@example.com
    - TZ=Africa/Nairobi
    - GITLAB_TIMEZONE=Nairobi
SmTP
    - SMTP_ENABLED=true
    - SMTP_DOMAIN=www.example.com
    - SMTP_HOST=smtp.gmail.com
    - SMTP_PORT=587
    - SMTP_USER=mailer@example.com
    - SMTP_PASS=password
    - SMTP_STARTTLS=true
    - SMTP_AUTHENTICATION=login

Gitlab Has support for PostgreSQL database. with - DB_ADAPTER=postgresql
Redis as well

I think it would be wise to Have these Implemented as well
@GunniBusch What do you think? unless am missing something

@compgeniuses
Copy link

Based on your implementaqtion would be more like

        gitlab_rails['db_adapter'] = "${GITLAB_DB_TYPE}"
        gitlab_rails['db_encoding'] = "unicode"
        gitlab_rails['db_host'] = "postgres"
        gitlab_rails['db_database'] = "${GITLAB_DB_NAME}"
        gitlab_rails['db_username'] = "${GITLAB_DB_USER}"
        gitlab_rails['db_password'] = "${GITLAB_DB_PASSWORD}"
        gitlab_rails['smtp_enable'] = true
        gitlab_rails['smtp_address'] = "${GITLAB_SMTP_ADDRESS}"
        gitlab_rails['smtp_port'] = 587
        gitlab_rails['smtp_user_name'] = "${GITLAB_SMTP_USER_NAME}"
        gitlab_rails['smtp_password'] = "${GITLAB_SMTP_PASSWORD}"
        gitlab_rails['smtp_domain'] = "${GITLAB_SMTP_ADDRESS}"
        gitlab_rails['smtp_authentication'] = "login"
        gitlab_rails['smtp_enable_starttls_auto'] = true
        gitlab_rails['smtp_tls'] = false
        gitlab_rails['gitlab_email_from'] = "${GITLAB_EMAIL_FROM}"
        gitlab_rails['gitlab_email_reply_to'] = "${GITLAB_EMAIL_REPLY_TO}"
        postgresql['enable'] = false
        registry['enable'] = false

@GunniBusch
Copy link
Contributor Author

At least for the db values, I took the git tea as a template for this, which also does not have a separate db.

@GunniBusch
Copy link
Contributor Author

GunniBusch commented Jun 23, 2024

Gitlab Has support for PostgreSQL database. with - DB_ADAPTER=postgresql

Maybe an idea for a separate template?
will look into it tomorrow

@compgeniuses
Copy link

SO we basically Have 2 VErsions, One with integrated DB within the container, WHile another one where the DB is Separate from the Main container?

How About the other ENv variables, are they not required as well, SMTP, keys and passwords, etc

@GunniBusch
Copy link
Contributor Author

SO we basically Have 2 VErsions, One with integrated DB within the container, WHile another one where the DB is Separate from the Main container?

How About the other ENv variables, are they not required as well, SMTP, keys and passwords, etc

so the thing is that settings set by the OMNi ... env var are (so how I understood it) are not meant for the first config. They can be configured also by entries in a conf file and using the ui.
So but there are things that can be set these can be found here:
https://docs.gitlab.com/ee/administration/environment_variables.html

So but I have now fixed how to correctly set these variables. So I am now testing if it works and commit the changes

@GunniBusch
Copy link
Contributor Author

the next thing is should I also create a template for the ee as well?

@GunniBusch
Copy link
Contributor Author

I added the mail config. I seems to work. But can someone try it to verify?

@compgeniuses
Copy link

the next thing is should I also create a template for the ee as well?

EE version is not necessary at the moment,

The focus would be the PGSQL as seprate db version first

@compgeniuses
Copy link

compgeniuses commented Jun 23, 2024

could we add these as well:

timezone
gitlab_rails['time_zone'] = 'Africa/Nairobi'

##Additional for EMails
gitlab_rails['gitlab_email_display_name'] = 'DevGen Gitlab'

### Default project feature settings
gitlab_rails['gitlab_default_projects_features_issues'] = true
gitlab_rails['gitlab_default_projects_features_merge_requests'] = true
gitlab_rails['gitlab_default_projects_features_wiki'] = true
gitlab_rails['gitlab_default_projects_features_snippets'] = true
gitlab_rails['gitlab_default_projects_features_builds'] = true
gitlab_rails['gitlab_default_projects_features_container_registry'] = true

### Impersonation settings
gitlab_rails['impersonation_enabled'] = false

### Usage Statistics
gitlab_rails['usage_ping_enabled'] = true


### OmniAuth Settings
###! Docs: https://docs.gitlab.com/ee/integration/omniauth.html
gitlab_rails['omniauth_enabled'] = true
gitlab_rails['omniauth_allow_single_sign_on'] = ['saml']
# gitlab_rails['omniauth_sync_email_from_provider'] = 'saml'
gitlab_rails['omniauth_sync_profile_from_provider'] = ['saml']
gitlab_rails['omniauth_sync_profile_attributes'] = ['email']
# gitlab_rails['omniauth_auto_sign_in_with_provider'] = 'saml'
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['omniauth_auto_link_ldap_user'] = true
gitlab_rails['omniauth_auto_link_saml_user'] = true
gitlab_rails['omniauth_auto_link_user'] = ['saml']
# gitlab_rails['omniauth_external_providers'] = ['twitter', 'google_oauth2']
# gitlab_rails['omniauth_allow_bypass_two_factor'] = ['google_oauth2']
gitlab_rails['omniauth_providers'] = [
  {
    name: "saml",
groups_attribute: 'groups',
required_groups: ['developers', 'freelancers', 'devops'],
admin_groups: ['Domain Admins'],
args: {
      assertion_consumer_service_url: '$SERVICE_FQDN_GITLAB/users/auth/saml/callback',
      idp_cert_fingerprint: 'B4:D4:2F:C0:85:7D:B3:D1:8A:24:4D:18:B6:E2:14:18:0A:5B:04:C3',
      idp_sso_target_url: 'https://ssotld/saml/singleSignOn',
      issuer: '$SERVICE_FQDN_GITLAB',
      name_identifier_format: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'
    },
        label: 'SAML Auth' # optional label for login button, defaults to "Saml"
}
]

### Extra customization
# gitlab_rails['extra_google_analytics_id'] = '_your_tracking_id'
# gitlab_rails['extra_google_tag_manager_id'] = '_your_tracking_id'
# gitlab_rails['extra_one_trust_id'] = '_your_one_trust_id'
# gitlab_rails['extra_google_tag_manager_nonce_id'] = '_your_google_tag_manager_id'
gitlab_rails['extra_matomo_url'] = 'analytics.genius-dynamics.com'
gitlab_rails['extra_matomo_site_id'] = '2'
# gitlab_rails['extra_matomo_disable_cookies'] = false

I believe them to be basic configs that majority would want to use, if configured.

@andrasbacsai andrasbacsai added the 🎬 Live-stream Issues that will be covered on live stream. label Jul 25, 2024
@andrasbacsai
Copy link
Member

Thank you for the PR! It will need a few fine-tunes, but I wrap it up.

@andrasbacsai andrasbacsai merged commit 47fa955 into coollabsio:next Jul 25, 2024
1 check passed
@compgeniuses
Copy link

Thank you, let me pay up the bounty...

@andrasbacsai andrasbacsai removed the 🎬 Live-stream Issues that will be covered on live stream. label Jul 25, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants