Browse Source

Merge "Add mysql to quick-start"

changes/90/611990/1
Zuul 3 years ago
committed by Gerrit Code Review
parent
commit
8b1fcb8f11
6 changed files with 38 additions and 1 deletions
  1. +10
    -1
      doc/source/admin/examples/docker-compose.yaml
  2. +5
    -0
      doc/source/admin/examples/etc_zuul/zuul.conf
  3. +4
    -0
      doc/source/admin/examples/zuul-config/zuul.d/pipelines.yaml
  4. +10
    -0
      playbooks/quick-start/localtest.yaml
  5. +8
    -0
      playbooks/quick-start/main.yaml
  6. +1
    -0
      playbooks/quick-start/run.yaml

+ 10
- 1
doc/source/admin/examples/docker-compose.yaml View File

@ -27,11 +27,19 @@ services:
- "./playbooks/:/var/playbooks/:z"
command: "ansible-playbook /var/playbooks/setup.yaml"
zk:
image: zookeeper
image: zookeeper
mysql:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: zuul
MYSQL_USER: zuul
MYSQL_PASSWORD: secret
scheduler:
depends_on:
- gerritconfig
- zk
- mysql
environment:
no_proxy: "${no_proxy},gerrit"
command: "sh -c 'ansible-playbook /var/playbooks/scheduler.yaml; zuul-scheduler -d'"
@ -45,6 +53,7 @@ services:
command: "zuul-web -d"
depends_on:
- scheduler
- mysql
ports:
- "9000:9000"
image: zuul/zuul-web


+ 5
- 0
doc/source/admin/examples/etc_zuul/zuul.conf View File

@ -25,6 +25,11 @@ name=zuul-ci
driver=git
baseurl=https://git.zuul-ci.org/
[connection "mysql"]
name=mysql
driver=sql
dburi=mysql+pymysql://zuul:secret@mysql/zuul
[web]
listen_address=0.0.0.0


+ 4
- 0
doc/source/admin/examples/zuul-config/zuul.d/pipelines.yaml View File

@ -17,9 +17,11 @@
success:
gerrit:
Verified: 1
mysql:
failure:
gerrit:
Verified: -1
mysql:
- pipeline:
name: gate
@ -46,6 +48,8 @@
gerrit:
Verified: 2
submit: true
mysql:
failure:
gerrit:
Verified: -2
mysql:

+ 10
- 0
playbooks/quick-start/localtest.yaml View File

@ -0,0 +1,10 @@
- hosts: localhost
vars:
workspace: /tmp/quickstart-test
local: true
ssh_public_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
ssh_agent:
stdout: ''
tasks:
- name: Run tasks in ssh agent
include_tasks: main.yaml

+ 8
- 0
playbooks/quick-start/main.yaml View File

@ -1,8 +1,14 @@
- name: Run docker-compose up
when: not local
shell:
cmd: docker-compose up -d
chdir: src/git.openstack.org/openstack-infra/zuul/doc/source/admin/examples
become: true
- name: Run docker-compose up
when: local
shell:
cmd: docker-compose up -d
chdir: ../../doc/source/admin/examples
- name: Wait for Gerrit to start
wait_for:
host: localhost
@ -18,6 +24,7 @@
delay: 1
retries: 120
- name: fetch ssh host keys from gerrit
when: not local
shell: ssh-keyscan -p 29418 localhost >> ~/.ssh/known_hosts
- name: Check if example user exists in Gerrit
uri:
@ -53,6 +60,7 @@
shell:
chdir: "{{ workspace }}/zuul-config/"
executable: /bin/bash
warn: false
cmd: |
{{ ssh_agent.stdout }}
rm zuul.d/jobs.yaml


+ 1
- 0
playbooks/quick-start/run.yaml View File

@ -1,6 +1,7 @@
- hosts: all
vars:
workspace: /tmp/quickstart-test
local: false
roles:
- name: install-docker
use_upstream_docker: false


Loading…
Cancel
Save