Skip to content

Commit 0b8e243

Browse files
2 parents 55d62c0 + c1645fc commit 0b8e243

41 files changed

Lines changed: 7436 additions & 1863 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
1.21 MB
Binary file not shown.
Binary file not shown.
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Azure SQL Demos
22

3-
In this folder you will find the below files to run the Iron Ore Silica Impurities Demo
4-
1. DACPAC files
5-
2. TAR files
3+
In this folder, you will find the required files to execute
4+
5+
1. The [Iron Ore Silica Impurities Demo](https://docs.microsoft.com/en-us/azure/azure-sql-edge/tutorial-deploy-azure-resources)
6+
* DACPAC or Data Tier AppliCation Package is a single file which contains database model i.e. all files represent database objects. This file can be downloaded [here](https://github.com/microsoft/sql-server-samples/tree/master/samples/demos/azure-sql-edge-demos/iron-ore-silica-impurities/DACPAC).
7+
* The ARM/AMD docker image files that need to be pushed to the conatiner registry can be downloaded [here](https://github.com/microsoft/sql-server-samples/tree/master/samples/demos/azure-sql-edge-demos/iron-ore-silica-impurities/tar-files).
8+
9+
10+
2. The [wind turbine demo](samples/demos/azure-sql-edge-demos/Wind_Turbine_Demo.zip) can be downloaded and run on your local machines
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
#!/bin/bash
2+
3+
DIR_PREFIX=$1
4+
5+
sudo kubeadm reset --force
6+
7+
# Clean up azdata-cli package.
8+
#
9+
sudo dpkg --remove --force-all azdata-cli
10+
11+
sudo systemctl stop kubelet
12+
sudo rm -rf /var/lib/cni/
13+
sudo rm -rf /var/lib/etcd/
14+
sudo rm -rf /run/flannel/
15+
sudo rm -rf /var/lib/kubelet/*
16+
sudo rm -rf /etc/cni/
17+
sudo rm -rf /etc/kubernetes/
18+
19+
sudo ip link set cni0 down
20+
#brctl delbr cni0
21+
sudo ip link set flannel.1 down
22+
#brctl delbr flannel.1
23+
sudo iptables -F && sudo iptables -t nat -F && sudo iptables -t mangle -F && sudo iptables -X
24+
25+
sudo rm -rf .azdata/
26+
27+
# Remove mounts.
28+
#
29+
SERVICE_STOP_FAILED=0
30+
31+
sudo systemctl | grep "/var/lib/kubelet/pods" | while read -r line; do
32+
33+
# Retrieve the mount path
34+
#
35+
MOUNT_PATH=`echo "$line" | grep -v echo | egrep -oh -m 1 "(/var/lib/kubelet/pods).+"`
36+
37+
if [ -z "$MOUNT_PATH" ]; then
38+
continue
39+
fi
40+
41+
if [[ ! -d "$MOUNT_PATH" ]] && [[ ! -f "$MOUNT_PATH" ]]; then
42+
43+
SERVICE=$(echo $line | cut -f1 -d' ')
44+
45+
echo "Mount "$MOUNT_PATH" no longer exists."
46+
echo "Stopping orphaned mount service: '$SERVICE'"
47+
48+
sudo systemctl stop $SERVICE
49+
50+
if [ $? -ne 0 ]; then
51+
SERVICE_STOP_FAILED=1
52+
fi
53+
54+
echo ""
55+
fi
56+
done
57+
58+
if [ $SERVICE_STOP_FAILED -ne 0 ]; then
59+
echo "Not all services were stopped successfully. Please check the above output for more inforamtion."
60+
else
61+
echo "All orphaned services successfully stopped."
62+
fi
63+
64+
# Clean the mounted volumes.
65+
#
66+
67+
for i in $(seq 1 80); do
68+
69+
vol="vol$i"
70+
71+
sudo umount /azurearc/local-storage/$vol
72+
73+
sudo rm -rf /azurearc/local-storage/$vol
74+
75+
done
76+
77+
# Reset kube
78+
#
79+
sudo apt-get purge -y kubeadm --allow-change-held-packages
80+
sudo apt-get purge -y kubectl --allow-change-held-packages
81+
sudo apt-get purge -y kubelet --allow-change-held-packages
82+
sudo apt-get purge -y kubernetes-cni --allow-change-held-packages
83+
sudo apt-get purge -y kube* --allow-change-held-packages
84+
sudo apt -y autoremove
85+
sudo rm -rf ~/.kube
86+
87+
# Clean up working folders.
88+
#
89+
export AZUREARCDATACONTROLLER_DIR=arc-data
90+
if [ -d "$AZUREARCDATACONTROLLER_DIR" ]; then
91+
echo "Removing working directory $AZUREARCDATACONTROLLER_DIR."
92+
rm -f -r $AZUREARCDATACONTROLLER_DIR
93+
fi

samples/features/azure-arc/deployment/kubeadm/ubuntu-single-node-vm/cleanup-controller.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ sudo kubeadm reset --force
66

77
# Clean up azdata-cli package.
88
#
9+
azdata extension remove --name azdata-cli-dc --yes
10+
azdata extension remove --name azdata-cli-postgres --yes
11+
azdata extension remove --name azdata-cli-sqlinstance --yes
912
unalias azdata
1013
unalias az
1114
sudo dpkg --remove --force-all azdata-cli

0 commit comments

Comments
 (0)