Update IPA to use latest version
* Create new ipa image for wallaby release Change-Id: I0f4cb325e41d86600cadb0bba3c1bdcfd31d6fa4
This commit is contained in:
parent
3a67e486dd
commit
2e1daa9152
19
ipa-downloader-image-wallaby/Dockerfile
Normal file
19
ipa-downloader-image-wallaby/Dockerfile
Normal file
@ -0,0 +1,19 @@
|
||||
FROM ubuntu:20.04 as downloader
|
||||
ARG BRANCH=stable/wallaby
|
||||
|
||||
ENV DIB_DHCP_TIMEOUT=60 \
|
||||
DIB_REPOLOCATION_ironic_python_agent=/ironic-python-agent \
|
||||
DIB_REPOLOCATION_requirements=/requirements \
|
||||
DIB_DEV_USER_USERNAME=devuser \
|
||||
DIB_DEV_USER_PASSWORD=password \
|
||||
DIB_DEV_USER_PWDLESS_SUDO=yes \
|
||||
AUTHORIZE_SSH=true \
|
||||
DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
|
||||
RUN set -ex ;\
|
||||
apt-get update ;\
|
||||
apt-get install git python3-pip qemu-utils sudo curl squashfs-tools cpio -y ;\
|
||||
git clone https://opendev.org/openstack/ironic-python-agent.git -b ${BRANCH} /ironic-python-agent ;\
|
||||
git clone https://opendev.org/openstack/requirements.git -b ${BRANCH} /requirements ;\
|
||||
pip3 install --user diskimage-builder ironic-python-agent-builder
|
2
ipa-downloader-image-wallaby/Dockerfile.ipa
Normal file
2
ipa-downloader-image-wallaby/Dockerfile.ipa
Normal file
@ -0,0 +1,2 @@
|
||||
FROM ubuntu:20.04
|
||||
COPY ./ipa-ubuntu-master.* /
|
97
ipa-downloader-image-wallaby/Makefile
Normal file
97
ipa-downloader-image-wallaby/Makefile
Normal file
@ -0,0 +1,97 @@
|
||||
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
|
||||
#
|
||||
# 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.
|
||||
|
||||
SHELL := /bin/bash
|
||||
PUSH_IMAGE ?= false
|
||||
IMAGE_ID ?= none
|
||||
COMMIT ?= $(shell git rev-parse HEAD)
|
||||
LABEL ?= org.airshipit.build=community
|
||||
IMAGE_NAME ?= ipa-wallaby
|
||||
DOCKER_REGISTRY ?= quay.io
|
||||
IMAGE_PREFIX ?= airshipit
|
||||
IMAGE_TAG ?= latest
|
||||
IMAGE_IPA_NAME ?= ipa-builder
|
||||
BRANCH ?= stable/wallaby
|
||||
IMAGE := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${IMAGE_NAME}:${IMAGE_TAG}
|
||||
IMAGE_IPABUILDER := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${IMAGE_IPA_NAME}:${IMAGE_TAG}
|
||||
PROXY ?= http://proxy.foo.com:8000
|
||||
NO_PROXY ?= localhost,127.0.0.1,.svc.cluster.local
|
||||
USE_PROXY ?= false
|
||||
|
||||
|
||||
build_ipa:
|
||||
ifeq ($(USE_PROXY), true)
|
||||
sudo docker build . \
|
||||
--tag $(IMAGE_IPABUILDER) \
|
||||
--label $(LABEL) \
|
||||
--label "org.opencontainers.image.revision=$(COMMIT)" \
|
||||
--label "org.opencontainers.image.created=\
|
||||
$(shell date --rfc-3339=seconds --utc)" \
|
||||
--label "org.opencontainers.image.title=$(IMAGE_NAME)" \
|
||||
--build-arg BRANCH=$(BRANCH) \
|
||||
--build-arg http_proxy=$(PROXY) \
|
||||
--build-arg https_proxy=$(PROXY) \
|
||||
--build-arg HTTP_PROXY=$(PROXY) \
|
||||
--build-arg HTTPS_PROXY=$(PROXY) \
|
||||
--build-arg no_proxy=$(NO_PROXY) \
|
||||
--build-arg NO_PROXY=$(NO_PROXY)
|
||||
|
||||
sudo docker run --name ipa-builder \
|
||||
--privileged $(IMAGE_IPABUILDER) \
|
||||
/bin/bash -c "export PATH=$$PATH:/root/.local/bin/ && \
|
||||
export http_proxy=$(PROXY) && export https_proxy=$(PROXY) && \
|
||||
ironic-python-agent-builder -o ipa-ubuntu-master -b HEAD -v --extra-args=--no-tmpfs --element='extra-hardware' -e devuser ubuntu"
|
||||
else
|
||||
sudo docker build . \
|
||||
--tag $(IMAGE_IPABUILDER) \
|
||||
--label $(LABEL) \
|
||||
--label "org.opencontainers.image.revision=$(COMMIT)" \
|
||||
--label "org.opencontainers.image.created=\
|
||||
$(shell date --rfc-3339=seconds --utc)" \
|
||||
--label "org.opencontainers.image.title=$(IMAGE_NAME)" \
|
||||
--build-arg BRANCH=$(BRANCH)
|
||||
|
||||
sudo docker run --name ipa-builder \
|
||||
--privileged $(IMAGE_IPABUILDER) \
|
||||
/bin/bash -c "export PATH=$$PATH:/root/.local/bin/ && \
|
||||
ironic-python-agent-builder -o ipa-ubuntu-master -b HEAD -v --extra-args=--no-tmpfs --element='extra-hardware' -e devuser ubuntu"
|
||||
endif
|
||||
|
||||
sudo docker cp $$(sudo docker ps -a | grep ipa-builder | awk '{print $$1}'):/ipa-ubuntu-master.initramfs .
|
||||
sudo docker cp $$(sudo docker ps -a | grep ipa-builder | awk '{print $$1}'):/ipa-ubuntu-master.kernel .
|
||||
|
||||
|
||||
sudo docker build . -f Dockerfile.ipa \
|
||||
--tag $(IMAGE) \
|
||||
--label $(LABEL) \
|
||||
--label "org.opencontainers.image.revision=$(COMMIT)" \
|
||||
--label "org.opencontainers.image.created=\
|
||||
$(shell date --rfc-3339=seconds --utc)" \
|
||||
--label "org.opencontainers.image.title=$(IMAGE_NAME)"
|
||||
|
||||
ifeq ($(PUSH_IMAGE), true)
|
||||
docker push $(IMAGE)
|
||||
endif
|
||||
|
||||
|
||||
images: build_ipa
|
||||
|
||||
tests:
|
||||
echo TODO
|
||||
|
||||
clean:
|
||||
docker image rm $(IMAGE)
|
||||
# TODO: Clean up ipa builder container/image/artifacts
|
||||
|
||||
.PHONY: images build_ipa tests clean
|
8
ipa-downloader-image-wallaby/README.md
Normal file
8
ipa-downloader-image-wallaby/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
# ipa-downloader-image
|
||||
|
||||
[ironic python agent](https://docs.openstack.org/ironic-python-agent/latest/) serving image.
|
||||
|
||||
This image serves the ironic python agent that is used to inspect nodes by ironic
|
||||
|
||||
|
||||
This agent can be overriden by passing IPA_BASEURI as build argument.
|
Loading…
Reference in New Issue
Block a user