summaryrefslogtreecommitdiffstats
path: root/kud/hosting_providers
diff options
context:
space:
mode:
Diffstat (limited to 'kud/hosting_providers')
-rw-r--r--kud/hosting_providers/containerized/addons/README.md.tmpl34
-rw-r--r--kud/hosting_providers/containerized/addons/values-resources.yaml.tmpl19
-rw-r--r--kud/hosting_providers/containerized/addons/values.yaml.tmpl36
-rwxr-xr-xkud/hosting_providers/containerized/installer.sh7
-rw-r--r--kud/hosting_providers/containerized/inventory/group_vars/k8s-cluster.yml2
-rwxr-xr-xkud/hosting_providers/vagrant/installer.sh38
-rw-r--r--kud/hosting_providers/vagrant/inventory/group_vars/k8s-cluster.yml2
7 files changed, 47 insertions, 91 deletions
diff --git a/kud/hosting_providers/containerized/addons/README.md.tmpl b/kud/hosting_providers/containerized/addons/README.md.tmpl
index 8ab16104..0cef7923 100644
--- a/kud/hosting_providers/containerized/addons/README.md.tmpl
+++ b/kud/hosting_providers/containerized/addons/README.md.tmpl
@@ -1,43 +1,47 @@
# Installing KUD addons with emcoctl
-1. Customize values.yaml and values-resources.yaml as needed
+1. Customize values.yaml as needed
To create a customized profile for a specific addon, edit the profile
as needed, and then (for example, cpu-manager):
```
tar -czf /opt/kud/multi-cluster/addons/cpu-manager.tar.gz -C /opt/kud/multi-cluster/addons/cpu-manager/helm .
- tar -czf /opt/kud/multi-cluster/addons/collectd_profile.tar.gz -C /opt/kud/multi-cluster/addons/cpu-manager/profile .
+ tar -czf /opt/kud/multi-cluster/addons/cpu-manager_profile.tar.gz -C /opt/kud/multi-cluster/addons/cpu-manager/profile .
```
2. Create prerequisites to deploy addons
-Apply prerequisites.yaml. This step is optional. If there are
-existing resources in the cluster, it is sufficient to customize
-values.yaml with the values of those resources. The supplied
-prequisites.yaml creates controllers, one project, one cluster, and
-one logical cloud.
+Apply prerequisites. This step is optional. If there are existing
+resources in the cluster, it is sufficient to customize values.yaml
+with the values of those resources. The supplied YAML files creates
+the controllers, one or more clusters, one project, and one logical
+cloud.
- \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f prerequisites.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f 00-controllers.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f 01-cluster.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f 02-project.yaml -v values.yaml\`
3. Deploy addons
-Apply addons.yaml. This deploys the addons listed in the \`Addons\`
-value in values.yaml.
+This deploys the addons listed in the \`Addons\` and
+\`AddonResources\` values in values.yaml.
- \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f composite-app.yaml -v values.yaml\`
- \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f composite-app.yaml -v values-resources.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f 03-addons-app.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh apply -f 04-addon-resources-app.yaml -v values.yaml\`
# Uninstalling KUD addons with emcoctl
1. Delete addons
- \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f composite-app.yaml -v values-resources.yaml\`
- \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f composite-app.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f 04-addon-resources-app.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f 03-addons-app.yaml -v values.yaml\`
2. Cleanup prerequisites
- \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f prerequisites.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f 02-project.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f 01-cluster.yaml -v values.yaml\`
+ \`$ /opt/kud/multi-cluster/${CLUSTER_NAME}/artifacts/emcoctl.sh delete -f 00-controllers.yaml -v values.yaml\`
#### NOTE: Known issue: deletion of the resources fails sometimes as
some resources can't be deleted before others are deleted. This can
diff --git a/kud/hosting_providers/containerized/addons/values-resources.yaml.tmpl b/kud/hosting_providers/containerized/addons/values-resources.yaml.tmpl
deleted file mode 100644
index ed568238..00000000
--- a/kud/hosting_providers/containerized/addons/values-resources.yaml.tmpl
+++ /dev/null
@@ -1,19 +0,0 @@
-HostIP: ${HOST_IP}
-KubeConfig: ${KUBE_PATH}
-PackagesPath: ${PACKAGES_PATH}
-ProjectName: proj1
-RsyncPort: 30441
-GacPort: 30493
-OvnPort: 30473
-DtcPort: 30483
-ClusterProvider: provider1
-Cluster1: cluster1
-ClusterLabel: edge-cluster
-LogicalCloud: default
-Apps:
-- sriov-network
-CompositeApp: addon-resources
-CompositeProfile: addon-resources-profile
-DeploymentIntentGroup: addon-resources-deployment-intent-group
-DeploymentIntent: addon-resources-deployment-intent
-GenericPlacementIntent: addon-resources-placement-intent
diff --git a/kud/hosting_providers/containerized/addons/values.yaml.tmpl b/kud/hosting_providers/containerized/addons/values.yaml.tmpl
index 62936beb..f4f0b76c 100644
--- a/kud/hosting_providers/containerized/addons/values.yaml.tmpl
+++ b/kud/hosting_providers/containerized/addons/values.yaml.tmpl
@@ -1,24 +1,36 @@
HostIP: ${HOST_IP}
-KubeConfig: ${KUBE_PATH}
-PackagesPath: ${PACKAGES_PATH}
-ProjectName: proj1
RsyncPort: 30441
GacPort: 30493
OvnPort: 30473
DtcPort: 30483
-ClusterProvider: provider1
-Cluster1: cluster1
-ClusterLabel: edge-cluster
+
+ClusterProvider: kud
+ClustersLabel: kud-cluster
+Clusters:
+- KubeConfig: ${KUBE_PATH}
+ Name: cluster
+
+ProjectName: kud
LogicalCloud: default
-Apps:
+
+PackagesPath: ${PACKAGES_PATH}
+AddonsApp: addons
+AddonsProfile: addons-profile
+AddonsDeploymentIntentGroup: addons-deployment-intent-group
+AddonsDeploymentIntent: addons-deployment-intent
+AddonsPlacementIntent: addons-placement-intent
+Addons:
- multus-cni
- ovn4nfv
- node-feature-discovery
- sriov-network-operator
- qat-device-plugin
- cpu-manager
-CompositeApp: addons
-CompositeProfile: addons-profile
-DeploymentIntentGroup: addons-deployment-intent-group
-DeploymentIntent: addons-deployment-intent
-GenericPlacementIntent: addons-placement-intent
+
+AddonResourcesApp: addon-resources
+AddonResourcesProfile: addon-resources-profile
+AddonResourcesDeploymentIntentGroup: addon-resources-deployment-intent-group
+AddonResourcesDeploymentIntent: addon-resources-deployment-intent
+AddonResourcesPlacementIntent: addon-resources-placement-intent
+AddonResources:
+- sriov-network
diff --git a/kud/hosting_providers/containerized/installer.sh b/kud/hosting_providers/containerized/installer.sh
index 427850ab..928ed425 100755
--- a/kud/hosting_providers/containerized/installer.sh
+++ b/kud/hosting_providers/containerized/installer.sh
@@ -221,7 +221,7 @@ function install_host_artifacts {
local -r host_addons_dir="${host_dir}/addons"
local -r host_artifacts_dir="${host_dir}/${cluster_name}/artifacts"
- for addon in cpu-manager multus-cni node-feature-discovery ovn4nfv qat-device-plugin sriov-network sriov-network-operator; do
+ for addon in cdi cdi-operator cpu-manager kubevirt kubevirt-operator multus-cni node-feature-discovery ovn4nfv qat-device-plugin sriov-network sriov-network-operator; do
mkdir -p ${host_addons_dir}/${addon}/{helm,profile}
cp -r ${kud_infra_folder}/helm/${addon} ${host_addons_dir}/${addon}/helm
cp -r ${kud_infra_folder}/profiles/${addon}/* ${host_addons_dir}/${addon}/profile
@@ -238,8 +238,9 @@ function install_host_artifacts {
cp -rf ${kud_inventory_folder}/artifacts/* ${host_artifacts_dir}
mkdir -p ${host_artifacts_dir}/addons
- cp ${kud_infra_folder}/emco/examples/prerequisites.yaml ${host_artifacts_dir}/addons
- cp ${kud_infra_folder}/emco/composite-app.yaml ${host_artifacts_dir}/addons
+ for yaml in ${kud_infra_folder}/emco/examples/*.yaml; do
+ cp ${yaml} ${host_artifacts_dir}/addons
+ done
for template in addons/*.tmpl; do
CLUSTER_NAME="${cluster_name}" \
HOST_IP="$(master_ip)" \
diff --git a/kud/hosting_providers/containerized/inventory/group_vars/k8s-cluster.yml b/kud/hosting_providers/containerized/inventory/group_vars/k8s-cluster.yml
index 7d0404a5..498d0fb4 100644
--- a/kud/hosting_providers/containerized/inventory/group_vars/k8s-cluster.yml
+++ b/kud/hosting_providers/containerized/inventory/group_vars/k8s-cluster.yml
@@ -14,8 +14,6 @@
# Editing those values will almost surely break something.
system_namespace: kube-system
-docker_version: 'latest'
-
# Logging directory (sysvinit systems)
kube_log_dir: "/var/log/kubernetes"
diff --git a/kud/hosting_providers/vagrant/installer.sh b/kud/hosting_providers/vagrant/installer.sh
index c88dc9e6..463ac925 100755
--- a/kud/hosting_providers/vagrant/installer.sh
+++ b/kud/hosting_providers/vagrant/installer.sh
@@ -61,42 +61,6 @@ function _install_ansible {
sudo -E pip install --no-cache-dir ansible==$version
}
-# _install_docker() - Download and install docker-engine
-function _install_docker {
- local max_concurrent_downloads=${1:-3}
-
- if $(docker version &>/dev/null); then
- return
- fi
- sudo apt-get install -y apt-transport-https ca-certificates curl
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get install -y docker-ce
-
- sudo mkdir -p /etc/systemd/system/docker.service.d
- if [ ${http_proxy:-} ]; then
- echo "[Service]" | sudo tee /etc/systemd/system/docker.service.d/http-proxy.conf
- echo "Environment=\"HTTP_PROXY=$http_proxy\"" | sudo tee --append /etc/systemd/system/docker.service.d/http-proxy.conf
- fi
- if [ ${https_proxy:-} ]; then
- echo "[Service]" | sudo tee /etc/systemd/system/docker.service.d/https-proxy.conf
- echo "Environment=\"HTTPS_PROXY=$https_proxy\"" | sudo tee --append /etc/systemd/system/docker.service.d/https-proxy.conf
- fi
- if [ ${no_proxy:-} ]; then
- echo "[Service]" | sudo tee /etc/systemd/system/docker.service.d/no-proxy.conf
- echo "Environment=\"NO_PROXY=$no_proxy\"" | sudo tee --append /etc/systemd/system/docker.service.d/no-proxy.conf
- fi
- sudo systemctl daemon-reload
- echo "DOCKER_OPTS=\"-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --max-concurrent-downloads $max_concurrent_downloads \"" | sudo tee --append /etc/default/docker
- if [[ -z $(groups | grep docker) ]]; then
- sudo usermod -aG docker $USER
- fi
-
- sudo systemctl restart docker
- sleep 10
-}
-
function _set_environment_file {
# By default ovn central interface is the first active network interface on localhost. If other wanted, need to export this variable in aio.sh or Vagrant file.
OVN_CENTRAL_INTERFACE="${OVN_CENTRAL_INTERFACE:-$(ip addr show | awk '/inet.*brd/{print $NF; exit}')}"
@@ -116,7 +80,6 @@ function install_k8s {
local tarball=v$version.tar.gz
sudo apt-get install -y sshpass make unzip # install make to run mitogen target and unzip is mitogen playbook dependency
sudo apt-get install -y gnupg2 software-properties-common
- _install_docker
_install_ansible
wget https://github.com/kubernetes-incubator/kubespray/archive/$tarball
sudo tar -C $dest_folder -xzf $tarball
@@ -248,7 +211,6 @@ function install_addons {
# install_plugin() - Install ONAP Multicloud Kubernetes plugin
function install_plugin {
echo "Installing multicloud/k8s plugin"
- _install_docker
sudo -E pip install --no-cache-dir docker-compose
sudo mkdir -p /opt/{kubeconfig,consul/config}
diff --git a/kud/hosting_providers/vagrant/inventory/group_vars/k8s-cluster.yml b/kud/hosting_providers/vagrant/inventory/group_vars/k8s-cluster.yml
index 7803f27a..a9a7a933 100644
--- a/kud/hosting_providers/vagrant/inventory/group_vars/k8s-cluster.yml
+++ b/kud/hosting_providers/vagrant/inventory/group_vars/k8s-cluster.yml
@@ -14,8 +14,6 @@
# Editing those values will almost surely break something.
system_namespace: kube-system
-docker_version: 'latest'
-
# Logging directory (sysvinit systems)
kube_log_dir: "/var/log/kubernetes"