Merge "Install utility scripts for running jeepyb commands"

This commit is contained in:
Zuul 2020-03-23 14:34:51 +00:00 committed by Gerrit Code Review
commit c8b6312430
6 changed files with 73 additions and 0 deletions

View File

@ -11,3 +11,4 @@ gerrit_storyboard_url: https://storyboard-dev.openstack.org
gerrit_vhost_name: review-dev.opendev.org
gerrit_redirect_vhost: review-dev.openstack.org
gerrit_project_config_base: /opt/project-config/dev
gerrit_project_creator_user: openstack-dev-project-creator

View File

@ -19,3 +19,4 @@ gerrit_container_volumes:
- /home/gerrit2/.ssh:/var/gerrit/.ssh
gerrit_database_type: MYSQL
gerrit_project_config_base: /opt/project-config
gerrit_project_creator_user: openstack-project-creator

View File

@ -233,6 +233,17 @@
- etc/GerritSite.css
- etc/GerritSiteHeader.html
- name: Write jeepyb utility scripts
template:
src: "{{ item }}.j2"
dest: "/usr/local/bin/{{ item }}"
owner: root
group: root
mode: 0755
loop:
- manage-projects
- track-upstream
- name: Install apache2
apt:
name:

View File

@ -0,0 +1,25 @@
#!/bin/bash
# Copyright 2020 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
exec docker run -it --rm -u root \
-v{{ gerrit_project_config_base }}:/opt/project-config \
-v{{ gerrit_project_config_base }}/gerrit/projects.yaml:/home/gerrit2/projects.yaml \
-v/opt/lib/git:/opt/lib/git \
-v/opt/lib/jeepyb:/opt/lib/jeepyb \
-v/home/gerrit2/review_site/etc/ssh_project_rsa_key:/home/gerrit2/review_site/etc/ssh_project_rsa_key \
-v/home/gerrit2/projects.ini:/home/gerrit2/projects.ini \
-v/var/log:/var/log \
{{ gerrit_container_image }} manage-projects -v -l /var/log/manage_projects.log

View File

@ -0,0 +1,10 @@
[projects]
homepage=https://opendev.org
acl-dir=/opt/project-config/gerrit/acls
local-git-dir=/opt/lib/git
jeepyb-cache-dir=/opt/lib/jeepyb
gerrit-host={{ gerrit_vhost_name }}
gerrit-user={{ gerrit_project_creator_user }}
gerrit-committer=OpenDev Project Creator <openstack-infra@lists.openstack.org>
gerrit-key=/home/gerrit2/review_site/etc/ssh_project_rsa_key
has-github=false

View File

@ -0,0 +1,25 @@
#!/bin/bash
# Copyright 2020 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
exec docker run -it --rm -u root \
-v{{ gerrit_project_config_base }}:/opt/project-config \
-v{{ gerrit_project_config_base }}/gerrit/projects.yaml:/home/gerrit2/projects.yaml \
-v/opt/lib/git:/opt/lib/git \
-v/opt/lib/jeepyb:/opt/lib/jeepyb \
-v/home/gerrit2/review_site/etc/ssh_project_rsa_key:/home/gerrit2/review_site/etc/ssh_project_rsa_key \
-v/home/gerrit2/projects.ini:/home/gerrit2/projects.ini \
-v/var/log:/var/log \
{{ gerrit_container_image }} track-upstream -v -l /var/log/track_upstream.log