Merge "Add mysql to quick-start"

This commit is contained in:
Zuul 2018-10-18 05:10:01 +00:00 committed by Gerrit Code Review
commit 8b1fcb8f11
6 changed files with 38 additions and 1 deletions

View File

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

View File

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

View File

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

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

View File

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

View File

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