summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README1
-rw-r--r--deploy.env1
-rw-r--r--docs/deployment-guide.rst60
-rwxr-xr-xfunctions.sh9
-rwxr-xr-xhw_config/ericsson-pod1/setup_network.sh2
-rw-r--r--hw_config/intel/idf.yaml4
-rw-r--r--hw_config/intel/pdf.yaml4
-rw-r--r--tox.ini4
8 files changed, 75 insertions, 10 deletions
diff --git a/README b/README
deleted file mode 100644
index f9bf1ab..0000000
--- a/README
+++ /dev/null
@@ -1 +0,0 @@
-#TODO
diff --git a/deploy.env b/deploy.env
index 602dfd8..07d1bf3 100644
--- a/deploy.env
+++ b/deploy.env
@@ -10,3 +10,4 @@ export BRIDGE=pxebr
export VM_NAME=$(yq r $CURRENTPATH/hw_config/$VENDOR/pdf.yaml jumphost.name)
export USERNAME=ubuntu
export PROJECT_ROOT="/home/ubuntu"
+export ROOT_PASSWORD="root" # This is used for throubleshooting purposes
diff --git a/docs/deployment-guide.rst b/docs/deployment-guide.rst
new file mode 100644
index 0000000..0875bcf
--- /dev/null
+++ b/docs/deployment-guide.rst
@@ -0,0 +1,60 @@
+===================================
+Welcome to Kuberef's documentation!
+===================================
+
+Introduction
+============
+
+Kuberef aims to develop and deliver a Kubernetes-based reference
+implementation according to CNTT RA-2 in close collaboration with the
+CNTT RI-2 workstream.
+
+The entire implementation is divided into two stages - Host provisioning
+and Kubernetes provisioning.
+
+This guide describes how to get started with a potential RI-2 deployment
+using `Cloud Infra Automation Framework <https://docs.nordix.org/submodules/infra/engine/docs/user-guide.html#framework-user-guide>`_
+for the Host provisioning stage and Intel's `BMRA <https://github.com/intel/container-experience-kits>`_
+for the Kubernetes provisioning stage.
+
+.. note::
+
+ This is just an example of a possible RI-2 deployment. Kuberef aims to
+ support and include other potential hardware and Kubernetes deployers as well. More
+ details can be found in the `Kuberef Wiki <https://wiki.opnfv.org/spaces/viewspace.action?key=KUB>`_.
+
+Infrastructure Prerequisites
+=============================
+
+You need one physical server acting as a jump server along with minimum of two additional
+servers on which RI-2 will be deployed. Please refer to Chapter 3 in CNTT RI-2 Documentation
+for detailed information on the server and network specifications.
+
+Additionally, please make sure that you have KVM installed and set up on your jump server. This
+is needed because the deployment will spin up a VM which will then carry out the host and
+Kubernetes installation.
+
+Deployment
+=============================
+
+Before initiating the deployment, please note the following:
+
+1. Add your configuration templates, ``pdf.yaml`` and ``idf.yaml`` under ``hw_config/<vendor>``.
+
+2. Modify the environmental variables defined in ``deploy.env`` to match your setup.
+
+3. Update ``hw_config/<vendor>/setup_network.sh`` with your correct networking info. This particular
+ script sets up networking on the provisioned nodes after the host provisioning stage is successful.
+
+.. note::
+
+ Depending on your setup, this script might not be needed. #WIP
+
+Once ready, issue the following command to initiate the deployment
+
+.. code-block:: bash
+
+ ./deploy.sh
+
+
+Once the deployment is successful, you will have a fully functional RI-2 setup!
diff --git a/functions.sh b/functions.sh
index 55edfbf..7d867cd 100755
--- a/functions.sh
+++ b/functions.sh
@@ -46,7 +46,8 @@ EOL
# Create VM
sudo genisoimage -output "/var/lib/libvirt/images/$VM_NAME/$VM_NAME-cidata.iso" \
-volid cidata -joliet -rock user-data meta-data
-
+ sudo virt-customize -a "/var/lib/libvirt/images/$VM_NAME/$VM_NAME.qcow2" \
+ --root-password password:"$ROOT_PASSWORD"
sudo virt-install --connect qemu:///system --name "$VM_NAME" \
--ram 4096 --vcpus=4 --os-type linux --os-variant ubuntu16.04 \
--disk path="/var/lib/libvirt/images/$VM_NAME/$VM_NAME.qcow2",format=qcow2 \
@@ -104,7 +105,7 @@ copy_files_jump() {
# Host Provisioning
provision_hosts() {
# shellcheck disable=SC2087
- ssh -tT "$USERNAME"@"$(get_vm_ip)" << EOF
+ ssh -o StrictHostKeyChecking=no -tT "$USERNAME"@"$(get_vm_ip)" << EOF
# Install and run cloud-infra
if [ ! -d "${PROJECT_ROOT}/engine" ]; then
ssh-keygen -t rsa -N "" -f ${PROJECT_ROOT}/.ssh/id_rsa
@@ -127,7 +128,7 @@ setup_network() {
WORKER_IP=$(yq r "$CURRENTPATH"/hw_config/"$VENDOR"/pdf.yaml nodes.[1].interfaces.["$PXE_IF_INDEX"].address)
# SSH to jumphost
# shellcheck disable=SC2087
- ssh -tT "$USERNAME"@"$(get_vm_ip)" << EOF
+ ssh -o StrictHostKeyChecking=no -tT "$USERNAME"@"$(get_vm_ip)" << EOF
ssh -o StrictHostKeyChecking=no root@$MASTER_IP \
'bash -s' < ${PROJECT_ROOT}/${VENDOR}/setup_network.sh
ssh -o StrictHostKeyChecking=no root@$WORKER_IP \
@@ -138,7 +139,7 @@ EOF
# k8s Provisioning (currently BMRA)
provision_k8s() {
# shellcheck disable=SC2087
- ssh -tT "$USERNAME"@"$(get_vm_ip)" << EOF
+ ssh -o StrictHostKeyChecking=no -tT "$USERNAME"@"$(get_vm_ip)" << EOF
# Install BMRA
if [ ! -d "${PROJECT_ROOT}/container-experience-kits" ]; then
curl -fsSL https://get.docker.com/ | sh
diff --git a/hw_config/ericsson-pod1/setup_network.sh b/hw_config/ericsson-pod1/setup_network.sh
index 022394d..4696f6b 100755
--- a/hw_config/ericsson-pod1/setup_network.sh
+++ b/hw_config/ericsson-pod1/setup_network.sh
@@ -1,8 +1,8 @@
+#!/bin/bash
# Adapt this script according to your network setup
# TODO Get networking info from PDF & IDF
# TODO Add support in infra engine to update nameserver, etc
# files with correct info
-#!/bin/bash
echo "no additional network setup needed"
diff --git a/hw_config/intel/idf.yaml b/hw_config/intel/idf.yaml
index a5f9455..328fe09 100644
--- a/hw_config/intel/idf.yaml
+++ b/hw_config/intel/idf.yaml
@@ -19,10 +19,10 @@ idf:
mask: 24
dns:
- 8.8.8.8
- admin: # admin
+ public:
interface: 1
- vlan: 191
network: 10.10.191.0
+ vlan: native
mask: 24
bridge: br-name
kubespray: &idf_kubespray
diff --git a/hw_config/intel/pdf.yaml b/hw_config/intel/pdf.yaml
index ba0c856..86501a0 100644
--- a/hw_config/intel/pdf.yaml
+++ b/hw_config/intel/pdf.yaml
@@ -75,7 +75,7 @@ nodes:
features:
address: 192.168.11.211
mac_address: "a4:bf:01:4b:55:f5"
- vlan: 191
+ vlan: native
- name: 'nic3'
speed: 10gb
features: 'dpdk|sriov'
@@ -131,4 +131,4 @@ nodes:
features: 'dpdk|sriov'
address: 10.10.195.3
mac_address: "00:00:00:00:00:00"
- vlan: 1193
+ vlan: native
diff --git a/tox.ini b/tox.ini
index 4c9b4bd..8c96a7d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,8 +10,12 @@ passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
deps =
{env:BASHATE_INSTALL_PATH:bashate}
yamllint
+ rstcheck
whitelist_externals = bash
commands = bash -c "find {toxinidir} \
-not -path {toxinidir}/.tox/\* \
-name \*.sh | xargs bashate -v"
bash -c "yamllint {toxinidir}"
+ bash -c "find {toxinidir} \
+ -not -path {toxinidir}/.tox/\* \
+ -name \*.rst | xargs rstcheck"