Gate: use infra mirror when in infra for kubeadm aio image
This PS uses the infra mirrors in the kubeadm aio build when running the gate in openstack-infra. Change-Id: Id9a4bf2b13051dfcf5aea688511da24cd245de9c
This commit is contained in:
parent
0b3307769e
commit
dd92edfb58
@ -20,12 +20,16 @@
|
||||
./tools/deployment/developer/000-install-packages.sh
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
environment:
|
||||
zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
|
||||
- name: Deploy Kubernetes
|
||||
shell: |
|
||||
set -xe;
|
||||
./tools/deployment/developer/005-deploy-k8s.sh
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
environment:
|
||||
zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
|
||||
- name: Deploy Registry NFS, Redis, and Docker Registry
|
||||
shell: |
|
||||
set -xe;
|
||||
|
@ -12,6 +12,11 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: set zuul_site_mirror_fqdn from env var if not defined
|
||||
when: zuul_site_mirror_fqdn is not defined
|
||||
set_fact:
|
||||
zuul_site_mirror_fqdn: "{{ lookup('env','zuul_site_mirror_fqdn') }}"
|
||||
|
||||
#NOTE(portdirect): Untill https://github.com/ansible/ansible/issues/21433 is
|
||||
# reolved, we build with a shell script to make use of the host network.
|
||||
- name: Kubeadm-AIO build
|
||||
@ -51,6 +56,12 @@
|
||||
--build-arg HTTP_PROXY="{{ proxy.http }}" \
|
||||
--build-arg HTTPS_PROXY="{{ proxy.https }}" \
|
||||
--build-arg NO_PROXY="{{ proxy.noproxy }}" \
|
||||
{% if zuul_site_mirror_fqdn is defined and zuul_site_mirror_fqdn %}
|
||||
--build-arg UBUNTU_URL="http://{{ zuul_site_mirror_fqdn }}/ubuntu/" \
|
||||
--build-arg ALLOW_UNAUTHENTICATED="true" \
|
||||
--build-arg PIP_INDEX_URL="http://{{ zuul_site_mirror_fqdn }}/pypi/simple" \
|
||||
--build-arg PIP_TRUSTED_HOST="{{ zuul_site_mirror_fqdn }}" \
|
||||
{% endif %}
|
||||
.
|
||||
args:
|
||||
chdir: "{{ kubeadm_aio_path.stdout }}/"
|
||||
@ -68,6 +79,12 @@
|
||||
--build-arg CNI_VERSION="{{ version.cni }}" \
|
||||
--build-arg HELM_VERSION="{{ version.helm }}" \
|
||||
--build-arg CHARTS="calico,flannel,tiller,kube-dns" \
|
||||
{% if zuul_site_mirror_fqdn is defined and zuul_site_mirror_fqdn %}
|
||||
--build-arg UBUNTU_URL="http://{{ zuul_site_mirror_fqdn }}/ubuntu/" \
|
||||
--build-arg ALLOW_UNAUTHENTICATED="true" \
|
||||
--build-arg PIP_INDEX_URL="http://{{ zuul_site_mirror_fqdn }}/pypi/simple" \
|
||||
--build-arg PIP_TRUSTED_HOST="{{ zuul_site_mirror_fqdn }}" \
|
||||
{% endif %}
|
||||
.
|
||||
args:
|
||||
chdir: "{{ kubeadm_aio_path.stdout }}/"
|
||||
|
@ -12,10 +12,22 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#https://github.com/kubernetes/kubernetes/tree/master/build/debian-base
|
||||
FROM gcr.io/google-containers/debian-base-amd64:0.3
|
||||
FROM docker.io/ubuntu:xenial
|
||||
MAINTAINER pete.birley@att.com
|
||||
|
||||
ARG UBUNTU_URL=http://archive.ubuntu.com/ubuntu/
|
||||
ARG ALLOW_UNAUTHENTICATED=false
|
||||
ARG PIP_INDEX_URL=https://pypi.python.org/simple/
|
||||
ARG PIP_TRUSTED_HOST=pypi.python.org
|
||||
ENV PIP_INDEX_URL=${PIP_INDEX_URL}
|
||||
ENV PIP_TRUSTED_HOST=${PIP_TRUSTED_HOST}
|
||||
|
||||
COPY ./tools/images/kubeadm-aio/sources.list /etc/apt/
|
||||
RUN sed -i \
|
||||
-e "s|%%UBUNTU_URL%%|${UBUNTU_URL}|g" \
|
||||
/etc/apt/sources.list ;\
|
||||
echo "APT::Get::AllowUnauthenticated \"${ALLOW_UNAUTHENTICATED}\";" > /etc/apt/apt.conf.d/allow-unathenticated
|
||||
|
||||
ARG KUBE_VERSION="v1.10.2"
|
||||
ENV KUBE_VERSION ${KUBE_VERSION}
|
||||
|
||||
|
4
tools/images/kubeadm-aio/sources.list
Normal file
4
tools/images/kubeadm-aio/sources.list
Normal file
@ -0,0 +1,4 @@
|
||||
deb %%UBUNTU_URL%% xenial main universe
|
||||
deb %%UBUNTU_URL%% xenial-updates main universe
|
||||
deb %%UBUNTU_URL%% xenial-backports main universe
|
||||
deb %%UBUNTU_URL%% xenial-security main universe
|
Loading…
Reference in New Issue
Block a user