Every once in a while I get the desire play with some piece of software. Recently my desires to learn more have coincided with software that I see in action at work. Basically, team X stands up Y and I use it as an end-user and like it. This leads to me wanting to know more about X, so I stand it up at home and create these documents. That means that all the docs at this point are on Red Hat products, but over time I'm sure I will post more and more and perhaps just use that github repo instead of posting technical "how to" blog entries like I've done in the past.
These docs will always be to the point and just enough information to get you going. I encourage you to read product docs and learn by doing once you've established the base setup by using the quickstarts.
Currently I have install how-tos for:
You can find this stuff at https://github.com/dminnich/tech_quickstarts. I'll try and post more as my interests and time permits.
I recently wrote several extensible and secure server install and configruation playbooks for Ubuntu 16.04. I did this to practice my ansible skills and as a way to offer cheap server configuration setups to others on fiverr.com. Nobody ever bought from me, and I like sharing, so I'm posting all of my code.
The playbooks that are there right now will configure:
You can find this stuff at https://github.com/dminnich/ansible_roles. I'll try and post more ansible playbooks to this repo as I have time to write them.
I participated in a project at work recently that had me looking into streaming radio technologies. I've listened to them since the age of dialup but haven't ever really messed with running one. This blog will change that.
do a fresh minimal debian install. then install some software
apt-get -y update && apt-get -y upgrade apt-get -y install mpd icecast2 ncmpcpp mpc #configure icecast during the install routine
Icecast is the streaming server that vlc or other similar media players will connect to, to listen to the music.
mpd is a music player that can be remotely controlled and can send the audio it is playing to icecast servers as well as to speakers.
An mpd client controls what mpd is playing. You can think of it as a playlist/queue manager. We will be using a mpd client on the server in this tutorial.
So... DJ > mpc client > mpd > icecast server > vlc or similar > listener.
This provides a lot of power and flexibility. Your DJ could be choosing the next song your guests in franshised restaurants across the US hear from a mpc client on is phone while waiting for a flight in an airport in Mexico.
Configure icecast
vim /etc/default/icecast2 ENABLE=true vim /etc/icecast2/icecast.xml #replace any passwords the config script missed %s/hackme/test1234/g systemctl enable icecast2 systemctl restart icecast2
Configure mpd
vim /etc/mpd.conf #set password and bind_to_address if you want to control remotely #setup audio like so. updating password in shout section. audio_output { type "null" name "My Null Output" mixer_type "none" # optional } audio_output { type "shout" encoding "ogg" # optional name "My Shout Stream" host "localhost" port "8000" mount "/mpd.ogg" password "test1234" quality "5.0" #bitrate "128" format "44100:16:1" protocol "icecast2" # optional #user "source" # optional #description "My Stream Description" # optional #url "http://example.com" # optional #genre "jazz" # optional #public "no" # optional #timeout "2" # optional #mixer_type "software" # optional } systemctl enable mpd systemctl restart mpd
Add and play some music
scp my.mp3 root@VMIP:/var/lib/mpd/music/ ncmpcpp 3 u arrow keys enter on song #1 or tab/shift+tab to learn more about the player
Check out the admin UI
http://VMIP:8000 admin/password you chose click around mountpoint list is a list of streams you can tune into
Tune in
Open the M3U URL of the icecast mount in VLC or similar on your laptop.
Thats it. It is worth mentioning that you can stream to your icecast server from other places, so if you have lots of music on a specific machine, there is no reason to copy it to the icecast server. You can also play with things like Darkice and Mixxx to do live broadcasting.
References
https://wiki.archlinux.org/index.php/Streaming_With_Icecast