Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
autoradio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ale
autoradio
Commits
f0b6769f
Commit
f0b6769f
authored
9 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
update the quick start guide for debian jessie
parent
d73c8e53
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+71
-58
71 additions, 58 deletions
README.md
with
71 additions
and
58 deletions
README.md
+
71
−
58
View file @
f0b6769f
...
@@ -30,19 +30,13 @@ And then running:
...
@@ -30,19 +30,13 @@ And then running:
$ sudo apt-key adv --recv-key 0xC0EAC2F9CE9ED9B0
$ sudo apt-key adv --recv-key 0xC0EAC2F9CE9ED9B0
$ sudo apt-get update
$ sudo apt-get update
$ sudo apt-get install etcd autoradio
$ sudo apt-get install etcd autoradio-server
This will install and start the necessary jobs (which will initially
fail due to the missing configuration).
Edit
`/etc/default/autoradio`
and set, at least, the
`DOMAIN`
variable to what you've assigned to the cluster. The jobs will
automatically start as soon as the configuration is saved.
## Full cluster install procedure
## Full cluster install procedure
Note: this procedure requires etcd 2.0 or later.
Note: this procedure assumes a Debian distribution, it should work
either with Wheezy (oldstable) or Jessie (stable).
This assumes that you have an existing domain name (here
This assumes that you have an existing domain name (here
*example.com*
) that you control, and that you will run the cluster
*example.com*
) that you control, and that you will run the cluster
...
@@ -53,60 +47,79 @@ number of machines.
...
@@ -53,60 +47,79 @@ number of machines.
Having said that, follow these steps to bootstrap a new streaming
Having said that, follow these steps to bootstrap a new streaming
cluster:
cluster:
1.
Make sure that, on each of your servers, the output of
1.
Make sure that, on each of your servers, the output of
`hostname
`hostname -f`
is the fully-qualified hostname of the machine,
-f`
is the fully-qualified hostname of the machine, and that it
and that it resolves to its public IP (possibly using
`/etc/hosts`
).
resolves to its public IP (possibly using
`/etc/hosts`
). This way
autoradio can detect the IP address that peers should use when
communicating with each host. Also, for simplicity, we're going to
assume that each host can resolve the IP address of each other just
by using its short name.
2.
Pick one of your servers, say
*host1*
, and add a delegation for
*radio.example.com*
to it. For instance, in a
`bind`
-formatted zone
file:
radio IN NS 3600 host1.example.com.
3.
On
*host1*
, edit
`/etc/default/etcd`
with the following contents:
2.
On every server, run the above-mentioned steps to set up the APT
ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
repository and install (do not configure) the
`etcd`
and
ETCD_INITIAL_ADVERTISE_PEER_URLS=http://host1:2380
`autoradio`
packages.
ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
ETCD_ADVERTISE_CLIENT_URLS=http://host1:2379
ETCD_INITIAL_CLUSTER_STATE=new
ETCD_INITIAL_CLUSTER=node1=http://host1:2380
3.
Pick one of
you
r
s
ervers and add a delegation for
Once
you s
ave the file, restart the *etcd* daemon: this will
*radio.example.com*
to it. For instance, with
`bind`
:
initialize an empty database
:
radio IN NS 3600 machine1.example.com.
$ service etcd restart
4.
On
*machine1*
, edit
`/etc/default/etcd`
with the following
4.
On
*host1*
, edit
`/etc/default/autoradio`
and add:
contents:
START=1
DOMAIN="--domain=radio.example.com"
BOOTSTRAP=1
Once you save the file, the *etcd* daemon will start and
5.
Run the steps in the _Installation_ section above to set up the APT
initialize an empty database.
repository and install the
`etcd`
and
`autoradio`
packages using
the configuration you just wrote.
5.
On
*machine1*
, edit
`/etc/default/auto
radio
`
and
set
This will start the
*
radio
d*
and
*redirectord*
daemons, and you
`DOMAIN=radio.example.com`
. This will start the
*radiod*
and
will be able to serve DNS records for the
*radio.example.com*
zone.
*redirectord*
daemons, and you will be able to serve DNS records
for the
*radio.example.com*
zone. Check
with:
Check that the service is healthy
with:
$ ping -c1 radio.example.com
$ ping -c1 radio.example.com
This should send a ping to *machine1*.
This should send a ping to *host1*.
Now that the first node is up and running, set up the remaining
machines. For every host:
6
.
Set up
the remaining machines. It is a two-step process: first, run
1
.
Set up
etcd. First, run the following command on the first machine
the following command on the first machine
:
(host1)
:
$ etcdctl member add
machine
2 http://
machine
2:2380
$ etcdctl member add
host
2 http://
host
2:2380
(remember not to include a final slash on the node URL).
(remember not to include a final slash on the node URL).
This will print out some environment variables. You should copy
This will print out some environment variables. You should copy
the `ETCD_INITIAL_CLUSTER` line into `/etc/default/etcd` on
the
`ETCD_INITIAL_CLUSTER`
line into
`/etc/default/etcd`
on
machine2, resulting in something like:
the new host. The other lines of that file should be identical to
what shown in step 4 of the previous checklist, replacing the host
name where necessary.
START=1
Note that you will need to wait for etcd on the new machine to
ETCD_INITIAL_CLUSTER=machine1=http://...,machine2=http://...
start successfully before you can run
`etcdctl member add`
for the
next one. For further instructions on how to change the etcd
Finally, set `DOMAIN=radio.example.com` in
cluster configuration at runtime, see
`/etc/default/autoradio`, and the daemons will start
[
the etcd documentation
](
https://github.com/coreos/etcd/blob/master/Documentation/runtime-configuration.md
)
.
automatically.
Note that you will need to wait for etcd on the new machine to
2.
Set
`DOMAIN`
in
`/etc/default/autoradio`
(as shown in step 5 of
start successfully before you can run `etcdctl member add` for the
the previous checklist above), and the daemons will start
next one. For further instructions on how to change the etcd
automatically.
cluster configuration at runtime, see
[the etcd documentation](https://github.com/coreos/etcd/blob/master/Documentation/runtime-configuration.md).
3.
Install the autoradio packages, see _Installation_ section above.
The daemons should start automatically with the new configuration.
## Building from source
## Building from source
...
@@ -185,16 +198,16 @@ The autoradio HTTP server can operate in one of two modes:
...
@@ -185,16 +198,16 @@ The autoradio HTTP server can operate in one of two modes:
redirects but might simplify access for people behind corporate
redirects but might simplify access for people behind corporate
proxies and such.
proxies and such.
This behavior is controlled by the `--enable-icecast-proxy`
This behavior is controlled by the
`--enable-icecast-proxy`
command-line flag to *redirectord*.
command-line flag to
*redirectord*
.
It is set to true by default.
## Firewalls
## Firewalls
The users should be able to reach ports 53/tcp, 53/udp, 80/tcp and
The users should be able to reach ports 53/tcp, 53/udp, 80/tcp and
8000/tcp (
unless
proxying is
en
abled) on all nodes. Nodes
should be
8000/tcp (
the latter only if
proxying is
dis
abled) on all nodes. Nodes
able to reach 2379/tcp and 2380/tcp (the etcd ports) on each
other;
should be
able to reach 2379/tcp and 2380/tcp (the etcd ports) on each
these two ports can be public if you've set up X509-based
other;
these two ports can be public if you've set up X509-based
authentication for etcd.
authentication for etcd.
...
@@ -237,7 +250,7 @@ started in the whole cluster.
...
@@ -237,7 +250,7 @@ started in the whole cluster.
There's a
[
Vagrant
](
http://www.vagrantup.com/
)
environment in the
There's a
[
Vagrant
](
http://www.vagrantup.com/
)
environment in the
`vagrant-test`
subdirectory that will set up a test three-node cluster
`vagrant-test`
subdirectory that will set up a test three-node cluster
(with Debian
Wheezy
as the base system) using pre-packaged binaries.
(with Debian
Jessie
as the base system) using pre-packaged binaries.
To run it:
To run it:
$ cd vagrant-test
$ cd vagrant-test
...
@@ -248,10 +261,10 @@ it will turn up three nodes called **node1**, **node2** and **node3**.
...
@@ -248,10 +261,10 @@ it will turn up three nodes called **node1**, **node2** and **node3**.
Use
`vagrant ssh`
to inspect them.
Use
`vagrant ssh`
to inspect them.
If you want to test a locally-built package, copy the
`autoradio`
and
If you want to test a locally-built package, copy the
`autoradio`
and
`etcd`
Debian packages in the
`vagrant-test`
directory and set the
`etcd`
Debian packages in the
`vagrant-test`
directory and, in that
`LOCAL`
environment variable to a non-empty string when invoking
same directory, run
vagrant:
$ LOCAL=1 vagrant up
$ dpkg-scanpackages -m . >Packages
the provisioning process will automatically use the local packages if
they are available.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment