Azuracast: One-click Web Radio in the Reclaim Cloud

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.

Running Azuracast on Reclaim Cloud

Following-up on my last post about Reclaim Radio, here is how I got the web radio software Azuracast up and running. The process was made easy by the fact that Azuracast has instructions on how to self-install a Docker instance of their software. Even better, Reclaim Hosting now has Reclaim Cloud that just so happens to allow you to install Docker containers quite easily.

To begin with you will need to setup a Docker Engine on Reclaim Cloud by clicking on the downward-facing arrow next to the Docker tab:

After that select Docker Engine:

At the next prompt create the domain (reclaimradio.uk.reclaim.cloud), name the server (Reclaim Radio), and decide in what region you want the app to live (UK).

After the Docker Engine is created you can login to the web SSH tool and create the azuracast within the var directory:

mkdir -p /var/azuracast

After that, change directories:

cd /var/azuracast

From within the azurcast directory download their Docker Utility Script:

curl -fsSL https://raw.githubusercontent.com/AzuraCast/AzuraCast/master/docker.sh docker.sh

Set it as executable:

chmod a+x docker.sh

And then run the Docker installation process:
./docker.sh install

Soon after that the container with the Azuracast software will be up and running.

Keep in mind, you will want to make sure you define the domain as the custom domain you want the software to run in, in our example it is reclaimrad.io version reclaimradio.uk.reclaim.cloud. This is important when installing the Let’s Encrypt SSL certificate through the application.
./docker.sh letsencrypt-create reclaimrad.io

Finally, you will want to point an A record for the custom domain name to the container’s public IP address where ever you manage DNS, for this instance I was using the Zone Editor in cPanel for reclaimrad.io.

At this point you can login to Azuracast and start managing the application, here is a good guide to get you started on that journey.

Reclaim On the Radio

Can it be 10 days ago already? Yes indeed it can be, on April 24th Meredith and I chatted on ds106radio about a wide range of things from wire106 to Mt Trashmore to remote working during COVID-19 to her phenomenal work as support manager at Reclaim Hosting and beyond.  Meredith has already posted the conversation on her blog (Domain of her own!), and the following audio has both the conversation and a little TGIF series of songs on the ds106radio:

This reminds me of a project I started over a week ago but have not returned to, basically creating separate server for reclaimrad.io (nothing working there yet) using AzuraCast. Digital Ocean has an imaged Droplet for AzuraCast that I installed, and I have just not taken the time to work through AzuraCast, but that’s on the docket for this week.

Image of Azuracast droplet on Digital OCean

Image of AzuraCast droplet on Digital OCean

But beyond the technicalities, the idea behind reclaimradio is to have a radio station that we add songs to as we’re all working remotely to create a sense of connection for us to have in the background. That already existed at the Reclaim Hosting physical offices via Spotify, but this would be more intentional, folks can add songs, choose to DJ, or just banter. Who knows if it will work or not, but we’ll never know if I don’t get off my ass and make it happen. 

Image of Taylor Jadin Radio

Taylor Jadin has created his own radio station and spinning it up and down via API calls whenever he needs it to save money and basically create and destroy a personal radio station as needed. I love the way his station page looks and I want to hear more about that process, might be a good excuse for a ds106radio conversation that he can x-cast to his radio ?