Skip to content

Commit e960aeb

Browse files
authored
Merge pull request #8 from macolso/master
Change Filezilla connection from ACI IP to ACI FQDN
2 parents 830c198 + ddd8cb1 commit e960aeb

File tree

4 files changed

+38
-17
lines changed

4 files changed

+38
-17
lines changed

README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description: "SFTP is a widely used protocol which many organizations use for tr
99

1010
# SFTP on Azure
1111

12-
SFTP is a very widely used protocol which many organizations use today for transferring files within their organization or across organizations. Creating a VM based SFTP is costly and high-maintenance. In absence of a fully managed service, this template will be a good workaround for a cost-effective SFTP solution in Azure which is backed by durable persistent storage. ACI service is very inexpensive and requires very little maintenance, while data is stored in Azure Files which is a fully managed SMB service in cloud.
12+
SFTP is a very widely used protocol which many organizations use today for transferring files within their organization or across organizations. Creating a VM based SFTP is costly and high-maintenance. In absence of a fully managed service, this template will be a good workaround for a cost-effective SFTP solution in Azure which is backed by durable persistent storage. ACI service is very inexpensive and requires very little maintenance, while data is stored in Azure Files which is a fully managed SMB service in cloud.
1313

1414
## Key Value Prop
1515

@@ -38,7 +38,9 @@ SFTP is a very widely used protocol which many organizations use today for trans
3838
</a>
3939

