-
Notifications
You must be signed in to change notification settings - Fork 0
/
storageAccountExtra
93 lines (55 loc) · 3 KB
/
storageAccountExtra
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
STORAGE_ACCOUNT=$(az storage account list --resource-group acrMHBot --query "[?contains(name,'mystorageaccount')].[name]" --output tsv)
echo $STORAGE_ACCOUNT
STORAGE_KEY=$(az storage account keys list --resource-group acrMHBot --account-name mystorageaccount18896 --query "[0].value" --output tsv)
echo $STORAGE_KEY
*** THIS IS THE COMMAND I FINALLY USED ***
az container create \
--resource-group acrMHBot \
--name mentalhealthbot \
--image ucabjpc/project_final:v6 \
--dns-name-label mentalhealthbot \
--ports 80 5002 \
--azure-file-volume-account-name mystorageaccount18896 \
--azure-file-volume-account-key EsR7BupYkPV6zXuoExBZg0Mw3y4k1SC7K521x3zJsVd0eB8Ig0XkCm8HyxSBpFSYrRhTbve/f6cJbf3t3tomCQ== \
--azure-file-volume-share-name acishare \
--azure-file-volume-mount-path /app/flask_active/rasabot/data/dialogues
**********************************************
!!!!! The volume mount can't be "/app" - there is a problem putting the root directory as the mount and then
changing the working directory to a child directory (flaskapp)
az container create \
--resource-group acrMHBot \
--name mhtbotfiles \
--image ucabjpc/project_final:v4 \
--dns-name-label mhtbot1 \
--ports 80 5002 \
--gitrepo-url https://github.com/JCourt1/mht_bot_app/tree/master/flask_active/rasabot \
--gitrepo-mount-path /app/flask_active/rasabot
### High hopes for this one...
az container create \
--resource-group acrMHBot \
--name mhtbotfiles \
--image ucabjpc/project_final:v4 \
--dns-name-label mhtbot1 \
--ports 80 5002 \
--gitrepo-url https://github.com/JCourt1/rasaBot.git \
--gitrepo-mount-path /app/flask_active/rasabot
## Found the command here:
https://docs.microsoft.com/en-us/cli/azure/container?view=azure-cli-latest
## az container create -g MyResourceGroup --name myapp --image myimage:latest --command-line "cat /mnt/gitrepo" --gitrepo-url https://github.com/user/myrepo.git --gitrepo-dir ./dir1 --gitrepo-mount-path /mnt/gitrepo
////// DIDNT WORK IN THE END SINCE YOU CAN'T UPLOAD ENTIRE FOLDERS ON AZURE FILE SHARE
STORAGE_ACCOUNT=$(az storage account list --resource-group acrMHBot --query "[?contains(name,'storageaccount')].[name]" --output tsv)
echo $STORAGE_ACCOUNT
STORAGE_KEY=$(az storage account keys list --resource-group acrMHBot --account-name storageaccount22455 --query "[0].value" --output tsv)
echo $STORAGE_KEY
-> ez9E7XOfiaQAXCAIR2sRRMuIK9piCNDRhK8OWL5SrNlmUYRuyGY5wkh6dDRUxPxlAXSwl1+LrYK/kHoEIdo5Gg==
az container create \
--resource-group acrMHBot \
--name mhtbotfiles1 \
--image ucabjpc/project_final:v4 \
--dns-name-label mentalhealthchatbot \
--ports 80 5002 \
--azure-file-volume-account-name storageaccount22455 \
--azure-file-volume-account-key ez9E7XOfiaQAXCAIR2sRRMuIK9piCNDRhK8OWL5SrNlmUYRuyGY5wkh6dDRUxPxlAXSwl1+LrYK/kHoEIdo5Gg== \
--azure-file-volume-share-name acishare \
--azure-file-volume-mount-path /app/flask_active/rasabot/data
/////