Table des matières
- 2026:
- 2025:
1 billet(s) pour avril 2026
| Notes ping ICMP | 2026/04/03 23:01 | Jean-Baptiste |
Notes GNU Linux compte utilisateurs - users accounts
Sous RedHat la liste des comptes et des UID utilisés par la distrib est là : /usr/share/doc/setup/uidgid
Notes gnome gconf gsettings
Voir :
- M(community.general.dconf)
- M(community.general.gconftool2)
Exemple
gsettings get org.gnome.desktop.a11y.keyboard stickykeys-enable gsettings set org.gnome.desktop.a11y.keyboard stickykeys-enable false
Autre solution
/usr/share/gdm/dconf/99-local-settings
[org/gnome/settings-daemon/plugins/power] sleep-inactive-ac-timeout=0
Pb - La commande gsettings ne fonctionne pas en en console SSH.
Voir http://askubuntu.com/questions/323776/gsettings-not-working-over-ssh
La commande gsettings ne fonctionne pas en SSH. Mais fonctionne en local dans un terminal graphique.
gsettings set org.gnome.desktop.lockdown disable-lock-screen true
Vérif
gsettings get org.gnome.desktop.lockdown disable-lock-screen
false
Cela n'a pas fonctionné. Cela est dû au fait que dbus n'est pas démarré dans le session SSH.
Solution
Préfixer votre commande par dbus-launch
dbus-launch gsettings set org.gnome.desktop.lockdown disable-lock-screen true
Notes
Dump conf
Dump
dconf dump /
Ou
gsettings list-recursively
Notes 1
Éditeur en mode texte :
- gsettings (libglib2.0-bin)
- dconf (dconf-cli)
- gconftool-2 (gconf2)
Éditeur en mode graphique :
- dconf-editor (dconf-editor)
Une partie de la conf est enregistrée ici :
~/.config/dconf/user
La preuve :
$ gsettings get org.gnome.desktop.lockdown disable-lock-screen true $ rm .config/dconf/user $ gsettings get org.gnome.desktop.lockdown disable-lock-screen false
Voir le schéma ici :
/usr/share/glib-2.0/schemas/org.gnome.desktop.lockdown.gschema.xml
Autre : dconf update
Conf
Désactiver le montage automatique des clefs USB
gsettings set org.gnome.desktop.media-handling automount false
Autres
paquet dell-super-key Disables the super key by default
/usr/share/glib-2.0/schemas/41_dell-super-key.gschema.override /usr/share/doc/dell-super-key/copyright /usr/share/doc/dell-super-key/changelog.gz
/usr/share/glib-2.0/schemas/41_dell-super-key.gschema.override
[org.compiz.unityshell] show-launcher = "" lock-screen = "<Control><Alt>l" show-desktop-key = "<Control><Alt>d" launcher-switcher-forward = "" launcher-switcher-prev = "" [org.compiz.core] maximize-window-key = "<Control><Alt>Up" unmaximize-or-minimize-window-key = "<Control><Alt>Down" [org.compiz.put] put-center-key = "<Control><Alt>KP_Begin" put-left-key = "<Control><Alt>KP_Left" put-right-key = "<Control><Alt>KP_Right" put-top-key = "<Control><Alt>KP_Up" put-bottom-key = "<Control><Alt>KP_Down" put-bottom-button = "<Control><Alt>KP_Down" put-topright-key = "<Control><Alt>KP_Prior" put-bottomleft-key = "<Control><Alt>KP_End" put-bottomright-key = "<Control><Alt>KP_Next" put-restore-key = "<Control><Alt>KP_Insert" put-pointer-key = "<Control><Alt>z" [org.compiz.expo] expo-key = "<Control><Alt>s" [org.compiz.grid] put-maximize-key = "<Control><Alt>Up" put-restore-key = "<Control><Alt>Down" left-maximize = "<Control><Alt>Left" right-maximize = "<Control><Alt>Right"
Notes Gitlab
Install via Docker
Docker
Docker-compose avec Gitlab runner :
Configuration du runner
docker run --rm -ti --name gitlab-runner --add-host gitlab.local:172.17.0.1 \ -v /srv/gitlab-runner/config:/etc/gitlab-runner \ -v /var/run/docker.sock:/var/run/docker.sock \ gitlab/gitlab-runner:alpine register
/srv/gitlab-runner/config/config.toml
concurrent = 1 check_interval = 0 [session_server] session_timeout = 1800 [[runners]] name = "89fa5654f698" url = "http://gitlab.local:8081/" token = "FKXKQ5Zg1KmwB9ssNVU9" executor = "docker" [runners.custom_build_dir] [runners.cache] [runners.cache.s3] [runners.cache.gcs] [runners.cache.azure] [runners.docker] tls_verify = false image = "alpine" privileged = false disable_entrypoint_overwrite = false oom_kill_disable = false disable_cache = false volumes = ["/cache"] shm_size = 0
Gitlab créera de nouveau containers. Ils devrons etre capable de faire un git clone
Pour configurer les flux réseaux, ajoutez clone_url =
Dans notre exemple 172.18.0.1 est la passerelle par défaut des nouveaux containers crées.
/gitlab-runner/config/config.toml
[[runners]] #url = "http://gitlab.local:8081/" url = "http://gitlab.local/" clone_url = "http://172.18.0.1:8081"
docker-compose.yml
version: '3.7' services: gitlab: image: 'gitlab/gitlab-ce:latest' restart: unless-stopped hostname: 'gitlab.local' environment: GITLAB_OMNIBUS_CONFIG: | #external_url 'http://gitlab.local' # Add any other gitlab.rb configuration here, each on its own line ports: - '127.0.0.1:8081:80' - '127.0.0.1:4443:443' - '127.0.0.1:2222:22' volumes: - "/srv/gitlab/config:/etc/gitlab" - "/srv/gitlab/logs:/var/log/gitlab" - "/srv/gitlab/data:/var/opt/gitlab" networks: - gitlab-net gitlab-runner: image: gitlab/gitlab-runner:alpine restart: unless-stopped depends_on: - gitlab volumes: - /srv/gitlab-runner/config:/etc/gitlab-runner - /var/run/docker.sock:/var/run/docker.sock networks: - gitlab-net networks: gitlab-net: name: gitlab-net
srv/gitlab/config/gitlab.rb
gitlab_rails['env'] = { 'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000' } gitaly['env'] = { 'LD_PRELOAD' => '/opt/gitlab/embedded/lib/libjemalloc.so', 'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000', 'GITALY_COMMAND_SPAWN_MAX_PARALLEL' => '2' } gitlab_rails['gitlab_username_changing_enabled'] = true gitlab_rails['trusted_proxies'] = ["172.16.0.0/12"] gitlab_rails['omniauth_enabled'] = false puma['worker_processes'] = 0 puma['exporter_enabled'] = false sidekiq['max_concurrency'] = 10 sidekiq['metrics_enabled'] = false postgresql['shared_buffers'] = "1024MB" nginx['redirect_http_to_https'] = true nginx['listen_port'] = 80 nginx['listen_https'] = false prometheus['enable'] = false alertmanager['enable'] = false node_exporter['enable'] = false redis_exporter['enable'] = false postgres_exporter['enable'] = false pgbouncer_exporter['enable'] = false gitlab_exporter['enable'] = false grafana['enable'] = false grafana['metrics_enabled'] = false #gitaly['enable'] = false gitaly['ruby_max_rss'] = 200_000_000 # RSS threshold in bytes for triggering a gitaly-ruby restart gitaly['concurrency'] = [ { 'rpc' => "/gitaly.SmartHTTPService/PostReceivePack", 'max_per_repo' => 3 }, { 'rpc' => "/gitaly.SSHService/SSHUploadPack", 'max_per_repo' => 3 } ] gitaly['cgroups_count'] = 2 gitaly['cgroups_hierarchy_root'] = 'gitaly' gitaly['cgroups_memory_enabled'] = true gitaly['cgroups_memory_limit'] = 500000 gitaly['cgroups_cpu_enabled'] = true gitaly['cgroups_cpu_shares'] = 512
Lancement de Gitlab et de Gitlab-Runner
docker-compose -d up
docker exec -ti gitlab gitlab-ctl reconfigure docker restart gitlab
Config WebUI
User : root
Password
docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
Open registration is enabled on your instance.
Admin Area - Settings - General - Sign-up restrictions
Sign-up enabled Require admin approval for new sign-ups
Le compte admin par defaut est “root”
Edit Profile - Account
Change username ———-
admin/application_settings/general Account and limit Gravatar enabled Disable
admin/application_settings/general User OAuth applications Allow users to register any application to use GitLab as an OAuth provider Disable
admin/application_settings/general Third-party offers Do not display offers from third parties Checked
admin/application_settings/metrics_and_profiling Metrics - Prometheus Enable health and performance metrics endpoint Disable
profile Private profile Don't display activity-related personal information on your profile
Admin Area - Overview - Users
Config Runners avec Docker
Admin Area - Overview - Runners
docker-compose exec gitlab-runner gitlab-runner register
Enter the GitLab instance URL (for example, https://gitlab.com/): http://gitlab/
Enter the registration token: 2_xtsj1yw4sacbWwG46y
Enter an executor: docker, docker-ssh, ssh, docker+machine, kubernetes, custom, parallels, shell, virtualbox, docker-ssh+machine: docker Enter the default Docker image (for example, ruby:2.6): alpine
Reconfig
docker-compose exec gitlab gitlab-ctl reconfigure docker-compose exec gitlab gitlab-ctl restart
Pb
Erreur dans Gitlab Settings CI/DI - There was an error fetching the environments information.
Solution :
Settings, General, Visibility, project features, permissions in Pipelines (Build, test, and deploy your changes) select Only Project Members
Autres
Installation sur Ubuntu 16.04
https://packages.gitlab.com/gitlab/gitlab-ce/install
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash apt-get install gitlab-ce
-------------- GitLab was unable to detect a valid hostname for your instance. Please configure a URL for your GitLab instance by setting `external_url` configuration in /etc/gitlab/gitlab.rb file. Then, you can start your GitLab instance by running the following command: sudo gitlab-ctl reconfigure For a comprehensive list of configuration options please see the Omnibus GitLab readme https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md ---------------
sudo gitlab-ctl reconfigure
Optimisation
/etc/gitlab/gitlab.rb
##! **recommend value is 1/4 of total RAM, up to 14GB.** # postgresql['shared_buffers'] = "256MB" postgresql['shared_buffers'] = "4096MB"
gitlab-ctl restart postgresql
Les composants suivants seront automatiquement installés :
- nginx
- postgres
- redis
A présent connectez vous sur le port 80 et définissez un mot de passe
Notes gitlab-ci pipeline
Voir :
Voir aussi:
- Drone CI
- Woodpecker CI (fork of Drone)
- tea-runner
- Travis CI
- Abstruse CI
- Gitea Action
- Agola: CI/CD
- Metroline
- mvoCI
- Jaypore CI
- Tekton
- Argo CD (CD for Kubernetes)
Exemples
configure: stage: configure image: $BUILDER needs: - build script: - echo Starting - plop.sh when: manual
Test CI/DI
Créons un projet avec à la racine un fichier .gitlab-ci.yml
.gitlab-ci.yml
job1: stage: test script: echo 'my first job'
NOTE : stages available are :
- .pre
- build
- test
- deploy
- .post
Voir : https://docs.gitlab.com/ee/ci/yaml/README.html
Ou nous pouvons le redéfinir :
stages: build test deploy
Pour tester en local
gitlab-runner exec shell job1
Secure file
# CI_API_V4_URL='https://gitlab.acme.fr/api/v4' # CI_PROJECT_ID=58 # TOKEN_PLOP=plop curl --request GET --header "PRIVATE-TOKEN: ${TOKEN_PLOP}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/secure_files/1/download" --output key'
Skip CI
Commit message :
[ci skip] or [skip ci]
Alternatively, one can pass the ci.skip Git push option if using Git 2.10 or newer:
git push -o ci.skip
Autres
Voir
requirements.txt
Jinja2==2.11.2 j2cli-3==0.0.1 anybadge==1.7.0
