Vinyl Setup on Microsoft Azure¶
Setup instructions for running Vinyl on Microsoft Azure using App Service for Vinyl and VM for SQL Server Web.
Important
- These instructions are intended for development and QA and production environments of Vinyl.
- The instructions are broken down into 3 parts. VNet setup, Database setup and App Service setup. These are guidelines and if an organization has standard practices for provisioning the VNet or database, they should use that.
- For performance, it is important that the database VM and app service be provisioned in the same region.
- In the screenshots that follow, arrows are used to highlight where settings were made / changed or saved.
Part I. VNet Setup¶
If you already have a VNet configured, you can use that but otherwise it is recommended to configure a VNet for traffic between the Vinyl App Service and the database.
(ref: https://learn.microsoft.com/en-us/azure/app-service/configure-vnet-integration-enable)
In this screenshot, the VNet was configured with a bastion (which was auto-provisioned) – this is optional. You must have a subnet available for the AppService, which is called "AppServiceSubnet" in the screenshot below:
Part II. Database Setup¶
(Optional – if organization has another method for starting SQL Server instances use that)
Create a Windows VM with SQL Server already installed and running:
The screenshot below shows the settings we used for our qa/dev framework, using the default server sizing recommended. For production environments this might be larger.
The marketplace screen for selecting the Image above:
We use primarily defaults for the additional settings:
For networking you would likely use an existing Virtual Network
We enable SQL Authentication for the SQL Server instance:
Part III. App Service Setup¶
The values for the registry and Image and tag – note if you want a specific version of Vinyl the image tag should be "vinyl/release:3.2.12345
"
https://registry.zudy.com
vinyl
nocode
registry.zudy.com/vinyl/release:3.2
Update Configuration for Docker¶
Note
The database we provisioned in our vnet was named "zudysqlserverqa" and is accessible via "zudysqlserverqa.internal.cloudapp.net"
ConnectionInfo__DatabaseType: SQLServer
ConnectionInfo__HostName: zudysqlserverqa.internal.cloudapp.net
ConnectionInfo__CommandTimeout: 300
ConnectionInfo__DatabaseName: Vinyl
ConnectionInfo__UserName: vinyl
ConnectionInfo__Password: YourDatabasePassword
Enable VNet Integration¶
Create file shares to be mounted by the app service¶
We left all the screens with default settings
Vinyl requires 3 file shares to persist data permanently.
Create 3 file shares for the data, keys and logs directories.
Mount the disks on the app service¶
All 3 added.
Important
Name and Mount Point must be named exactly as seen below:
The values for Name and Mount path should be:
- vinyl_data
/app/data
- vinyl_keys
/app/keys
- vinyl_logs
/app/logs
Optional: Turn on app service logs:
Confirm system up (It takes Vinyl approximately 2 minutes to install the first time)¶
Verify that the file shares keys and logs contain files¶
Appendix – Redis Setup for Multiple App Service Instances¶
Setup Redis¶
- Go to Azure Cache for Redis and select Create
- Select Standard C1 or Basic C0
- Ensure the cache is in the correct resource group, region, and give it a unique name
Select Private Endpoint and there is no need to actually create a private endpoint:
Configure Azure App Service to use Redis¶
Once the service is running, you can get the connection string for it from Access Keys page:
In the Vinyl App Service add the following properties:
- SharedState__Provider:
Redis
- SharedState__RedisConnectionString:
zudyazure1.redis.cache.windows.net:6380,password=<YourPassword>=,ssl=True,abortConnect=False
Save the configuration and Vinyl will use Redis for coordination between instances.