Awakening Church uses CloudFlare and Microsoft Azure to host nginx-rtmp configured for H.264/AAC HLS streaming running in Docker on CoreOS. This repositiory creates that infrastructure using Terraform. You can use this configuration to start your own copy of our live video transcoding system.
We use this system for 4 hours a week. Costs are estimated at about $5 per week. However, since Microsoft offers $5,000 per year in Azure credits to non-profits, including churches, this costs us nothing to run. Thanks Microsoft!
Gather the required Azure credentials. Install Terraform. Configure the required Terraform variables:
azure_region
Azure region, e.g.West US 2
azure_tenant_id
Azure Tenant IDazure_client_id
Azure Client IDazure_client_secret
Azure Client secretazure_storage_prefix
Unique name for Azure storage, e.g.livevideoadventure
cf_email
CloudFlare Emailcf_token
CloudFlare API Tokencf_domain
CloudFlare Domain, e.g.awakeningchurch.com
cors_http_origin
Corresponds to CORS_HTTP_ORIGIN setting in awakening-nginx-rtmppublish_secret
Corresponds to PUBLISH_SECRET setting in awakening-nginx-rtmpssh_key_file
File containing the public SSH key for the launched CoreOS instance
Check the plan:
terraform plan
Apply to launch the infrastructure:
terraform apply
We use these resources for a few hours. Once the broadcast is complete, we simply destroy the resources:
terraform destroy -force
To modify the Container Linux configuration file, container-linux.yaml, install the Container Linux conifiguration transpiler. On macOS:
brew install coreos-ct
Then transpile container-linux.yaml
into ignition.yaml
with the command:
make
MIT