Remove git deamon functionality
Caching git repositories has been deprecated in Queens, so it's high time we removed this functionality. This shouldn't influece OSA deployments in any way. Change-Id: I35829aa35489f06dbb3b65f522f0a08318eccbfa
This commit is contained in:
parent
1205049670
commit
748d86411b
@ -50,10 +50,6 @@ repo_recreate_keys: False
|
||||
# Main web server port
|
||||
repo_server_port: 8181
|
||||
|
||||
# Set the git file paths
|
||||
repo_git_cache_dirname: openstackgit
|
||||
repo_git_cache_dir: "{{ repo_service_home_folder }}/repo/{{ repo_git_cache_dirname }}"
|
||||
|
||||
# This directory is used by the repo_build, and will cause problems if synced
|
||||
# to repo_containers with other releases.
|
||||
repo_build_global_links_dirname: links
|
||||
|
@ -46,28 +46,6 @@
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: reload git-daemon
|
||||
service:
|
||||
name: "git-daemon"
|
||||
enabled: yes
|
||||
state: restarted
|
||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||
register: _restart
|
||||
until: _restart is success
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
- name: reload git socket
|
||||
service:
|
||||
name: "git.socket"
|
||||
enabled: yes
|
||||
state: restarted
|
||||
daemon_reload: "{{ (ansible_service_mgr == 'systemd') | ternary('yes', omit) }}"
|
||||
register: _restart
|
||||
until: _restart is success
|
||||
retries: 5
|
||||
delay: 2
|
||||
|
||||
# TODO(odyssey4me):
|
||||
# Remove these tasks in T. They are only present for the
|
||||
# Q->R upgrade or for R->S upgrades for environments which
|
||||
|
@ -63,18 +63,3 @@
|
||||
state: "link"
|
||||
notify:
|
||||
- reload nginx
|
||||
|
||||
- name: Place git daemon systemd init script
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
mode: "0644"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
with_items:
|
||||
- src: "git.service.j2"
|
||||
dest: "{{ systemd_utils_prefix }}/system/git@.service"
|
||||
- src: "git.socket.j2"
|
||||
dest: "{{ systemd_utils_prefix }}/system/git.socket"
|
||||
notify:
|
||||
- reload git socket
|
@ -58,23 +58,6 @@
|
||||
owner: "root"
|
||||
group: "root"
|
||||
|
||||
# TODO(evrardjp):
|
||||
# The functionality provided by the following two tasks is
|
||||
# deprecated in Queens and should be removed in Rocky. Apply
|
||||
# the changes as done in https://review.openstack.org/521750
|
||||
- name: Check if the git folder exists already
|
||||
stat:
|
||||
path: "{{ repo_git_cache_dir }}"
|
||||
register: _git_folder
|
||||
|
||||
- name: Git service data folder setup
|
||||
file:
|
||||
path: "{{ (_git_folder.stat.exists and _git_folder.stat.islnk) | ternary(_git_folder.stat.lnk_source, repo_git_cache_dir) }}"
|
||||
state: "directory"
|
||||
owner: "{{ repo_service_user_name }}"
|
||||
group: "{{ repo_service_group_name }}"
|
||||
recurse: true
|
||||
|
||||
- name: File and directory setup (root user)
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
|
@ -1,8 +0,0 @@
|
||||
[Unit]
|
||||
Description=Git Repositories Server Daemon
|
||||
Documentation=man:git-daemon(1)
|
||||
|
||||
[Service]
|
||||
User=nobody
|
||||
ExecStart=-{{ git_daemon_path }} --base-path={{ repo_git_cache_dir }}/ --export-all --user-path=public_git --syslog --inetd --verbose
|
||||
StandardInput=socket
|
@ -1,9 +0,0 @@
|
||||
[Unit]
|
||||
Description=Git Activation Socket
|
||||
|
||||
[Socket]
|
||||
ListenStream=9418
|
||||
Accept=true
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
@ -618,7 +618,7 @@ sync {
|
||||
rsync,
|
||||
source = "{{ repo_service_home_folder }}/repo",
|
||||
target = "{{ hostvars[node]['ansible_host'] }}:{{ repo_service_home_folder }}/repo",
|
||||
exclude = {"{{ repo_git_cache_dirname }}", "{{ repo_build_global_links_dirname }}"},
|
||||
exclude = {{ repo_build_global_links_dirname }}",
|
||||
rsync = {
|
||||
compress = true,
|
||||
acls = true,
|
||||
@ -627,17 +627,5 @@ sync {
|
||||
postcmd = "sudo {{ repo_service_home_folder }}/repo/repo_prepost_cmd.sh post-www"
|
||||
}
|
||||
}
|
||||
sync {
|
||||
rsync,
|
||||
source = "{{ repo_git_cache_dir }}",
|
||||
target = "{{ hostvars[node]['ansible_host'] }}:{{ repo_git_cache_dir }}",
|
||||
rsync = {
|
||||
compress = true,
|
||||
acls = true,
|
||||
rsh = "/usr/bin/ssh -l {{ repo_service_user_name }} -i {{ repo_service_home_folder }}/.ssh/id_rsa -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -o ServerAliveCountMax=5",
|
||||
precmd = "sudo {{ repo_service_home_folder }}/repo/repo_prepost_cmd.sh pre-git",
|
||||
postcmd = "sudo {{ repo_service_home_folder }}/repo/repo_prepost_cmd.sh post-git"
|
||||
}
|
||||
}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
@ -11,12 +11,6 @@ post-www)
|
||||
ln -s /etc/nginx/sites-available/openstack-slushee.vhost /etc/nginx/sites-enabled/openstack-slushee.vhost
|
||||
systemctl reload nginx
|
||||
;;
|
||||
pre-git)
|
||||
systemctl stop git.socket
|
||||
;;
|
||||
post-git)
|
||||
systemctl start git.socket
|
||||
;;
|
||||
*)
|
||||
echo "Unknown command."
|
||||
esac
|
||||
|
@ -2,10 +2,6 @@
|
||||
src: https://opendev.org/openstack/openstack-ansible-apt_package_pinning
|
||||
scm: git
|
||||
version: master
|
||||
- name: pip_install
|
||||
src: https://opendev.org/openstack/openstack-ansible-pip_install
|
||||
scm: git
|
||||
version: master
|
||||
- name: openstack_hosts
|
||||
src: https://opendev.org/openstack/openstack-ansible-openstack_hosts
|
||||
scm: git
|
||||
|
@ -45,16 +45,3 @@
|
||||
assert:
|
||||
that:
|
||||
- "repo_dir.stat.exists"
|
||||
|
||||
- name: Clone repo for testing
|
||||
git:
|
||||
repo: "https://opendev.org/openstack/openstack-ansible-repo_server"
|
||||
dest: /var/www/repo/openstackgit/repo_server
|
||||
version: master
|
||||
|
||||
- name: Check git daemon is functioning
|
||||
git:
|
||||
repo: "git://localhost/repo_server"
|
||||
dest: /tmp/repo_server
|
||||
version: master
|
||||
accept_hostkey: yes
|
||||
|
@ -17,7 +17,6 @@ systemd_utils_prefix: "/lib/systemd"
|
||||
|
||||
repo_nginx_pid: /var/run/nginx.pid
|
||||
|
||||
git_daemon_path: /usr/lib/git-core/git-daemon
|
||||
rsyncd_service_name: rsync
|
||||
|
||||
repo_server_distro_packages:
|
||||
|
@ -17,11 +17,9 @@ systemd_utils_prefix: "/lib/systemd"
|
||||
|
||||
repo_nginx_pid: /run/nginx.pid
|
||||
|
||||
git_daemon_path: /usr/libexec/git-core/git-daemon
|
||||
rsyncd_service_name: rsyncd
|
||||
|
||||
repo_server_distro_packages:
|
||||
- git-daemon
|
||||
- lsyncd
|
||||
- nginx
|
||||
- openssh-server
|
||||
|
@ -18,11 +18,9 @@ systemd_utils_prefix: "/usr/lib/systemd"
|
||||
|
||||
repo_nginx_pid: /var/run/nginx.pid
|
||||
|
||||
git_daemon_path: /usr/lib/git/git-daemon
|
||||
rsyncd_service_name: rsyncd
|
||||
|
||||
repo_server_distro_packages:
|
||||
- git-daemon
|
||||
- lsyncd
|
||||
- nginx
|
||||
- openssh
|
||||
|
Loading…
Reference in New Issue
Block a user