4040
## Overview
41-
This template demonstrates an on-demand SFTP server using an Azure Container Instance (ACI). It creates a Storage Account and a File Share via the Azure CLI using another ACI (based on the 101-aci-storage-file-share template also in this repository). This File Share is then mounted into the main ACI to provide persistent storage after the container is terminated.
41+
This template demonstrates an on-demand SFTP server using Azure Container Instances ([ACI](https://docs.microsoft.com/en-us/azure/container-instances/)). The template will generate two container groups:
42+
1. **create-share-group** is a container group that acts as an [init container](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) by generating the second container group and an [Azure Storage](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-overview) account (based on the [101-aci-storage-file-share template](https://github.com/Azure/azure-quickstart-templates/tree/master/101-aci-storage-file-share))
43+
2. **sftp-group** is a container group with a mounted [Azure File Share](https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-create-file-share). The Azure File Share will provide persistent storage after the container is terminated.
4244

4345
`Tags: Azure Container Instance, az-cli, sftp`
4446

@@ -77,33 +79,36 @@ Pin to the dashboard
7779

7880
## Usage
7981

80-
Once deployed, connect to the public IP of the SFTP ACI and upload files; these files should be placed into the File Share. Once transfers are complete, stop the ACI and the files will remain accessible. You can delete/recreate the ACI and mount the same file share to copy more files.
82+
Once deployed, connect Azure to the Filezilla client via the fully qualified domain name (FQDN) of the ACI container group named **sftp-group** and upload files.
8183

82-
Click on the container sftp-group
84+
:bangbang: ACI _does not_ support static IPs for their container groups. Use the container group's FQDN for consistent network connectivity :bangbang:
85+
86+
After connecting to **sftp-group**'s FQDN, these files should be placed into the Azure File Share. Once transfers are complete, [manually stop](https://docs.microsoft.com/bs-latn-ba/azure/container-instances/container-instances-stop-start#stop) the **sftp-group** to pause ACI's billing. The files will remain accessible. You can [manually start](https://docs.microsoft.com/bs-latn-ba/azure/container-instances/container-instances-stop-start#start) **sftp-group** and to copy more files at anytime. If you choose to delete and redeploy **sftp-group** make sure to update the FQDN connection on Filezilla since this template randomly generates the FQDN during deployment time.
87+
88+
1. Click on the container sftp-group
8389

8490
![cid:image013.png\@01D4AC19.C75D08F0](media/27eb882cc865681917477f753c7361aa.png)
8591

86-
Copy the IP address from the container group
92+
2. Copy the FQDN from the container group
8793

88-
![cid:image014.png\@01D4AC19.C75D08F0](media/490ad362e0903ed66eefeb06fc9b0264.png)
94+
![cid:image014.png\@01D4AC19.C75D08F0](media/fqdn_image.PNG)
8995

90-
Open Filezilla and open File Site Manager and enter the IP, username and
96+
3. Open Filezilla and open File Site Manager and enter the FQDN, username and
9197
password that was originally added during creation
9298

9399
![cid:image015.png\@01D4AC19.C75D08F0](media/0f9a21b676c64a6de53bff3a317977f9.png)
94100

95101

96-
Upload a file
102+
4. Upload a file
97103

98104
![cid:image016.png\@01D4AC19.C75D08F0](media/07d51c6830a6975b0fe1869f08378c35.png)
99105

100-
>  
101106

102-
1. The file appears in your file share
107+
5. The file appears in your file share
103108

104109
![cid:image017.jpg\@01D4AC19.C75D08F0](media/45f6559a0fdcd3f6e300153d13eb3fde.jpg)
105110

106111
### Notes
107112

108-
Azure Container Instance is available in selected [locations](https://docs.microsoft.com/en-us/azure/container-instances/container-instances-quotas#region-availability). Please use one of the available location for Azure Container Instance resource.
113+
Azure Container Instances is available in selected [locations](https://docs.microsoft.com/en-us/azure/container-instances/container-instances-quotas#region-availability). Please use one of the available location for Azure Container Instances resource.
109114
The container image used by this template is hosted on [Docker Hub](https://hub.docker.com/r/atmoz/sftp). It is not affiliated with Microsoft in any way, and usage is at your own risk.

create-aci-sftp-server-and-azure-files/azuredeploy.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@
3838
"metadata": {
3939
"description": "Primary location for resources"
4040
}
41+
},
42+
"containerGroupDNSLabel": {
43+
"type": "string",
44+
"defaultValue": "[uniqueString(resourceGroup().id, deployment().name)]",
45+
"metadata" : {
46+
"description": "DNS label for container group"
47+
}
4148
}
4249
},
4350
"variables": {
@@ -169,7 +176,8 @@
169176
"protocol": "TCP",
170177
"port": 22
171178
}
172-
]
179+
],
180+
"dnsNameLabel": "[parameters('containerGroupDNSLabel')]"
173181
},
174182
"restartPolicy": "OnFailure",
175183
"volumes": [
@@ -187,9 +195,9 @@
187195
}
188196
],
189197
"outputs": {
190-
"containerIPv4Address": {
198+
"containerDNSLabel": {
191199
"type": "string",
192-
"value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', variables('sftpContainerGroupName'))).ipAddress.ip]"
200+
"value": "[concat(parameters('containerGroupDNSLabel'), '.', parameters('location'), '.azurecontainer.io')]"
193201
}
194202
}
195203
}

create-aci-sftp-server-with-existing-azure-file-share/azuredeploy.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@
3838
"metadata": {
3939
"description": "Primary location for resources"
4040
}
41+
},
42+
"containerGroupDNSLabel": {
43+
"type": "string",
44+
"defaultValue": "[uniqueString(resourceGroup().id, deployment().name)]",
45+
"metadata" : {
46+
"description": "DNS label for container group"
47+
}
4148
}
4249
},
4350
"variables": {
@@ -107,7 +114,8 @@
107114
"protocol": "TCP",
108115
"port": 22
109116
}
110-
]
117+
],
118+
"dnsNameLabel": "[parameters('containerGroupDNSLabel')]"
111119
},
112120
"restartPolicy": "OnFailure",
113121
"volumes": [
@@ -125,9 +133,9 @@
125133
}
126134
],
127135
"outputs": {
128-
"containerIPv4Address": {
136+
"containerDNSLabel": {
129137
"type": "string",
130-
"value": "[reference(resourceId('Microsoft.ContainerInstance/containerGroups/', variables('sftpContainerGroupName'))).ipAddress.ip]"
138+
"value": "[concat(parameters('containerGroupDNSLabel'), '.', parameters('location'), '.azurecontainer.io')]"
131139
}
132140
}
133141
}

media/fqdn_image.PNG

29.3 KB
Loading

0 commit comments

Comments
 (0)