-
Notifications
You must be signed in to change notification settings - Fork 9
/
setup-azurestorage.sh
executable file
·35 lines (25 loc) · 1.08 KB
/
setup-azurestorage.sh
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
#!/bin/bash
set -eou pipefail
source ./scripts/variables.sh
az group create -n $(rg) -l $(location)
az storage account create \
-n $(blobStoreName) \
-g $(rg) \
-l $(location) \
--sku Standard_LRS \
--kind BlobStorage \
--access-tier Cool
# access-tier accepted values: Hot - Optimized for storing data that is accessed frequently. #Cool - Optimized for storing data that is infrequently accessed and stored for at least 30 days.
export AZURE_STORAGE_ACCOUNT=$(blobStoreName)
export AZURE_STORAGE_KEY=$(az storage account keys list --resource-group $(rg) --account-name $(blobStoreName) | grep -m 1 value | awk -F'"' '{print $4}')
# create container
az storage container create \
--name helm \
--public-access blob
h3 repo index --url https://$(blobStoreName).blob.core.windows.net/helm/ .
h3 package charts/<chart-name>
h3 repo add jdcharts https://$(blobStoreName).blob.core.windows.net/helm/
h3 repo list
# h3 repo index .
# h3 package .
# az storage blob upload --container-name helm --file $file_to_upload --name $blob_name