Add version with onm
Change-Id: I23caae4a5040041ef7ebda83452148fd43d1d492
This commit is contained in:
parent
ac17835f25
commit
93fb915b6a
11
installation-scripts-onm/MASTER_INSTALL_SCRIPT.sh
Normal file
11
installation-scripts-onm/MASTER_INSTALL_SCRIPT.sh
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
echo "Master install script"
|
||||
|
||||
wget https://raw.githubusercontent.com/alijawadfahs/scripts/main/nebulous/install-kube-u22-wg.sh && chmod +x ./install-kube-u22-wg.sh && ./install-kube-u22-wg.sh
|
||||
|
||||
echo "Installing Helm..."
|
||||
sudo -H -u ubuntu bash -c ' curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && chmod 700 get_helm.sh && ./get_helm.sh'
|
||||
# Add KubeVela Helm repository and update
|
||||
|
||||
sudo -H -u ubuntu bash -c 'curl -fsSl https://kubevela.io/script/install.sh | bash'
|
||||
echo "Configuration complete."
|
2
installation-scripts-onm/MASTER_POST_INSTALL_SCRIPT.sh
Normal file
2
installation-scripts-onm/MASTER_POST_INSTALL_SCRIPT.sh
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
echo "Master post-install script"
|
12
installation-scripts-onm/MASTER_PRE_INSTALL_SCRIPT.sh
Normal file
12
installation-scripts-onm/MASTER_PRE_INSTALL_SCRIPT.sh
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
echo "Master pre-install script\n"
|
||||
|
||||
sudo hostnamectl set-hostname "$variables_PA_JOB_NAME"
|
||||
sudo -H -u ubuntu bash -c 'wget https://opendev.org/nebulous/sal-scripts/raw/branch/master/onm/nm-bootstrap-script.sh && chmod +x nm-bootstrap-script.sh'
|
||||
sudo -H -u ubuntu bash -c "./nm-bootstrap-script.sh 'CREATE' 'MASTER' $APPLICATION_ID 158.39.201.249";
|
||||
echo ""
|
||||
echo ""
|
||||
sleep 60
|
||||
|
||||
WIREGUARD_VPN_IP=`ip a | grep wg | grep inet | awk '{print $2}' | cut -d'/' -f1`;
|
||||
echo "WIREGUARD_VPN_IP= $WIREGUARD_VPN_IP";
|
56
installation-scripts-onm/MASTER_START_SCRIPT.sh
Normal file
56
installation-scripts-onm/MASTER_START_SCRIPT.sh
Normal file
@ -0,0 +1,56 @@
|
||||
|
||||
echo "Master start script"
|
||||
WIREGUARD_VPN_IP=`ip a | grep wg | grep inet | awk '{print $2}' | cut -d'/' -f1`;
|
||||
echo "WIREGUARD_VPN_IP=$WIREGUARD_VPN_IP";
|
||||
|
||||
sudo kubeadm init --apiserver-advertise-address ${WIREGUARD_VPN_IP} --service-cidr 10.96.0.0/16 --pod-network-cidr 10.244.0.0/16
|
||||
|
||||
echo "HOME: $(pwd), USERE: $(id -u -n)"
|
||||
mkdir -p ~/.kube && sudo cp -i /etc/kubernetes/admin.conf ~/.kube/config && sudo chown $(id -u):$(id -g) ~/.kube/config
|
||||
id -u ubuntu &> /dev/null
|
||||
|
||||
if [[ $? -eq 0 ]]
|
||||
then
|
||||
#USER ubuntu is found
|
||||
mkdir -p /home/ubuntu/.kube && sudo cp -i /etc/kubernetes/admin.conf /home/ubuntu/.kube/config && sudo chown ubuntu:ubuntu /home/ubuntu/.kube/config
|
||||
else
|
||||
echo "User Ubuntu is not found"
|
||||
fi
|
||||
|
||||
|
||||
#sudo -H -u ubuntu kubectl apply -f https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml;
|
||||
sudo -H -u ubuntu bash -c 'helm repo add cilium https://helm.cilium.io/ && helm repo update'
|
||||
sudo -H -u ubuntu bash -c 'helm install cilium cilium/cilium --namespace kube-system --set encryption.enabled=true --set encryption.type=wireguard'
|
||||
|
||||
echo "Setting KubeVela..."
|
||||
sudo -H -u ubuntu bash -c 'helm repo add kubevela https://kubevela.github.io/charts && helm repo update'
|
||||
sudo -H -u ubuntu bash -c 'nohup helm install --create-namespace -n vela-system kubevela kubevela/vela-core --version 1.8.2 > /home/ubuntu/vela.txt 2>&1 &'
|
||||
|
||||
sudo -H -u ubuntu bash -c 'helm repo add nebulous https://jmarchel7bulls.github.io/helm-charts/'
|
||||
|
||||
sudo -H -u ubuntu bash -c 'helm repo add netdata https://netdata.github.io/helmchart/'
|
||||
|
||||
sudo -H -u ubuntu bash -c 'helm repo update'
|
||||
|
||||
echo "Starting EMS"
|
||||
sudo -H -E -u ubuntu bash -c 'helm install ems nebulous/ems-server \
|
||||
--set tolerations[0].key="node-role.kubernetes.io/control-plane" \
|
||||
--set tolerations[0].operator="Exists" \
|
||||
--set tolerations[0].effect="NoSchedule" \
|
||||
--set app_uuid=$APPLICATION_ID \
|
||||
--set broker_address=158.37.63.86 \
|
||||
--set image.tag="2024-apr-nebulous" \
|
||||
--set broker_port=32754'
|
||||
|
||||
|
||||
sudo -H -u ubuntu bash -c 'helm install netdata netdata/netdata'
|
||||
|
||||
echo "Starting Solver"
|
||||
sudo -H -E -u ubuntu bash -c 'helm install solver nebulous/nebulous-optimiser-solver \
|
||||
--set tolerations[0].key="node-role.kubernetes.io/control-plane" \
|
||||
--set tolerations[0].operator="Exists" \
|
||||
--set tolerations[0].effect="NoSchedule" \
|
||||
--set amplLicense.keyValue="NjYxZTQzNDQ5ODE2NDczZWIzNDIwNDc2NzZlZjI5Mzc1MjQ0MDUyMGM3MzczYzI5MTg1ODBjNWFmNzBmMzZiN2U3YWYxNzZjYTY2NjQyYTZjMWYzYzFiNjQwNmFlYTgxMTRiZjhhNDg5ZjQ0OGJjZGIyYTc2MDYzNzNiMjNiMTdjNWQ4ZjlhMjg2MjcyYzg4ZjIxOWZjZWZjMTY0MzIxMmU2ZWFjZTY5M2EzMDliYjNlMzBkN2UzNTI3MjA3OTgxZTBhMjNhNWNkOGIzYjcyOGUwZTc2ZWJiZDQwMjNhZTZiNGJkZmFiYmY1MDdkZTJlODM0M2UyNmNjNDc4NjlhNjQ0ZmZkODYxZmQzNjE0ZmVmYTJkYmZhNzI0YmMyODU3MTFmM2Q1Zjg3M2IyOTk0ODViZGNlOTBiYTRlNzc1YjQwMjI1MTI3MzIzNTBlYzZhNjExOGI4NjkyNmUwMDhjNjg1OTQwNjAyYjA5NzhlYzAxMjlmY2Q4NzM0ZDhjNGM2NDIwYmQ4MzE4OWU0NWM0MTk1ZWE4MzMxMzI0NjE4ZjBjN2RlYTViMTk0MTQ0MTJjN2MzMTNiOTIzMmQ4MTVlMGIxZDYzZjYxY2M0MWM1MzIzMDdkOTBiYjkwMWMyYTM0NTZhMWU0MGQ0OTkzOTAxMWEwMTIwMjEwYzNkYWE1YjNlN2YzZTk4ZGNhMDRmZTgyNDA3ZDc4MzQ0NGIzODcwMGU1MzdlNGJkOWI3MmY3MGY1NDQwZGM4YmE1OWE5MjU1YzJlMWM0OGRmYWM2ZTAwNmE5MGZkMzI1ODYwYzVkMzFkNDRlZTBhNTZjZTJlNTM2OWM3MTMzOTE4NWNhZjAxMWIxNzY2NGE3YTRjNWRhZjM5MjMxM2Q4YWUxODdmZTI0NzY2M2JmYjI2MDIwMGFjNGIyN2JmNGI0NDIzNTYxMzE1MmJlZDQxODMzYTZlOWViNTE1YjBjMjNiNjkzMmRhNjE2MmQ3OTE0OWY4NTE1MTdiYTgwNDY4MjAzMzcwODA0YjYyZmZi" \
|
||||
--set application.id=$APPLICATION_ID \
|
||||
--set activemq.ACTIVEMQ_HOST=158.37.63.86 \
|
||||
--set activemq.ACTIVEMQ_PORT=32754'
|
2
installation-scripts-onm/MASTER_STOP_SCRIPT.sh
Normal file
2
installation-scripts-onm/MASTER_STOP_SCRIPT.sh
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
echo "Master stop script"
|
2
installation-scripts-onm/MASTER_UPDATE_SCRIPT.sh
Normal file
2
installation-scripts-onm/MASTER_UPDATE_SCRIPT.sh
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
echo "Master update script"
|
3
installation-scripts-onm/WORKER_INSTALL_SCRIPT.sh
Normal file
3
installation-scripts-onm/WORKER_INSTALL_SCRIPT.sh
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
echo "Worker install script"
|
||||
wget https://raw.githubusercontent.com/alijawadfahs/scripts/main/nebulous/install-kube-u22-wg.sh && chmod +x ./install-kube-u22-wg.sh && ./install-kube-u22-wg.sh
|
2
installation-scripts-onm/WORKER_POST_INSTALL_SCRIPT.sh
Normal file
2
installation-scripts-onm/WORKER_POST_INSTALL_SCRIPT.sh
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
echo "worker post-install script"
|
8
installation-scripts-onm/WORKER_PRE_INSTALL_SCRIPT.sh
Normal file
8
installation-scripts-onm/WORKER_PRE_INSTALL_SCRIPT.sh
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
echo "Worker pre-install script"
|
||||
sudo hostnamectl set-hostname "$variables_PA_JOB_NAME"
|
||||
sudo -H -u ubuntu bash -c 'wget https://opendev.org/nebulous/sal-scripts/raw/branch/master/onm/nm-bootstrap-script.sh && chmod +x nm-bootstrap-script.sh'
|
||||
sudo -H -u ubuntu bash -c "./nm-bootstrap-script.sh 'CREATE' 'WORKER' $APPLICATION_ID 158.39.201.249";
|
||||
|
||||
WIREGUARD_VPN_IP=`ip a | grep wg | grep inet | awk '{print $2}' | cut -d'/' -f1`;
|
||||
echo "WIREGUARD_VPN_IP= $WIREGUARD_VPN_IP";
|
4
installation-scripts-onm/WORKER_START_SCRIPT.sh
Normal file
4
installation-scripts-onm/WORKER_START_SCRIPT.sh
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
echo "Worker start script"
|
||||
echo $variables_kubeCommand
|
||||
sudo $variables_kubeCommand
|
2
installation-scripts-onm/WORKER_STOP_SCRIPT.sh
Normal file
2
installation-scripts-onm/WORKER_STOP_SCRIPT.sh
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
echo "Worker stop script"
|
2
installation-scripts-onm/WORKER_UPDATE_SCRIPT.sh
Normal file
2
installation-scripts-onm/WORKER_UPDATE_SCRIPT.sh
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
echo "Worker update script"
|
Loading…
x
Reference in New Issue
Block a user