support deploying k8s above ubuntu on arm 27/55327/2
authorYibo Cai <yibo.cai@arm.com>
Tue, 10 Apr 2018 05:35:22 +0000 (13:35 +0800)
committerYibo Cai <yibo.cai@arm.com>
Tue, 10 Apr 2018 10:14:21 +0000 (10:14 +0000)
Change-Id: I5642c866423728a8cdbbc3ea82969e6aec346981
Signed-off-by: Yibo Cai <yibo.cai@arm.com>
deploy/adapters/ansible/kubernetes/roles/install-k8s-dependence/tasks/main.yml
deploy/adapters/ansible/kubernetes/roles/install-k8s-dependence/vars/Debian.yml
deploy/adapters/ansible/kubernetes/roles/kargo/files/extra-vars-aarch64.yml
deploy/adapters/ansible/kubernetes/roles/pre-k8s/files/sources.list.official.aarch64 [new file with mode: 0644]
deploy/adapters/ansible/kubernetes/roles/pre-k8s/tasks/Ubuntu.yml

index 4f8ca00..af23441 100644 (file)
@@ -25,5 +25,5 @@
     pkg: "{{ item }}"
     state: "present"
     update_cache: 'yes'
-  with_items: "{{ packages }}"
+  with_items: "{{ vars['packages_' + ansible_architecture] }}"
   when: ansible_os_family == 'Debian'
index 0453dc4..6be9e06 100644 (file)
@@ -1,5 +1,5 @@
 ---
-packages:
+packages_x86_64:
   - ubuntu-cloud-keyring
   - python-dev
   - python-pip
@@ -11,6 +11,17 @@ packages:
   - python-crypto
   - git
 
+packages_aarch64:
+  - ubuntu-cloud-keyring
+  - python-dev
+  - python-pip
+  - openvswitch-switch
+  - python-memcache
+  - python-iniparse
+  - python-lxml
+  - python-crypto
+  - git
+
 pip_packages:
   - crudini
   - python-keyczar
index 26e3fa7..c1357bf 100644 (file)
@@ -18,16 +18,3 @@ cluster-proportional-autoscaler-arm64"
 # inventory/group_vars/k8s-cluster.yml
 kube_network_plugin: flannel
 helm_enabled: false
-docker_options: "--insecure-registry={{ kube_service_addresses }} \
---graph={{ docker_daemon_graph }}  {{ docker_log_opts }} \
---add-runtime docker-runc=/usr/libexec/docker/docker-runc-current \
---default-runtime=docker-runc \
---exec-opt native.cgroupdriver=systemd \
---userland-proxy-path=/usr/libexec/docker/docker-proxy-current \
---signature-verification=false"
-
-# roles/docker/vars/redhat.yml
-docker_package_info:
-  pkg_mgr: yum
-  pkgs:
-    - name: docker
diff --git a/deploy/adapters/ansible/kubernetes/roles/pre-k8s/files/sources.list.official.aarch64 b/deploy/adapters/ansible/kubernetes/roles/pre-k8s/files/sources.list.official.aarch64
new file mode 100644 (file)
index 0000000..f4a3f5e
--- /dev/null
@@ -0,0 +1,54 @@
+# deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial main restricted
+
+# deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted
+# deb http://ports.ubuntu.com/ubuntu-ports xenial-security main restricted
+
+# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
+# newer versions of the distribution.
+deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial main restricted
+deb-src http://us.ports.ubuntu.com/ubuntu-ports/ xenial main restricted
+
+## Major bug fix updates produced after the final release of the
+## distribution.
+deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted
+deb-src http://us.ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted
+
+## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
+## team. Also, please note that software in universe WILL NOT receive any
+## review or updates from the Ubuntu security team.
+deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial universe
+deb-src http://us.ports.ubuntu.com/ubuntu-ports/ xenial universe
+deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial-updates universe
+deb-src http://us.ports.ubuntu.com/ubuntu-ports/ xenial-updates universe
+
+## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
+## team, and may not be under a free licence. Please satisfy yourself as to
+## your rights to use the software. Also, please note that software in
+## multiverse WILL NOT receive any review or updates from the Ubuntu
+## security team.
+deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial multiverse
+deb-src http://us.ports.ubuntu.com/ubuntu-ports/ xenial multiverse
+deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial-updates multiverse
+deb-src http://us.ports.ubuntu.com/ubuntu-ports/ xenial-updates multiverse
+
+## N.B. software from this repository may not have been tested as
+## extensively as that contained in the main release, although it includes
+## newer versions of some applications which may provide useful features.
+## Also, please note that software in backports WILL NOT receive any review
+## or updates from the Ubuntu security team.
+deb http://us.ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted universe multiverse
+deb-src http://us.ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted universe multiverse
+
+## Uncomment the following two lines to add software from Canonical's
+## 'partner' repository.
+## This software is not part of Ubuntu, but is offered by Canonical and the
+## respective vendors as a service to Ubuntu users.
+# deb http://archive.canonical.com/ubuntu xenial partner
+# deb-src http://archive.canonical.com/ubuntu xenial partner
+
+deb http://ports.ubuntu.com/ubuntu-ports xenial-security main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports xenial-security main restricted
+deb http://ports.ubuntu.com/ubuntu-ports xenial-security universe
+deb-src http://ports.ubuntu.com/ubuntu-ports xenial-security universe
+deb http://ports.ubuntu.com/ubuntu-ports xenial-security multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports xenial-security multiverse
index 44e3b1f..b4ef927 100644 (file)
 - name: remove the space end of the line in the resolv.conf
   shell: "sed -i 's/ *$//' /etc/resolv.conf"
 
+- name: remove estuary overlay and update apt cache
+  shell: rm -f /etc/apt/sources.list.d/estuary.list && apt-get update
+  when: ansible_architecture == "aarch64"
+
 - name: change sources list
   copy:
-    src: sources.list.official
+    src: "{{ item }}"
     dest: /etc/apt/sources.list
+  with_first_found:
+    - sources.list.official.{{ ansible_architecture }}
+    - sources.list.official
 
 - name: restart ntp service
   shell: "service ntp restart"