Azuracast: One-click Web Radio in the Reclaim Cloud

Screenshot of a Tweet from September 4th, 2020 saying "There's been some interest in Azuracast (the open source web radio software) from a couple of folks this week, so I leaned on @timmmmyboy to help me create a one-click installer for Reclaim Cloud. And because he's a genius, it's now a thing! "

Image of a Tweet from September 4th, 2020 https://twitter.com/jimgroom/status/1301961536899108864

Yesterday was a win because I finally focused for long enough to work through creating a one-click installer for the open source web radio application Azuracast. I’ve had a couple of conversations with folks around web radio this week, and I have to say it was cool to hear them suggest web radio is one area they want to explore. I love the whole idea, and I figured Reclaim Hosting could do its small part to make installing and hosting Azuracast that much easier. I have played with the software a bit in Reclaim Cloud to create Reclaim Radio, stand-up Strawboss Radio for the inimitable @scottlo, and finally to migrate #ds106radio to Azuracast. So I had installed the software using their Docker container a few times now.

The trick was to take the installation commands and create a one-click installer for Reclaim Cloud. Tim has already created quite a few, and he wrote-up a bit about the approach for creating packages on the Reclaim Community forums that was a very useful starting point:

Jelastic has documentation at https://docs.cloudscripting.com/ on how to develop these packages which take the form of a yaml or json file. You can also browse all of the packages currently available via Jelastic’s Github organization at Jelastic JPS Collection as well as recent additions I’ve built and added to the Marketplace at Reclaim Hosting’s Github. The repos contain a manifest.yaml file which has all of the necessary code. In more complex scripts that file may call other scripts within the repo to do various things.

One method I’ve had a lot of success with is creating a generic Docker container and then running a build script to automate pulling down and running the particular software project.

Tim points to the example of the manifest file for RStudio he created as a model, which is where I started. I created my first Github repo in the Reclaim Hosting account (which is a proud moment for me 🙂 ) and I got started. And, in fact, it was pretty simple, I had to update the application name and other details, but the only real significant change to the RStudio manifest he shared was to the actions section:

actions:
  setup:
    cmd[cp]: |-
      mkdir -p /var/azuracast
      cd /var/azuracast
      curl -fsSL https://raw.githubusercontent.com/AzuraCast/AzuraCast/master/docker.sh > docker.sh
      chmod a+x docker.sh
      yes no |./docker.sh install
      #Checking of container is up and running
      until [ "`/usr/bin/docker inspect -f {{.State.Running}} azuracast_web`"=="true" ]; do
        sleep 1
        print '.'
      done;
      echo OK
ssl: true
skipNodeEmails: true
success: |
  **Azuracast URL**: [https://${env.domain}/](https://${env.domain}/)

This is the finished product, but to be clear it took some finessing of my attempt by Tim to get it to work. The big thing was that the Docker container asks questions about the custom domain and SSL certification to creating and environment file, so that had to be forced in the script with the line yes no |./docker.sh install. The other thing is the test to make sure the container is running until [ "`/usr/bin/docker inspect -f {{.State.Running}} azuracast_web`"=="true" ]; do needs the name of the application for that Docker instance, which is azuracast_web, so that was another thing Tim helped me figure out.

That said, I can see how creating these one-click installer can be pretty do-able with the right container, which is pretty awesome. Even better, it is not necessarily limited to us creating these manifests, as Tony Hirst demonstrated with his Jupyter Notebook work, anyone can do it and share appropriating for others to use, where or not it is in our marketplace. So, all that said, I finally have my first attempt at an installer for Reclaim Cloud under my belt.

This entry was posted in reclaim, Reclaim Cloud and tagged , , , , , . Bookmark the permalink.

7 Responses to Azuracast: One-click Web Radio in the Reclaim Cloud

  1. Tim Clarke says:

    Thanks for this! One question – so the custom domain and SSL cert should be done before using the one-click installer?

  2. John says:

    Hi Jim,
    This sounds marvellous.
    I am not doing any broadcasting at the moment but wonder if you have an idea of how the cost works out for say a one hour show, with around 10-20 listeners? I presuming that when a station is not running it costs nothing?
    On Edu talk we use a hosted solution that you pay for bandwidth but this sounds like a lot more fun.

    • Reverend says:

      John,

      It would be pretty cheap, less than a dollar for each hour show. So, in fact, this would be a perfect and really affordable use-case for occasional radio. And you can have your player embedded in an HTML page hosted anywhere, and the actual radio server can be spun up and down as needed, it would be a fun use-case of highlighting the power of the cloud, so let me know if you play with it.

  3. Gran says:

    Let a thousand broadcasters boom!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.