From 5d3229aed36c9038b3f5b6098c1b36abfab25e62 Mon Sep 17 00:00:00 2001 From: Yibo Cai Date: Tue, 7 Nov 2017 14:11:54 +0800 Subject: k8s: add package repo for aarch64 Use architecture specific repo if available, otherwise fallback to default(x86_64) repo. Change-Id: I82f483494827564ae0e294d0c88c4080338c5634 Signed-off-by: Yibo Cai --- .../roles/kargo/files/mirrors_aarch64.repo | 22 ++++++++++++++++++++++ .../ansible/kubernetes/roles/kargo/tasks/main.yml | 5 ++++- .../roles/pre-k8s/files/centos_base_aarch64.repo | 22 ++++++++++++++++++++++ .../kubernetes/roles/pre-k8s/tasks/RedHat.yml | 5 ++++- 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 deploy/adapters/ansible/kubernetes/roles/kargo/files/mirrors_aarch64.repo create mode 100644 deploy/adapters/ansible/kubernetes/roles/pre-k8s/files/centos_base_aarch64.repo (limited to 'deploy') diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/files/mirrors_aarch64.repo b/deploy/adapters/ansible/kubernetes/roles/kargo/files/mirrors_aarch64.repo new file mode 100644 index 00000000..1d622d3c --- /dev/null +++ b/deploy/adapters/ansible/kubernetes/roles/kargo/files/mirrors_aarch64.repo @@ -0,0 +1,22 @@ +[base] +name=CentOS-$releasever - Base +baseurl=http://mirror.centos.org/altarch/$releasever/os/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64 + +#released updates +[updates] +name=CentOS-$releasever - Updates +baseurl=http://mirror.centos.org/altarch/$releasever/updates/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64 + +#additional packages that may be useful +[extras] +name=CentOS-$releasever - Extras +baseurl=http://mirror.centos.org/altarch/$releasever/extras/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64 diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml index 16d0b2c0..a40778f5 100644 --- a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml +++ b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml @@ -21,8 +21,11 @@ - name: configure local mirror repo copy: - src: mirrors.repo + src: "{{ item }}" dest: /etc/yum.repos.d/mirrors.repo + with_first_found: + - mirrors_{{ ansible_architecture }}.repo + - mirrors.repo run_once: "True" - name: clean local pip conf to use official pip repo diff --git a/deploy/adapters/ansible/kubernetes/roles/pre-k8s/files/centos_base_aarch64.repo b/deploy/adapters/ansible/kubernetes/roles/pre-k8s/files/centos_base_aarch64.repo new file mode 100644 index 00000000..1d622d3c --- /dev/null +++ b/deploy/adapters/ansible/kubernetes/roles/pre-k8s/files/centos_base_aarch64.repo @@ -0,0 +1,22 @@ +[base] +name=CentOS-$releasever - Base +baseurl=http://mirror.centos.org/altarch/$releasever/os/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64 + +#released updates +[updates] +name=CentOS-$releasever - Updates +baseurl=http://mirror.centos.org/altarch/$releasever/updates/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64 + +#additional packages that may be useful +[extras] +name=CentOS-$releasever - Extras +baseurl=http://mirror.centos.org/altarch/$releasever/extras/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64 diff --git a/deploy/adapters/ansible/kubernetes/roles/pre-k8s/tasks/RedHat.yml b/deploy/adapters/ansible/kubernetes/roles/pre-k8s/tasks/RedHat.yml index 58af0f7b..8e410e15 100644 --- a/deploy/adapters/ansible/kubernetes/roles/pre-k8s/tasks/RedHat.yml +++ b/deploy/adapters/ansible/kubernetes/roles/pre-k8s/tasks/RedHat.yml @@ -51,5 +51,8 @@ - name: change sources(yum) list copy: - src: centos_base.repo + src: "{{ item }}" dest: /etc/yum.repos.d/centos_base.repo + with_first_found: + - centos_base_{{ ansible_architecture }}.repo + - centos_base.repo -- cgit 1.2.3-korg