/openshift-shoutcast-cartridge

Shoutcast Distribution for Openshift Cloud Apps

Primary LanguageHTMLApache License 2.0Apache-2.0

openshift-SHOUTcast-cartridge

SHOUTcast Distribution for Openshift Cloud Apps

Concept

Streaming service with (not yet functional) scaling capabilities, simple one line installation:

Currently available distributions:

From here:


rhc app-create app-name manifest.yml


Instant Web Console Deployment:

CLICK ME

Approach to scaling:

Each gear or node hosts a distribution of SHOUTcast each with a modifiable configuration. The first gear or node hosts SHOUTcast and acts as the primary relay point for other nodes. The configuration is generated by environment variables which will always properly connect SHOUTcast.

Relaying (TODO!):

RelayPort=80
RelayServer=IP/URL 

Primary Node:

portbase=${OPENSHIFT_SCS_PORT}
destip=${OPENSHIFT_SCS_IP}
publicip=${OPENSHIFT_APP_DNS}

The gears are address based on the least amount of connections as determined by the standard haproxy which can be added by using the --scaling option to the command lines above. SHOUTcast is then up and running listening to the destip:portbase which is externally addressable. The publicip option lets SHOUTcast know the proper address to use for .pls .m3u ect... when the server is marked public.

Current issues:

  • Creating a url endpoint to the first node which bypasses the haproxy cartridge.
  • Changing haproxy's configuration to avoid initial conflict between haproxy's health check at the backend /

The issue here is get requests on / requests the primary stream before there's a stream available. Then SHOUTcast responds with an http error... Then haproxy closes outside connections from reaching the backend... From here there's no public way of providing a source to SHOUTcast...

Although not a problem if you just want to port forward into the app


rhc port-forward app-name


The problem remains that haproxy's health checks still connect to the stream, acting as a real client to the SHOUTcast server taking up space for other users.

Sources of Information plus Thank You's: