summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-01-27 10:19:39 +0000
committerGerrit Code Review <review@openstack.org>2019-01-27 10:19:39 +0000
commita29665f7db6c9b00ffe23aa78a03d7314c6dc695 (patch)
treef7caa8f45ec1569d30e1f8545f85f8a939bf98c8
parentce94af3b3f4e6ede9faa6551c256d05395c71695 (diff)
parent7fe0e780cf4278feccd78290e7d6638e3ac4f79b (diff)
Merge "Build zuul containers with dockerfile not pbrx"
-rw-r--r--.zuul.yaml115
-rw-r--r--Dockerfile53
-rw-r--r--playbooks/quick-start/main.yaml2
-rw-r--r--playbooks/quick-start/run.yaml11
-rw-r--r--zuul/driver/bubblewrap/__init__.py1
5 files changed, 161 insertions, 21 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index 87d2a59..693385c 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -65,11 +65,109 @@
65 post-run: playbooks/quick-start/post.yaml 65 post-run: playbooks/quick-start/post.yaml
66 roles: 66 roles:
67 - zuul: openstack-infra/zuul-jobs 67 - zuul: openstack-infra/zuul-jobs
68 vars:
69 docker_images:
70 - context: .
71 repository: zuul/zuul
72 target: zuul
73 - context: .
74 repository: zuul/zuul-executor
75 target: zuul-executor
76 - context: .
77 repository: zuul/zuul-fingergw
78 target: zuul-fingergw
79 - context: .
80 repository: zuul/zuul-merger
81 target: zuul-merger
82 - context: .
83 repository: zuul/zuul-scheduler
84 target: zuul-scheduler
85 - context: .
86 repository: zuul/zuul-web
87 target: zuul-web
88 - context: ../nodepool
89 repository: zuul/nodepool
90 target: nodepool
91 - context: ../nodepool
92 repository: zuul/nodepool-launcher
93 target: nodepool-launcher
94 - context: ../nodepool
95 repository: zuul/nodepool-builder
96 target: nodepool-builder
68 required-projects: 97 required-projects:
69 - openstack/pbrx
70 - openstack-infra/nodepool 98 - openstack-infra/nodepool
71 - openstack-infra/zuul 99 - openstack-infra/zuul
72 100
101# Image building jobs
102- secret:
103 name: zuul-dockerhub
104 data:
105 username: zuulzuul
106 password: !encrypted/pkcs1-oaep
107 - DFlbrDM5eUMptMGIVMXV1g455xOJLi92UYF08Z2/JlIGu3t6v052o9FKlVyj1ZmpXs5+2
108 JTa5jHkLTvTsYs9fCaNcQc2nmViCyWNlbOMzjB17uiZOaYFNs1sMqZcUZbGEz7Y8ds6Qq
109 NBXI10jWFPTah4QxUuBvUbT3vmjnUToCzexl5ZGhKgijcnROWfUsnlCdugpgoNIcPsUki
110 zty5FotDihnrC8n8vIomVK6EClY38ty97pLrADzFDd+Cos/OUlvi2xooUhzx8Bn020rJA
111 lqEU5v8LGXp5QkHx0MSDx6JY6KppJ/4p/yM+4By6l+A20zdcimxmgiNc9rMWPwDj7xsao
112 m7NAZWmWqOO0Xkhgt6WOfugwgt9X46sgs2+yDEfbnI5ok8uRbAB/4FWj/KdpyXwhcf+O2
113 wEfhxLwDbAoGONQPjb4YcZmCXtmR7Qe5t+n2jyczWXvrbaBDUQP5a+YtVNN/xhmQ7D740
114 POlxv7bLxJAixzqaQ3d8Rz9ZEv6zzRuhWph32UQtZ1JxSNww+EvmXm2eEi2Q2z6pT1Cx/
115 j2OrFyA2GL/UJOVb15VHKF6bgHPHWJtpjPFhqdcvBhVute4BWB+KPcWH+y+apHN1enK3H
116 tNJO9iqm34nKwSuj5ExmFw50LtwR5/9FyRuRPq/vBL+8y82v8FDmeYsBeobn5M=
117
118- job:
119 name: zuul-build-image
120 parent: build-docker-image
121 description: Build Docker images.
122 allowed-projects: openstack-infra/zuul
123 vars: &zuul_image_vars
124 docker_images:
125 - context: .
126 repository: zuul/zuul-base
127 target: zuul-base
128 - context: .
129 repository: zuul/zuul
130 target: zuul
131 - context: .
132 repository: zuul/zuul-executor
133 target: zuul-executor
134 - context: .
135 repository: zuul/zuul-fingergw
136 target: zuul-fingergw
137 - context: .
138 repository: zuul/zuul-merger
139 target: zuul-merger
140 - context: .
141 repository: zuul/zuul-scheduler
142 target: zuul-scheduler
143 - context: .
144 repository: zuul/zuul-web
145 target: zuul-web
146
147- job:
148 name: zuul-upload-image
149 parent: upload-docker-image
150 description: Build Docker images and upload to Docker Hub.
151 allowed-projects: openstack-infra/zuul
152 secrets:
153 name: docker_credentials
154 secret: zuul-dockerhub
155 pass-to-parent: true
156 vars: *zuul_image_vars
157
158- job:
159 name: zuul-promote-image
160 parent: promote-docker-image
161 description: Promote previously uploaded Docker images.
162 allowed-projects: openstack-infra/zuul
163 secrets:
164 name: docker_credentials
165 secret: zuul-dockerhub
166 pass-to-parent: true
167 nodeset:
168 nodes: []
169 vars: *zuul_image_vars
170
73- project: 171- project:
74 check: 172 check:
75 jobs: 173 jobs:
@@ -100,11 +198,9 @@
100 - zuul-stream-functional 198 - zuul-stream-functional
101 - zuul-tox-remote 199 - zuul-tox-remote
102 - zuul-quick-start 200 - zuul-quick-start
103 - pbrx-build-container-images:
104 vars:
105 pbrx_prefix: zuul
106 - nodepool-zuul-functional: 201 - nodepool-zuul-functional:
107 voting: false 202 voting: false
203 - zuul-build-image
108 gate: 204 gate:
109 jobs: 205 jobs:
110 - tox-docs 206 - tox-docs
@@ -133,9 +229,7 @@
133 - zuul-stream-functional 229 - zuul-stream-functional
134 - zuul-tox-remote 230 - zuul-tox-remote
135 - zuul-quick-start 231 - zuul-quick-start
136 - pbrx-build-container-images: 232 - zuul-upload-image
137 vars:
138 pbrx_prefix: zuul
139 post: 233 post:
140 jobs: 234 jobs:
141 - publish-zuul-docs 235 - publish-zuul-docs
@@ -145,10 +239,9 @@
145 node_version: 8 239 node_version: 8
146 zuul_work_dir: "{{ zuul.project.src_dir }}/web" 240 zuul_work_dir: "{{ zuul.project.src_dir }}/web"
147 create_tarball_directory: build 241 create_tarball_directory: build
148 - openstackzuul-pbrx-push-container-images: 242 promote:
149 vars: 243 jobs:
150 pbrx_prefix: zuul 244 - zuul-promote-image
151
152 release: 245 release:
153 jobs: 246 jobs:
154 - release-zuul-python 247 - release-zuul-python
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..4031bf5
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,53 @@
1# Copyright (c) 2019 Red Hat, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12# implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16FROM opendevorg/python-builder as builder
17
18COPY . /tmp/src
19RUN /tmp/src/tools/install-js-tools.sh
20RUN assemble
21
22FROM opendevorg/python-base as zuul-base
23
24COPY --from=builder /output/ /output
25RUN echo "deb http://ftp.debian.org/debian stretch-backports main" >> /etc/apt/sources.list \
26 && apt-get update \
27 && apt-get install -t stretch-backports -y bubblewrap \
28 && apt-get clean \
29 && rm -rf /var/lib/apt/lists/*
30RUN /output/install-from-bindep \
31 && pip install --cache-dir=/output/wheels -r /output/zuul_base/requirements.txt \
32 && rm -rf /output
33
34FROM zuul-base as zuul
35CMD ["/usr/local/bin/zuul"]
36
37FROM zuul-base as zuul-executor
38COPY --from=builder /output/ /output
39RUN pip install --cache-dir=/output/wheels -r /output/zuul_executor/requirements.txt \
40 && rm -rf /output
41CMD ["/usr/local/bin/zuul-executor"]
42
43FROM zuul-base as zuul-fingergw
44CMD ["/usr/local/bin/zuul-fingergw"]
45
46FROM zuul-base as zuul-merger
47CMD ["/usr/local/bin/zuul-merger"]
48
49FROM zuul-base as zuul-scheduler
50CMD ["/usr/local/bin/zuul-scheduler"]
51
52FROM zuul-base as zuul-web
53CMD ["/usr/local/bin/zuul-web"]
diff --git a/playbooks/quick-start/main.yaml b/playbooks/quick-start/main.yaml
index de8177e..4aeb1e7 100644
--- a/playbooks/quick-start/main.yaml
+++ b/playbooks/quick-start/main.yaml
@@ -9,6 +9,8 @@
9 shell: 9 shell:
10 cmd: docker-compose up -d 10 cmd: docker-compose up -d
11 chdir: ../../doc/source/admin/examples 11 chdir: ../../doc/source/admin/examples
12- name: Print list of images
13 command: docker image ls
12- name: Wait for Gerrit to start 14- name: Wait for Gerrit to start
13 wait_for: 15 wait_for:
14 host: localhost 16 host: localhost
diff --git a/playbooks/quick-start/run.yaml b/playbooks/quick-start/run.yaml
index 12945e7..1f12db1 100644
--- a/playbooks/quick-start/run.yaml
+++ b/playbooks/quick-start/run.yaml
@@ -5,17 +5,8 @@
5 roles: 5 roles:
6 - name: install-docker 6 - name: install-docker
7 use_upstream_docker: false 7 use_upstream_docker: false
8 - build-docker-image
8 tasks: 9 tasks:
9 - name: Install pbrx software
10 command: python3 -m pip install src/git.openstack.org/openstack/pbrx
11 become: yes
12 - name: Build container images
13 command: 'pbrx --debug build-images --prefix=zuul'
14 args:
15 chdir: '{{ zuul.projects[item].src_dir }}'
16 loop:
17 - git.openstack.org/openstack-infra/nodepool
18 - git.openstack.org/openstack-infra/zuul
19 - name: Install docker-compose and git-review 10 - name: Install docker-compose and git-review
20 package: 11 package:
21 name: 12 name:
diff --git a/zuul/driver/bubblewrap/__init__.py b/zuul/driver/bubblewrap/__init__.py
index e4af62e..b015d62 100644
--- a/zuul/driver/bubblewrap/__init__.py
+++ b/zuul/driver/bubblewrap/__init__.py
@@ -193,6 +193,7 @@ class BubblewrapDriver(Driver, WrapperInterface):
193 '--ro-bind', '/lib', '/lib', 193 '--ro-bind', '/lib', '/lib',
194 '--ro-bind', '/bin', '/bin', 194 '--ro-bind', '/bin', '/bin',
195 '--ro-bind', '/sbin', '/sbin', 195 '--ro-bind', '/sbin', '/sbin',
196 '--ro-bind', '/etc/ld.so.cache', '/etc/ld.so.cache',
196 '--ro-bind', '/etc/resolv.conf', '/etc/resolv.conf', 197 '--ro-bind', '/etc/resolv.conf', '/etc/resolv.conf',
197 '--ro-bind', '/etc/hosts', '/etc/hosts', 198 '--ro-bind', '/etc/hosts', '/etc/hosts',
198 '--ro-bind', '/etc/localtime', '/etc/localtime', 199 '--ro-bind', '/etc/localtime', '/etc/localtime',