summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2019-01-24 08:02:04 -0800
committerMonty Taylor <mordred@inaugust.com>2019-01-24 16:11:12 +0000
commitf274c0f6bfd35ae562a158746b9457d3571978c9 (patch)
tree03276924fced38382f939a73a0f4bc4f7cf10697
parent44ae87c3105b44e3c21aa6c4077e4792d9bcb2a0 (diff)
Build images with Dockerfile instead of pbrx
Use the opendevorg/python-builder image to build nodepool images with a Dockerfile and multi-stage builds. bindep wasn't installing gcc for dpkg. Remove the platform restrictions for it. Change-Id: I0282b75ffad3d0ae1b589381010a3d4273fceb07
Notes
Notes (review): Code-Review+2: Tobias Henkel <tobias.henkel@bmw.de> Code-Review+2: James E. Blair <corvus@inaugust.com> Workflow+1: James E. Blair <corvus@inaugust.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Sun, 27 Jan 2019 09:33:00 +0000 Reviewed-on: https://review.openstack.org/632187 Project: openstack-infra/nodepool Branch: refs/heads/master
-rw-r--r--.dockerignore3
-rw-r--r--.zuul.yaml70
-rw-r--r--Dockerfile33
-rw-r--r--bindep.txt2
4 files changed, 97 insertions, 11 deletions
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..aff58c2
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,3 @@
1.mypy_cache
2.stestr
3.tox
diff --git a/.zuul.yaml b/.zuul.yaml
index efd99e2..d060d59 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -155,6 +155,61 @@
155 required-projects: 155 required-projects:
156 - openstack-infra/nodepool 156 - openstack-infra/nodepool
157 157
158- secret:
159 name: nodepool-dockerhub
160 data:
161 username: zuulzuul
162 password: !encrypted/pkcs1-oaep
163 - VV5m4XbsYvAz0/7T+WoIypvD3ijRsPYrGo4O5JuOHt6TX14s9B1KddeMwnabEEKapPdbb
164 cwqbzFKoHRMi8DdXiDKxrgbTSC1jb3BvKq7XE0/xF4Bq2dM+r3yDnXS6a7BuijSqFSiMG
165 /9bf0jqEAWXWCvbYUAxKOklJIRLjcKywCP5CulmW6EV8f1Iya8Y7UGpjGyL34FVQuc52Y
166 5MLp+Dra95pvBJMgikbu7LtMPCXOMctUFBpwNArCjWKGhz00UZwyAmsbPPHwQWb+884ZP
167 v9zi2FuRAL+rn4DRVwyIw28ZdCEr5F5EkZon3lSIhikhdQIyHPtW8VwMJTL4RxBdmgcEt
168 +zZBbLlOU+0AHPGLlO/yQNvHeSzwY9pe2oIGuqSu3h6zp6Y0NIE/Q0VpiIXWpOAnLOmno
169 uOd3j9tZ1beol2mg4Yk7rOaXu1Fvtfhd1K3LpLzEbiGzCMIEZuFHU2ZInAbUmtm0BtbDa
170 /bYvI9dB/uqA2xgse5rVMa++v3AfWJTJhFY/wBU4fHOWlFBUZKFuSoijUcWMfnfMMyU2B
171 A5CQKhv4Wmtzbvo/oneYkwFOTYaPNj2DS0BcFJFkR8FZDYmTBPnKoBH5wpwwnrzPOpCMa
172 L21z+Vp1Vce1XCsaOduMrmZDvuQcK1YOKIIUeElAQw8GuwTfcXqekoPvp54SeE=
173
174- job:
175 name: nodepool-build-image
176 parent: build-docker-image
177 description: Build Docker images.
178 vars: &nodepool_image_vars
179 docker_images:
180 - context: .
181 repository: zuul/nodepool-base
182 target: nodepool-base
183 - context: .
184 repository: zuul/nodepool
185 target: nodepool
186 - context: .
187 repository: zuul/nodepool-launcher
188 target: nodepool-launcher
189 - context: .
190 repository: zuul/nodepool-builder
191 target: nodepool-builder
192
193- job:
194 name: nodepool-upload-image
195 parent: upload-docker-image
196 description: Build Docker images and upload to Docker Hub.
197 vars: *nodepool_image_vars
198 secrets:
199 - name: docker_credentials
200 secret: nodepool-dockerhub
201 pass-to-parent: true
202
203- job:
204 name: nodepool-promote-image
205 parent: promote-docker-image
206 description: Promote previously uploaded Docker images.
207 vars: *nodepool_image_vars
208 secrets:
209 - name: docker_credentials
210 secret: nodepool-dockerhub
211 pass-to-parent: true
212
158- project: 213- project:
159 check: 214 check:
160 jobs: 215 jobs:
@@ -171,9 +226,7 @@
171 voting: false 226 voting: false
172 - nodepool-functional-k8s 227 - nodepool-functional-k8s
173 - nodepool-functional-openshift 228 - nodepool-functional-openshift
174 - pbrx-build-container-images: 229 - nodepool-build-image
175 vars:
176 pbrx_prefix: zuul
177 - zuul-quick-start 230 - zuul-quick-start
178 gate: 231 gate:
179 jobs: 232 jobs:
@@ -182,17 +235,14 @@
182 - tox-py35 235 - tox-py35
183 - tox-py36: 236 - tox-py36:
184 nodeset: ubuntu-bionic 237 nodeset: ubuntu-bionic
185 - pbrx-build-container-images:
186 vars:
187 pbrx_prefix: zuul
188 - zuul-quick-start 238 - zuul-quick-start
239 - nodepool-upload-image
189 post: 240 post:
190 jobs: 241 jobs:
191 - publish-zuul-docs 242 - publish-zuul-docs
192 - openstackzuul-pbrx-push-container-images: 243 promote:
193 vars: 244 jobs:
194 pbrx_prefix: zuul 245 - nodepool-promote-image
195
196 experimental: 246 experimental:
197 jobs: 247 jobs:
198 - nodepool-functional-py35-debian-src 248 - nodepool-functional-py35-debian-src
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..f6d6bf2
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,33 @@
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 assemble
20
21FROM opendevorg/python-base as nodepool-base
22
23COPY --from=builder /output/ /output
24RUN /output/install-from-bindep
25
26FROM nodepool-base as nodepool
27CMD ["/usr/local/bin/nodepool"]
28
29FROM nodepool-base as nodepool-launcher
30CMD ["/usr/local/bin/nodepool-launcher"]
31
32FROM nodepool-base as nodepool-builder
33CMD ["/usr/local/bin/nodepool-builder"]
diff --git a/bindep.txt b/bindep.txt
index 510b026..c87ac39 100644
--- a/bindep.txt
+++ b/bindep.txt
@@ -1,7 +1,7 @@
1# This is a cross-platform list tracking distribution packages needed by tests; 1# This is a cross-platform list tracking distribution packages needed by tests;
2# see http://docs.openstack.org/infra/bindep/ for additional information. 2# see http://docs.openstack.org/infra/bindep/ for additional information.
3 3
4gcc [compile test platform:rpm platform:apk] 4gcc [compile test]
5libffi-devel [platform:rpm] 5libffi-devel [platform:rpm]
6libffi-dev [platform:dpkg] 6libffi-dev [platform:dpkg]
7libffi-dev [compile test platform:apk] 7libffi-dev [compile test platform:apk]