More Ansible installation retirement steps.

This commit is contained in:
Buster Neece 2019-05-15 03:59:57 -05:00
parent 070c3f61a4
commit e4e5007fbe
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
3 changed files with 62 additions and 78 deletions

View File

@ -53,7 +53,7 @@ Follow our **[installation guide](https://azuracast.com/install.html)** for inst
### What's Included
Whether you're using the Ansible or Docker installer, AzuraCast will automatically retrieve and install these components for you:
AzuraCast will automatically retrieve and install these components for you:
#### Radio Software

View File

@ -1,5 +1,7 @@
# Support for AzuraCast
**Note:** This support document is specific to users of our standard installation method (using Docker). If you're using the Ansible ("traditional" or "bare-metal") installation, see [this support guide](https://github.com/AzuraCast/azuracast.com/blob/master/LegacySupport.md) instead.
Having trouble with your AzuraCast installation? These pointers may be able to help.
If you still don't find what you're looking for, check the GitHub Issues section for an existing issue relating to the
@ -11,9 +13,7 @@ Before submitting any GitHub issues, you should take a look at the terminal logs
Users with the appropriate permissions can also view many logs directly through AzuraCast itself. The Log Viewer feature is available under "Utilities" in each station's management page.
#### Docker
To view logs in Docker, from the directory where your `docker-compose.yml` file is located, you can run:
From the directory where your `docker-compose.yml` file is located, you can run:
```bash
docker-compose logs -f
@ -21,25 +21,6 @@ docker-compose logs -f
This command will show you a running log of all containers. You can also get detailed logs by running `docker-compose logs -f service`, where "service" is one of `web`, `stations`, etc.
#### Ansible
Since the Ansible installation interacts directly with your host server, its logs are in various locations across the system.
- AzuraCast: `/var/azuracast/www_tmp/azuracast.log`
- Nginx Access: `/var/azuracast/www_tmp/access.log`
- Nginx Errors: `/var/azuracast/www_tmp/error.log`
- PHP: `/var/azuracast/www_tmp/php_errors.log`
- Supervisord: `/var/azuracast/www_tmp/supervisord.log`
- Redis: `/var/log/redis/redis-server.log`
- MariaDB: `/var/log/mysql`
- InfluxDB: `/var/log/influxdb`
For each station, logs for radio software will be inside `/var/azuracast/stations/{station_short_name}/config`, with the following filenames:
- Liquidsoap: `liquidsoap.log`
- Icecast: `icecast.log`
- SHOUTcast: `sc_serv.log`
## Common Solutions
### Reset an Account Password
@ -49,18 +30,10 @@ execute the following command to generate a new random password for an account i
Replace `YOUREMAILADDRESS` with the e-mail address whose password you intend to reset.
##### Docker
```bash
./docker.sh cli azuracast:account:reset-password YOUREMAILADDRESS
```
##### Ansible
```bash
php /var/azuracast/www/bin/azuracast.php azuracast:account:reset-password YOUREMAILADDRESS
```
### Manually Flush the System Cache
Many parts of the AzuraCast system depend on caches to speed up site performance. Sometimes, these caches can get out of
@ -70,13 +43,7 @@ date, and they may cause errors. You can always flush all site-wide caches using
./docker.sh cli cache:clear
```
##### Ansible
```bash
php /var/azuracast/www/bin/azuracast.php cache:clear
```
### Access Files via SFTP (Docker Installations)
### Access Files via SFTP
By default, SFTP access isn't set up for Docker based installations. If you have a large volume of media files, you may
prefer to upload them via SFTP instead of using the web updater. You should *not* use the host operating system's SFTP,
@ -85,7 +52,6 @@ however, as Docker stores station media inside a Docker-specific volume.
The script below will set up a temporary SFTP server that points to your station media directory inside Docker. The server
will stay running inside the terminal window, so you can easily hit `Ctrl+C` to terminate it when you are finished.
##### Docker
```bash
docker run --rm \
-v azuracast_station_data:/home/azuracast/stations \
@ -102,25 +68,11 @@ As long as you leave this script running, it will create a connection that you c
If you intend to leave this script running for long term periods, you must change the password to something more secure.
### Force a Full Update (Ansible Installations)
Normally, the Ansible installer's update script only updates the portion of the system that have been modified since
your last update. If an update was interrupted or otherwise is causing trouble, you can force the update script to process
all components, which can often fix any issues:
##### Ansible
```bash
./update.sh --full
```
### Use Non-standard Ports
You may want to serve the AzuraCast web application itself on a different port, or host your radio station on a port that
isn't within the default range AzuraCast serves (8000-8999).
#### Docker
To change the ports on which AzuraCast serves HTTP and HTTPS traffic, you can edit the `.env` file on the host to modify the public-facing port numbers as needed. (Note: this file should already exist on your system, but if it doesn't, you can [use this version for reference](https://github.com/AzuraCast/AzuraCast/blob/master/.env).)
Modify (or create) the lines below to modify your port mappings:
@ -136,18 +88,7 @@ You will need to recycle your Docker containers using `docker-compose down`, the
To override more complex functionality in your Docker installation, see the "Customizing Docker" section below.
#### Ansible
To modify the port your web application runs on, modify the configuration file in `/etc/nginx/sites-available/00-azuracast`.
Note that some updates may overwrite this file.
You can specify any port in any range for your station to use, provided the port isn't already in use.
By default, AzuraCast installs and enables the ufw (uncomplicated firewall) and sets it to lock down traffic to only SSH
and the ports used by AzuraCast. If you're using a nonstandard port, you will likely also want to enable incoming traffic
on that port using the command `ufw allow PORTNUM`, where `PORTNUM` is the new port number.
### Customizing Docker
## Customizing Docker
Docker installations come with four files by default:

View File

@ -1,5 +1,44 @@
#!/usr/bin/env bash
# This is a general-purpose function to ask Yes/No questions in Bash, either
# with or without a default answer. It keeps repeating the question until it
# gets a valid answer.
ask() {
# https://djm.me/ask
local prompt default reply
while true; do
if [[ "${2:-}" = "Y" ]]; then
prompt="Y/n"
default=Y
elif [[ "${2:-}" = "N" ]]; then
prompt="y/N"
default=N
else
prompt="y/n"
default=
fi
# Ask the question (not using "read -p" as it uses stderr not stdout)
echo -n "$1 [$prompt] "
read reply
# Default?
if [[ -z "$reply" ]]; then
reply=${default}
fi
# Check if the reply is valid
case "$reply" in
Y*|y*) return 0 ;;
N*|n*) return 1 ;;
esac
done
}
while [[ "$1" =~ ^- && ! "$1" == "--" ]]; do case $1 in
--dev)
APP_ENV="development"
@ -8,19 +47,23 @@ while [[ "$1" =~ ^- && ! "$1" == "--" ]]; do case $1 in
esac; shift; done
if [[ "$1" == '--' ]]; then shift; fi
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' ansible|grep "install ok installed")
echo "Checking for Ansible: $PKG_OK"
if ask "Use Docker installation method? (Recommended)" Y; then
bash docker.sh install
else
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' ansible|grep "install ok installed")
echo "Checking for Ansible: $PKG_OK"
if [[ "" == "$PKG_OK" ]]; then
sudo apt-get update
sudo apt-get install -q -y software-properties-common
sudo add-apt-repository -y ppa:ansible/ansible
if [[ "" == "$PKG_OK" ]]; then
sudo apt-get update
sudo apt-get install -q -y software-properties-common
sudo add-apt-repository -y ppa:ansible/ansible
sudo apt-get update
sudo apt-get install -q -y python2.7 python-pip python-mysqldb ansible
sudo apt-get update
sudo apt-get install -q -y python2.7 python-pip python-mysqldb ansible
fi
APP_ENV="${APP_ENV:-production}"
echo "Installing AzuraCast (Environment: $APP_ENV)"
ansible-playbook util/ansible/deploy.yml --inventory=util/ansible/hosts --extra-vars "app_env=$APP_ENV"
fi
APP_ENV="${APP_ENV:-production}"
echo "Installing AzuraCast (Environment: $APP_ENV)"
ansible-playbook util/ansible/deploy.yml --inventory=util/ansible/hosts --extra-vars "app_env=$APP_ENV"