https://github.com/jefking/hs-hack
Custom hack; Containers + Imaging
https://github.com/jefking/hs-hack
aci arm azcopy azure cli container docker
Last synced: about 1 month ago
JSON representation
Custom hack; Containers + Imaging
- Host: GitHub
- URL: https://github.com/jefking/hs-hack
- Owner: jefking
- License: apache-2.0
- Created: 2018-10-14T13:10:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-18T10:55:07.000Z (over 7 years ago)
- Last Synced: 2025-02-01T23:17:29.404Z (over 1 year ago)
- Topics: aci, arm, azcopy, azure, cli, container, docker
- Homepage:
- Size: 40 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tools
- Git
- Docker
- [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest)
- [AZCopy](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-linux)
# [Azure](https://portal.azure.com)
- [Storage Account](https://docs.microsoft.com/en-us/azure/storage/)
- [File Share](https://docs.microsoft.com/en-us/azure/storage/files/storage-files-introduction)
- [Container Instances](https://azure.microsoft.com/en-us/services/container-instances/)
- Creates Share (Azure CLI)
- Processes Files (Custom Image)
# Algorithm
- Initialize
- Resource Group (command)
- ARM Deployment (command [1.deploy.json](https://github.com/jefking/hs-hack/blob/master/1.deploy.json))
- Creates Storage Account
- Creates Azure Container Instance
- Container creates File Share
- Upload Files (script)
- ARM Deployment (command [2.deploy.json](https://github.com/jefking/hs-hack/blob/master/2.deploy.json))
- Deploy Custom Image to ACI
- With Mapped File Share
- Wait for processing to complete (manually)
- Download Files (script)
- Delete all resources (command)
# Commands
## Specify
- Resource Group Name (alpha-numeric)
- Resource Group Location (West US 2)
- Customer Name (alpha-numeric)
- Container Image Name
## Deploy
### 1. Create Resource Group
``
az group create -g --location "West US 2"
``
### 2. Setup File Share
``
az group deployment create --name setup --resource-group --template-file 1.deploy.json --parameters customerName=
``
### 3. Upload
``
azcopy --source /mnt/ --destination https://.file.core.windows.net/ --dest-key
``
### 4. Process Files (Container)
``
az group deployment create --name process --resource-group --template-file 2.deploy.json --parameters 2.parameters.json
``
### 5. Download
``
azcopy --source https://.file.core.windows.net/ --destination /mnt/ --source-key --recursive
``
### 6. Delete Resources ($0)
``
az group delete -n
``
# V.Next
1. Container Registry
2. Code changes
- Process terminates when done
- Don't delete files
- ini -> data store (later)
- processing can be per file (later)
3. Template Changes
- CPU/Memory ACI
4. Automation
- Uploads
- Waiting for processing to complete
- Downloads
5. DevOps
- CI
- CD