Skip to content

Commit

Permalink
Merge pull request #565 from earthgecko/SNAB
Browse files Browse the repository at this point in the history
v3.0.3
  • Loading branch information
earthgecko committed May 9, 2022
2 parents 6b092ea + 17781c7 commit 878d02b
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def setup(app):
# The short X.Y version.
version = u'3.0'
# The full version, including alpha/beta/rc tags.
release = u'3.0.2'
release = u'3.0.3'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
1 change: 1 addition & 0 deletions docs/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Release Notes
:maxdepth: 1
:glob:

releases/3_0_3
releases/3_0_2
releases/3_0_0
releases/2_0_0
Expand Down
148 changes: 148 additions & 0 deletions docs/releases/3_0_3.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
=====
3.0.3
=====

v3.0.3 - May 9, 2022

This is a minor release with minor bug fixes for v3.0.2

Changes
~~~~~~~

- Change error to warning for Graphite timeseries is unavailable (4164: luminosity - cloudbursts)
- Added missing log str (#4536: Handle Redis failure)

Upgrade notes
-------------

- These update instructions apply to upgrading from v3.0.0 or v3.0.2
- There are no changes to the DB in v3.0.3
- There are no changes to settings.py in v3.0.3

How to update from v3.0.0/v3.0.2
-------------------------

- Download the new release tag or clone/update to get it to a temp location,
ready to be deployed.
- Copy your settings.py from v3.0.0/v3.0.2 and replace the v3.0.2 settings.py
- Stop the Skyline apps, backup the database and Redis, move to the new version,
start the Skyline apps.


.. code-block:: bash
# Get the new version
NEW_SKYLINE_VERSION="v3.0.3" # Your new Skyline version
OLD_SKYLINE_VERSION="v3.0.2" # Your old Skyline version
# OLD_SKYLINE_VERSION="v3.0.0" # Your old Skyline version
CURRENT_SKYLINE_PATH="/opt/skyline/github/skyline" # Your Skyline path
NEW_SKYLINE_PATH="${CURRENT_SKYLINE_PATH}.${NEW_SKYLINE_VERSION}" # Your new Skyline path
mkdir -p "${CURRENT_SKYLINE_PATH}.${NEW_SKYLINE_VERSION}"
cd "${CURRENT_SKYLINE_PATH}.${NEW_SKYLINE_VERSION}"
git clone https://github.com/earthgecko/skyline .
git checkout "$NEW_SKYLINE_VERSION"
# settings.py
cp "$NEW_SKYLINE_PATH/skyline/settings.py" "$NEW_SKYLINE_PATH/skyline/settings.py.${NEW_SKYLINE_VERSION}.bak"
# Create a new settings.py file in the new version based on your existing
# settings.py file
cat "${CURRENT_SKYLINE_PATH}/skyline/settings.py" > "$NEW_SKYLINE_PATH/skyline/settings.py"
# **TEST**
# Test your new settings.py BEFORE continuing with the upgrade,
# test_settings.sh runs the validate_settings.py that the Skyline apps run
# when they start
$NEW_SKYLINE_PATH/bin/test_settings.sh
# Stop/disable any/all service controls like monit, etc that are controlling
# Skyline services.
# NOTE ALL SKYLINE SERVICES ARE LISTED HERE, REMOVE TO ONES YOU DO NOT RUN
# or do not wish to run.
SKYLINE_SERVICES="analyzer
analyzer_batch
mirage
crucible
boundary
ionosphere
luminosity
panorama
webapp
vista
snab
flux
horizon"
for i in $SKYLINE_SERVICES
do
systemctl stop "$i"
done
- Move your current Skyline directory to a backup directory and move the new
Skyline v3.0.3 with your new settings.py from the temp location to your
working Skyline directory, (change your paths as appropriate) e.g.

.. code-block:: bash
mv "$CURRENT_SKYLINE_PATH" "${CURRENT_SKYLINE_PATH}.${OLD_SKYLINE_VERSION}"
mv "$NEW_SKYLINE_PATH" "$CURRENT_SKYLINE_PATH"
# Set permission on the dump dir
chown skyline:skyline "$CURRENT_SKYLINE_PATH"/skyline/webapp/static/dump
- Start the all Skyline services (change as appropriate for your set up) e.g.

.. code-block:: bash
# NOTE ALL SKYLINE SERVICES ARE LISTED HERE, REMOVE TO ONES YOU DO NOT RUN
# apart from the new thunder Skyline app
# Start all other Skyline services
SKYLINE_SERVICES="horizon
flux
panorama
webapp
vista
analyzer
analyzer_batch
mirage
crucible
boundary
ionosphere
luminosity
snab
thunder"
for i in $SKYLINE_SERVICES
do
systemctl start "$i"
if [ $? -ne 0 ]; then
echo "failed to start $i"
else
echo "started $i"
fi
done
# Restart any/all service controls like monit, etc that are controlling
# Skyline services.
- Check the logs

.. code-block:: bash
# How are they running
tail -n 20 /var/log/skyline/*.log
# Any errors - each app
find /var/log/skyline -type f -name "*.log" | while read skyline_logfile
do
echo "#####
# Checking for errors in $skyline_logfile"
cat "$skyline_logfile" | grep -B2 -A10 -i "error ::\|traceback" | tail -n 60
echo ""
echo ""
done
Congratulations, you are now running the best open source anomaly detection
stack in the world (probably).
2 changes: 1 addition & 1 deletion skyline/skyline_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
# __version_info__ = ('2', '1', '0-4448')
__branch__ = 'master'
__version_tag__ = 'release'
__version_info__ = ('3', '0', '2')
__version_info__ = ('3', '0', '3')

__version__ = '.'.join(__version_info__)
# @modified 20190117 - release #2748: v1.2.11
Expand Down
8 changes: 6 additions & 2 deletions utils/dawn/skyline.dawn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# @modified 20210328 - [Q] The "horizon.test.pickle" test is getting an error. #419
# @modified 20220423 - Task #4534: Build and test skyline v3.0.0
# @modified 20220506 - Release #4552: v3.0.2
# @modified 20220509 - Release #4552: v3.0.3
# @modified
# @license
# @source https://github.com/earthgecko/skyline/utils/dawn/skyline.dawn.sh
Expand Down Expand Up @@ -53,7 +54,10 @@ WEBAPP_AUTH_USER_PASSWORD="$(echo ${HOSTNAME}_skyline)" # The password you wa
MYSQL_ROOT_PASSWORD="set_the-root-mysql-user-password" # The MySQL root user password
MYSQL_SKYLINE_PASSWORD="set_the-skyline-user-db-password" # The Skyline DB user password
REDIS_PASSWORD="set_really_long_LONG-Redis-password" # The Redis password
SKYLINE_RELEASE="v3.0.2" # The Skyline release to deploy
# @modified 20220423 - Task #4534: Build and test skyline v3.0.0
# @modified 20220506 - Release #4552: v3.0.2
# @modified 20220509 - Release #4552: v3.0.3
SKYLINE_RELEASE="v3.0.3" # The Skyline release to deploy
# @added 20191016 - Branch #3262: py3
INSTALL_GRAPHITE=1 # Install Graphite 0 = no, 1 = yes (CentOS 8 only)
# @modified 20220423 - Task #4534: Build and test skyline v3.0.0
Expand Down Expand Up @@ -913,7 +917,7 @@ if [ ! -f /tmp/skyline.dawn.skyline.requirements.txt ]; then
# "bin/pip${PYTHON_MAJOR_VERSION}" install $(cat /opt/skyline/github/skyline/requirements.txt | grep "^numpy\|^scipy\|^patsy" | tr '\n' ' ')
# "bin/pip${PYTHON_MAJOR_VERSION}" install $(cat /opt/skyline/github/skyline/requirements.txt | grep "^pandas==")
# @modified 20220506 - Release #4552: v3.0.2
# Changed pip to --use-deprecated=legacy-resolver
# Changed pip to --use-deprecated=legacy-resolver
cat /opt/skyline/github/skyline/requirements.txt | grep "^numpy\|^scipy\|^patsy" > /tmp/requirements.1.txt
"bin/pip${PYTHON_MAJOR_VERSION}" --use-deprecated=legacy-resolver install -r /tmp/requirements.1.txt
cat /opt/skyline/github/skyline/requirements.txt | grep "^pandas==" > /tmp/requirements.2.txt
Expand Down

0 comments on commit 878d02b

Please sign in to comment.