aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh9
-rwxr-xr-xdeploy.sh2
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/kargo/files/mirrors_aarch64.repo22
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml5
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/pre-k8s/files/centos_base_aarch64.repo22
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/pre-k8s/tasks/RedHat.yml5
-rw-r--r--deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml5
-rwxr-xr-xdeploy/adapters/ansible/roles/post-osa/files/sfc.conf9
-rw-r--r--deploy/adapters/ansible/roles/post-osa/tasks/install_networking_sfc.yml73
-rw-r--r--deploy/adapters/ansible/roles/post-osa/tasks/main.yml7
-rw-r--r--deploy/adapters/ansible/roles/post-osa/vars/main.yml5
-rwxr-xr-xdeploy/host_virtual.sh31
-rwxr-xr-xdeploy/network.sh3
-rw-r--r--deploy/template/vm/host-aarch64.xml58
-rw-r--r--docs/release/installation/k8s-deploy.rst2
-rw-r--r--docs/release/installation/vmdeploy.rst3
-rw-r--r--plugins/dpdk/roles/ins_dpdk/tasks/hugepages.yml2
-rw-r--r--plugins/rt_kvm/roles/rt_kvm/tasks/kvm.yml2
18 files changed, 254 insertions, 11 deletions
diff --git a/build.sh b/build.sh
index 4fd0d19b..103bbb8f 100755
--- a/build.sh
+++ b/build.sh
@@ -13,6 +13,8 @@ COMPASS_PATH=`cd ${BASH_SOURCE[0]%/*};pwd`
WORK_DIR=$COMPASS_PATH/work/building
export CACHE_DIR=$WORK_DIR/cache
+COMPASS_ARCH=$(uname -m)
+
echo $COMPASS_PATH
REDHAT_REL=${REDHAT_REL:-"false"}
@@ -23,12 +25,17 @@ mkdir -p $WORK_DIR $CACHE_DIR
function install_docker_ubuntu()
{
+ REPO_ARCH=amd64
+ if [ "$COMPASS_ARCH" = "aarch64" ]; then
+ REPO_ARCH=arm64
+ fi
+
sudo apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get install -y apt-transport-https ca-certificates curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
+ sudo add-apt-repository "deb [arch=$REPO_ARCH] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
diff --git a/deploy.sh b/deploy.sh
index 2f81af36..bccbbd28 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -30,6 +30,8 @@
export OPENSTACK_VERSION=${OPENSTACK_VERSION:-ocata}
+export COMPASS_ARCH=$(uname -m)
+
if [[ "x"$KUBERNETES_VERSION != "x" ]]; then
unset OPENSTACK_VERSION
fi
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
diff --git a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
index ef7128c5..8d944387 100644
--- a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
+++ b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
@@ -41,7 +41,10 @@
- setup-openstack
- sync-inventory
-- hosts: compute
+- hosts:
+ - compute
+ - utility
+ - neutron_server
remote_user: root
roles:
- post-osa
diff --git a/deploy/adapters/ansible/roles/post-osa/files/sfc.conf b/deploy/adapters/ansible/roles/post-osa/files/sfc.conf
new file mode 100755
index 00000000..ce42c9e1
--- /dev/null
+++ b/deploy/adapters/ansible/roles/post-osa/files/sfc.conf
@@ -0,0 +1,9 @@
+[DEFAULT]
+
+service_plugins = router,metering,flow_classifier,sfc
+
+[sfc]
+drivers = ovs
+
+[flowclassifier]
+drivers = ovs
diff --git a/deploy/adapters/ansible/roles/post-osa/tasks/install_networking_sfc.yml b/deploy/adapters/ansible/roles/post-osa/tasks/install_networking_sfc.yml
new file mode 100644
index 00000000..fbed5815
--- /dev/null
+++ b/deploy/adapters/ansible/roles/post-osa/tasks/install_networking_sfc.yml
@@ -0,0 +1,73 @@
+---
+
+- name: install networking-sfc
+ pip:
+ name: networking-sfc
+ virtualenv: /openstack/venvs/neutron-15.1.4
+ when:
+ - inventory_hostname in groups['neutron_server']
+
+- name: install crudini
+ package:
+ name: crudini
+ state: latest
+ when:
+ - inventory_hostname in groups['neutron_server']
+
+- name: Install networking-sfc for CLI
+ pip:
+ name: networking-sfc
+ when:
+ - inventory_hostname in groups['utility']
+
+- name: turn off neutron-server on control node
+ service: name=neutron-server state=stopped
+ when: inventory_hostname in groups['neutron_server']
+
+- name: copy sfc.conf
+ copy:
+ src: "{{ sfc_plugins.src }}"
+ dest: "{{ sfc_plugins.dst }}"
+ mode: 0755
+ when: inventory_hostname in groups['neutron_server']
+
+- name: Configure SFC driver
+ shell: crudini --merge /etc/neutron/neutron.conf < /opt/sfc.conf
+ when: inventory_hostname in groups['neutron_server']
+
+- name: delete sfc.conf
+ shell: rm -rf {{ sfc_plugins.dst }}
+ when: inventory_hostname in groups['neutron_server']
+
+- name: Perform a Neutron DB online upgrade
+ command: |
+ /openstack/venvs/neutron-15.1.4/bin/neutron-db-manage
+ --config-file /etc/neutron/neutron.conf
+ --config-file /etc/neutron/plugins/ml2/ml2_conf.ini
+ upgrade --expand
+ become: "yes"
+ become_user: "neutron"
+ when: inventory_hostname in groups['neutron_server'][0]
+
+- name: Perform a Neutron DB offline upgrade
+ command: |
+ /openstack/venvs/neutron-15.1.4/bin/neutron-db-manage
+ --config-file /etc/neutron/neutron.conf
+ --config-file /etc/neutron/plugins/ml2/ml2_conf.ini
+ upgrade --contract
+ become: "yes"
+ become_user: "neutron"
+ when: inventory_hostname in groups['neutron_server'][0]
+
+- name: SFC DB upgrade
+ command: |
+ /openstack/venvs/neutron-15.1.4/bin/neutron-db-manage
+ --subproject networking-sfc
+ upgrade head
+ become: "yes"
+ become_user: "neutron"
+ when: inventory_hostname in groups['neutron_server'][0]
+
+- name: turn on neutron-server on control node
+ service: name=neutron-server state=started
+ when: inventory_hostname in groups['neutron_server']
diff --git a/deploy/adapters/ansible/roles/post-osa/tasks/main.yml b/deploy/adapters/ansible/roles/post-osa/tasks/main.yml
index c48a5d1a..f7f7a6cc 100644
--- a/deploy/adapters/ansible/roles/post-osa/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/post-osa/tasks/main.yml
@@ -8,3 +8,10 @@
##############################################################################
---
- include: "{{ ansible_distribution }}.yml"
+ when: inventory_hostname in groups['compute']
+
+# install networking-sfc for non odl scenarios
+- include: install_networking_sfc.yml
+ when:
+ - odl_sfc is not defined or odl_sfc == "Disable"
+ - inventory_hostname not in groups['compute']
diff --git a/deploy/adapters/ansible/roles/post-osa/vars/main.yml b/deploy/adapters/ansible/roles/post-osa/vars/main.yml
new file mode 100644
index 00000000..4feb9756
--- /dev/null
+++ b/deploy/adapters/ansible/roles/post-osa/vars/main.yml
@@ -0,0 +1,5 @@
+---
+
+sfc_plugins:
+ src: sfc.conf
+ dst: /opt/sfc.conf
diff --git a/deploy/host_virtual.sh b/deploy/host_virtual.sh
index bd2f49af..03a1230f 100755
--- a/deploy/host_virtual.sh
+++ b/deploy/host_virtual.sh
@@ -13,14 +13,32 @@ function tear_down_machines() {
IFS=,
for i in $HOSTNAMES; do
sudo virsh destroy $i
- sudo virsh undefine $i
+ if [ "$COMPASS_ARCH" = "aarch64" ]; then
+ # --nvram is required for UEFI enabled VM
+ sudo virsh undefine --nvram $i
+ else
+ sudo virsh undefine $i
+ fi
rm -rf $host_vm_dir/$i
done
IFS=$old_ifs
}
function reboot_hosts() {
- log_warn "reboot_hosts do nothing"
+ # We do need it for aarch64
+ if [ "$COMPASS_ARCH" = "aarch64" ]; then
+ old_ifs=$IFS
+ IFS=,
+ for i in $HOSTNAMES; do
+ sudo virsh destroy $i
+ sleep 3
+ sudo virsh start $i
+ sleep 3
+ done
+ IFS=$old_ifs
+ else
+ log_warn "reboot_hosts do nothing"
+ fi
}
function launch_host_vms() {
@@ -28,6 +46,13 @@ function launch_host_vms() {
IFS=,
#function_bod
mac_array=($machines)
+
+ # Select vm template per arch
+ vm_template_dir="$COMPASS_DIR/deploy/template/vm"
+ vm_template_file="$vm_template_dir/host.xml"
+ vm_template_arch="$vm_template_dir/host-$COMPASS_ARCH.xml"
+ [ -f $vm_template_arch ] && vm_template_file=$vm_template_arch
+
log_info "bringing up pxe boot vms"
i=0
for host in $HOSTNAMES; do
@@ -43,7 +68,7 @@ function launch_host_vms() {
-e "s/REPLACE_BOOT_MAC/${mac_array[i]}/g" \
-e "s/REPLACE_NET_INSTALL/install/g" \
-e "s/REPLACE_NET_IAAS/external_nat/g" \
- $COMPASS_DIR/deploy/template/vm/host.xml\
+ "$vm_template_file" \
> $vm_dir/libvirt.xml
sudo virsh define $vm_dir/libvirt.xml
diff --git a/deploy/network.sh b/deploy/network.sh
index 218dc1d6..698771b3 100755
--- a/deploy/network.sh
+++ b/deploy/network.sh
@@ -29,6 +29,7 @@ function setup_bridge_net()
sudo virsh net-define $WORK_DIR/network/$net_name.xml
sudo virsh net-start $net_name
+ sudo virsh net-autostart $net_name
}
function recover_bridge_net()
@@ -83,6 +84,7 @@ function setup_bridge_external()
sudo virsh net-define $WORK_DIR/network/external.xml
sudo virsh net-start external
+ sudo virsh net-autostart external
python $COMPASS_DIR/deploy/setup_vnic.py
}
@@ -115,6 +117,7 @@ function setup_nat_net() {
sudo virsh net-define $WORK_DIR/network/$net_name.xml
sudo virsh net-start $net_name
+ sudo virsh net-autostart $net_name
}
function recover_nat_net() {
diff --git a/deploy/template/vm/host-aarch64.xml b/deploy/template/vm/host-aarch64.xml
new file mode 100644
index 00000000..7f32a198
--- /dev/null
+++ b/deploy/template/vm/host-aarch64.xml
@@ -0,0 +1,58 @@
+<domain type='kvm'>
+ <name>REPLACE_NAME</name>
+ <memory unit='MiB'>REPLACE_MEM</memory>
+ <currentMemory unit='MiB'>REPLACE_MEM</currentMemory>
+ <vcpu placement='static'>REPLACE_CPU</vcpu>
+ <os>
+ <type arch='aarch64' machine='virt'>hvm</type>
+ <loader readonly='yes' type='pflash'>/usr/share/AAVMF/AAVMF_CODE.fd</loader>
+ <boot dev='hd'/>
+ <boot dev='network'/>
+ </os>
+ <features>
+ <gic version='2'/>
+ </features>
+ <cpu mode='host-passthrough'/>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-aarch64</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source file='REPLACE_IMAGE'/>
+ <target dev='sda' bus='scsi'/>
+ </disk>
+ <controller type='scsi' index='0' model='virtio-scsi'>
+ <address type='virtio-mmio'/>
+ </controller>
+ <interface type='network'>
+ <mac address=REPLACE_BOOT_MAC/>
+ <source network='REPLACE_NET_INSTALL'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <source network='REPLACE_NET_IAAS'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <source network='default'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+ </interface>
+ <interface type='network'>
+ <source network='default'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+ </interface>
+ <serial type='pty'>
+ <target port='0'/>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ </devices>
+</domain>
diff --git a/docs/release/installation/k8s-deploy.rst b/docs/release/installation/k8s-deploy.rst
index 65f638cb..49025ee3 100644
--- a/docs/release/installation/k8s-deploy.rst
+++ b/docs/release/installation/k8s-deploy.rst
@@ -20,7 +20,7 @@ If you want to deploy noha with1 controller and 1 compute, run the following com
export SCENARIO=k8-nosdn-nofeature-noha.yml
export VIRT_NUMBER=2
- curl https://raw.githubusercontent.com/opnfv/compass4nfv/euphrates/quickstart_k8s.sh | bash
+ curl https://raw.githubusercontent.com/opnfv/compass4nfv/stable/euphrates/quickstart_k8s.sh | bash
Installation of K8s on Bare Metal
=================================
diff --git a/docs/release/installation/vmdeploy.rst b/docs/release/installation/vmdeploy.rst
index 16fb28d3..5db934be 100644
--- a/docs/release/installation/vmdeploy.rst
+++ b/docs/release/installation/vmdeploy.rst
@@ -17,9 +17,10 @@ Only 1 command to try virtual deployment, if you have Internet access. Just Past
If you want to deploy noha with1 controller and 1 compute, run the following command
.. code-block:: bash
+
export SCENARIO=os-nosdn-nofeature-noha.yml
export VIRT_NUMBER=2
- curl https://raw.githubusercontent.com/opnfv/compass4nfv/euphrates/quickstart.sh | bash
+ curl https://raw.githubusercontent.com/opnfv/compass4nfv/stable/euphrates/quickstart.sh | bash
Nodes Configuration (Virtual Deployment)
----------------------------------------
diff --git a/plugins/dpdk/roles/ins_dpdk/tasks/hugepages.yml b/plugins/dpdk/roles/ins_dpdk/tasks/hugepages.yml
index 3f41cf03..d68fc031 100644
--- a/plugins/dpdk/roles/ins_dpdk/tasks/hugepages.yml
+++ b/plugins/dpdk/roles/ins_dpdk/tasks/hugepages.yml
@@ -41,5 +41,5 @@
- name: Wait for reboot
local_action:
module: wait_for
- host={{ ansible_eth0.ipv4.address }} port=22 delay=1 timeout=300
+ host={{ ansible_eth0.ipv4.address }} port=22 delay=10 timeout=1200
when: check_result.rc == 1
diff --git a/plugins/rt_kvm/roles/rt_kvm/tasks/kvm.yml b/plugins/rt_kvm/roles/rt_kvm/tasks/kvm.yml
index 5d3ca7bc..289ab19d 100644
--- a/plugins/rt_kvm/roles/rt_kvm/tasks/kvm.yml
+++ b/plugins/rt_kvm/roles/rt_kvm/tasks/kvm.yml
@@ -37,4 +37,4 @@
- name: wait for reboot
local_action:
module: wait_for
- host={{ ansible_eth0.ipv4.address }} port=22 delay=1 timeout=600
+ host={{ ansible_eth0.ipv4.address }} port=22 delay=10 timeout=1200