Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible
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
Container registry
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
streampunk
ansible
Commits
2c16a337
Commit
2c16a337
authored
6 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Write instructions on using the playbooks for testing
parent
c6d29919
No related branches found
No related tags found
1 merge request
!1
V2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+40
-0
40 additions, 0 deletions
README.md
run-test-source.sh
+0
-14
0 additions, 14 deletions
run-test-source.sh
test-source.yml
+0
-0
0 additions, 0 deletions
test-source.yml
with
40 additions
and
14 deletions
README.md
+
40
−
0
View file @
2c16a337
...
@@ -8,3 +8,43 @@ $ vagrant up
...
@@ -8,3 +8,43 @@ $ vagrant up
$
export
ANSIBLE_HOST_KEY_CHECKING
=
False
$
export
ANSIBLE_HOST_KEY_CHECKING
=
False
$
ansible-playbook
-i
hosts.ini site.yml
$
ansible-playbook
-i
hosts.ini site.yml
```
```
This will start a 3-node autoradio cluster, with IPs
10.
236.82.10-12. The cluster will be using autoradio packages from the
default Debian repository.
## Testing with local autoradio builds
If the
*source_repository_path*
Ansible variable is defined to point
at the autoradio source repository, the playbook will install
locally-built autoradio binaries. This can be very useful to quickly
test local uncommitted changes:
```
shell
$
ansible-playbook
-i
hosts.ini
\
-e
source_repository_path
=
$HOME
/go/src/git.autistici.org/ale/autoradio
\
site.yml
```
## Test stream
The
*test-source.yml*
Ansible playbook can be used to quickly setup a
stream and an associated source for testing purposes. Use the
*stream_name*
Ansible variable to set the name of the stream to be
created:
```
shell
$
ansible-playbook
-i
hosts.ini
\
-e
stream_name
=
/test.ogg
\
test-source.yml
```
Then it's easy to create test loads with, e.g., autoradio's
*radiobench*
utility:
```
shell
$
go run git.autistici.org/ale/autoradio/cmd/radiobench
\
-n
100 http://10.236.82.10/test.ogg
```
will start 100 listeners on the stream just created above.
This diff is collapsed.
Click to expand it.
run-test-source.sh
deleted
100755 → 0
+
0
−
14
View file @
c6d29919
#!/bin/bash
#
# Create a test stream and run a source that connects to it.
#
stream_name
=
/test-
$RANDOM
.ogg
echo
"creating stream
${
stream_name
}
..."
create_output
=
$(
vagrant ssh host1
-c
"sudo radioctl create-mount
${
stream_name
}
"
|
tr
-d
'\r'
)
username
=
$(
echo
"
${
create_output
}
"
|
awk
-F
=
'$1 == "username" {print $2}'
)
password
=
$(
echo
"
${
create_output
}
"
|
awk
-F
=
'$1 == "password" {print $2}'
)
echo
"username: '
$username
'"
echo
"password: '
$password
'"
This diff is collapsed.
Click to expand it.
source.yml
→
test-
source.yml
+
0
−
0
View file @
2c16a337
File moved
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