+++ /dev/null
-# Copyright 2019 TATA ELXSI
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-# implied.
-# See the License for the specific language governing permissions and
-# limitations under the License
-# Author: Vijay Nag B S (vijaynag.bs@tataelxsi.co.in)
-
-apiVersion: kubeadm.k8s.io/v1beta3
-kind: ClusterConfiguration
-networking:
- podSubnet: 10.244.0.0/16
-apiServer:
- extraArgs:
- service-node-port-range: "80-32767"
[ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
}
-function deploy_osm_pla_service() {
- [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
- # corresponding to deploy_osm_services
- kubectl apply -n $OSM_NAMESPACE -f $OSM_DOCKER_WORK_DIR/osm_pla
- [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
-}
-
function install_osm_ngsa_service() {
[ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
NGSA_OPTS="-d ${OSM_HELM_WORK_DIR} -D ${OSM_DEVOPS} -t ${OSM_DOCKER_TAG} -U ${DOCKER_USER} ${DEBUG_INSTALL}"
track docker_ce docker_ce_ok
echo "Creating folders for installation"
- [ ! -d "$OSM_DOCKER_WORK_DIR" ] && sudo mkdir -p $OSM_DOCKER_WORK_DIR
- [ ! -d "$OSM_DOCKER_WORK_DIR/osm_pla" -a -n "$INSTALL_PLA" ] && sudo mkdir -p $OSM_DOCKER_WORK_DIR/osm_pla
- sudo cp -b $OSM_DEVOPS/installers/docker/cluster-config.yaml $OSM_DOCKER_WORK_DIR/cluster-config.yaml
+ [ ! -d "$OSM_WORK_DIR" ] && sudo mkdir -p $OSM_WORK_DIR
+ sudo cp -b $OSM_DEVOPS/installers/kubeadm-config.yaml $OSM_WORK_DIR/kubeadm-config.yaml
- $OSM_DEVOPS/installers/install_kubeadm_cluster.sh -i ${OSM_DEFAULT_IP} -d ${OSM_DOCKER_WORK_DIR} -D ${OSM_DEVOPS} ${DEBUG_INSTALL} || \
+ $OSM_DEVOPS/installers/install_kubeadm_cluster.sh -i ${OSM_DEFAULT_IP} -d ${OSM_WORK_DIR} -D ${OSM_DEVOPS} ${DEBUG_INSTALL} || \
FATAL_TRACK k8scluster "install_kubeadm_cluster.sh failed"
track k8scluster k8scluster_ok
echo "OPENSTACK_VM_NAME"="$OPENSTACK_VM_NAME"
echo "OSM_DEVOPS=$OSM_DEVOPS"
echo "OSM_DOCKER_TAG=$OSM_DOCKER_TAG"
- echo "OSM_DOCKER_WORK_DIR=$OSM_DOCKER_WORK_DIR"
echo "OSM_HELM_WORK_DIR=$OSM_HELM_WORK_DIR"
- echo "OSM_K8S_WORK_DIR=$OSM_K8S_WORK_DIR"
echo "OSM_NAMESPACE=$OSM_NAMESPACE"
echo "OSM_VCA_HOST=$OSM_VCA_HOST"
echo "OSM_VCA_PUBKEY=$OSM_VCA_PUBKEY"
REPOSITORY_KEY="OSM%20ETSI%20Release%20Key.gpg"
REPOSITORY_BASE="https://osm-download.etsi.org/repository/osm/debian"
OSM_WORK_DIR="/etc/osm"
-OSM_DOCKER_WORK_DIR="${OSM_WORK_DIR}/docker"
-OSM_K8S_WORK_DIR="${OSM_DOCKER_WORK_DIR}/osm_pods"
OSM_HELM_WORK_DIR="${OSM_WORK_DIR}/helm"
OSM_HOST_VOL="/var/lib/osm"
OSM_NAMESPACE_VOL="${OSM_HOST_VOL}/${OSM_NAMESPACE}"
[ -n "$TO_REBUILD" ] && [ "$TO_REBUILD" == " PLA" ] && [ -z "$INSTALL_PLA" ] && FATAL "Incompatible option: -m PLA cannot be used without --pla option"
# if develop, we force master
[ -z "$COMMIT_ID" ] && [ -n "$DEVELOP" ] && COMMIT_ID="master"
-OSM_K8S_WORK_DIR="$OSM_DOCKER_WORK_DIR/osm_pods" && OSM_NAMESPACE_VOL="${OSM_HOST_VOL}/${OSM_NAMESPACE}"
+OSM_NAMESPACE_VOL="${OSM_HOST_VOL}/${OSM_NAMESPACE}"
[ -n "$INSTALL_ONLY" ] && [ -n "$INSTALL_K8S_MONITOR" ] && install_k8s_monitoring
[ -n "$INSTALL_ONLY" ] && [ -n "$INSTALL_NGSA" ] && install_osm_ngsa_service
[ -n "$INSTALL_ONLY" ] && echo -e "\nDONE" && exit 0
[ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
sudo swapoff -a
sudo sed -i.bak '/.*none.*swap/s/^\(.*\)$/#\1/g' /etc/fstab
- sudo kubeadm init --dry-run || FATAL_TRACK k8scluster "kubeadm init dry-run failed"
+ sudo kubeadm init --config $1 --dry-run || FATAL_TRACK k8scluster "kubeadm init dry-run failed"
sudo kubeadm init --config $1
sleep 5
[ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
- name: default
protocol: layer2
addresses:
- - $METALLB_IP_RANGE" | sudo tee -a ${OSM_DOCKER_WORK_DIR}/metallb-config.yaml
+ - $METALLB_IP_RANGE" | sudo tee -a ${OSM_CLUSTER_WORK_DIR}/metallb-config.yaml
helm repo add metallb https://metallb.github.io/metallb
helm repo update
- helm install --create-namespace --namespace metallb-system metallb metallb/metallb --version ${METALLB_VERSION} -f ${OSM_DOCKER_WORK_DIR}/metallb-config.yaml
+ helm install --create-namespace --namespace metallb-system metallb metallb/metallb --version ${METALLB_VERSION} -f ${OSM_CLUSTER_WORK_DIR}/metallb-config.yaml
[ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
}
DEFAULT_IP="${OPTARG}"
;;
d)
- OSM_DOCKER_WORK_DIR="${OPTARG}"
+ OSM_CLUSTER_WORK_DIR="${OPTARG}"
;;
D)
OSM_DEVOPS="${OPTARG}"
echo "DEBUG_INSTALL=$DEBUG_INSTALL"
echo "DEFAULT_IP=$DEFAULT_IP"
echo "OSM_DEVOPS=$OSM_DEVOPS"
-echo "OSM_DOCKER_WORK_DIR=$OSM_DOCKER_WORK_DIR"
+echo "OSM_CLUSTER_WORK_DIR=$OSM_CLUSTER_WORK_DIR"
echo "INSTALL_K8S_MONITOR=$INSTALL_K8S_MONITOR"
echo "HOME=$HOME"
install_kube
check_and_track_kube_install
-init_kubeadm $OSM_DOCKER_WORK_DIR/cluster-config.yaml
+init_kubeadm $OSM_CLUSTER_WORK_DIR/kubeadm-config.yaml
kube_config_dir
check_and_track_init_k8s
--- /dev/null
+# Copyright 2019 TATA ELXSI
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
+# Author: Vijay Nag B S (vijaynag.bs@tataelxsi.co.in)
+
+apiVersion: kubeadm.k8s.io/v1beta3
+kind: ClusterConfiguration
+networking:
+ podSubnet: 10.244.0.0/16
+apiServer:
+ extraArgs:
+ service-node-port-range: "80-32767"