-
Notifications
You must be signed in to change notification settings - Fork 488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Iqss/#8380 counter-processor version update #8391
Changes from 5 commits
840cd1e
e07f60c
c321d17
3493b20
7f5cc93
ac19d9f
a372fe4
4bc6384
7405b8c
61d8933
52e0e1c
c3596b8
e5aa0dc
b7eafec
3d6c2b4
2b749ca
6d4d16b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -96,7 +96,7 @@ PostgreSQL | |||||
---------- | ||||||
|
||||||
Installing PostgreSQL | ||||||
======================= | ||||||
===================== | ||||||
|
||||||
The application has been tested with PostgreSQL versions up to 13 and version 10+ is required. We recommend installing the latest version that is available for your OS distribution. *For example*, to install PostgreSQL 13 under RHEL7/derivative:: | ||||||
|
||||||
|
@@ -425,20 +425,30 @@ Counter Processor has only been tested on el7 (see "Linux" above). Please note t | |||||
As root, download and install Counter Processor:: | ||||||
|
||||||
cd /usr/local | ||||||
wget https://github.com/CDLUC3/counter-processor/archive/v0.0.1.tar.gz | ||||||
tar xvfz v0.0.1.tar.gz | ||||||
wget https://github.com/CDLUC3/counter-processor/archive/v0.1.04.tar.gz | ||||||
tar xvfz v0.1.04.tar.gz | ||||||
cd /usr/local/counter-processor-0.1.04 | ||||||
|
||||||
Installing GeoLite Country Database | ||||||
=================================== | ||||||
|
||||||
As root, change to the Counter Processor directory you just created, download the GeoLite2-Country tarball, untar it, and copy the geoip database into place:: | ||||||
Counter Processor can report per country results if the optional GeoLite Country Database is installed. At present, this database is free but to use it one must signing an agreement (EULA) with MaxMind. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
(The primary concern appears to be that individuals can opt-out of having their location tracked via IP address and, due to various privacy laws, MaxMind needs a way to comply with that for products it has "sold" (for no cost in this case). Their agreement requires you to either configure automatic updates to the GeoLite Country database or be responsible on your own for managing take down notices.) | ||||||
The process required to sign up, download the database, and to configure automated updating is described at https://blog.maxmind.com/2019/12/18/significant-changes-to-accessing-and-using-geolite2-databases/ and the links from that page. | ||||||
|
||||||
cd /usr/local/counter-processor-0.0.1 | ||||||
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz | ||||||
As root, change to the Counter Processor directory you just created, download the GeoLite2-Country tarball from MaxMind, untar it, and copy the geoip database into place:: | ||||||
|
||||||
<download or move the GeoLite2-Country.tar.gz to the /usr/local/counter-processor-0.1.04 directory> | ||||||
tar xvfz GeoLite2-Country.tar.gz | ||||||
cp GeoLite2-Country_*/GeoLite2-Country.mmdb maxmind_geoip | ||||||
|
||||||
Creating a counter User | ||||||
======================= | ||||||
|
||||||
As root, create a "counter" user and change ownership of Counter Processor directory to this new user:: | ||||||
|
||||||
useradd counter | ||||||
chown -R counter:counter /usr/local/counter-processor-0.0.1 | ||||||
chown -R counter:counter /usr/local/counter-processor-0.1.04 | ||||||
|
||||||
Installing Counter Processor Python Requirements | ||||||
================================================ | ||||||
|
@@ -456,7 +466,7 @@ Install Python 3.6:: | |||||
Install Counter Processor Python requirements:: | ||||||
|
||||||
python3.6 -m ensurepip | ||||||
cd /usr/local/counter-processor-0.0.1 | ||||||
cd /usr/local/counter-processor-0.1.04 | ||||||
pip3 install -r requirements.txt | ||||||
|
||||||
See the :doc:`/admin/make-data-count` section of the Admin Guide for how to configure and run Counter Processor. | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ python3.6 -m ensurepip | |
COUNTER_USER=counter | ||
pdurbin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
echo "Ensuring Unix user '$COUNTER_USER' exists" | ||
useradd $COUNTER_USER || : | ||
COMMIT='a73dbced06f0ac2f0d85231e4d9dd4f21bee8487' | ||
COMMIT='7974dad259465ba196ef639f48dea007cae8f9ac' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need to change this right now but we could switch to a release instead of commit when downloading. Originally, we used a commit because there were no releases ( CDLUC3/counter-processor#2 ). |
||
UNZIPPED_DIR="counter-processor-$COMMIT" | ||
if [ ! -e $UNZIPPED_DIR ]; then | ||
ZIP_FILE="${COMMIT}.zip" | ||
|
@@ -20,19 +20,7 @@ if [ ! -e $UNZIPPED_DIR ]; then | |
unzip $ZIP_FILE | ||
fi | ||
cd $UNZIPPED_DIR | ||
GEOIP_DIR='maxmind_geoip' | ||
GEOIP_FILE='GeoLite2-Country.mmdb' | ||
GEOIP_PATH_TO_FILE="$GEOIP_DIR/$GEOIP_FILE" | ||
if [ ! -e $GEOIP_PATH_TO_FILE ]; then | ||
echo "let's do this thing" | ||
TARBALL='GeoLite2-Country.tar.gz' | ||
wget https://geolite.maxmind.com/download/geoip/database/$TARBALL | ||
tar xfz GeoLite2-Country.tar.gz | ||
# Glob (*) below because of directories like "GeoLite2-Country_20181204". | ||
GEOIP_UNTARRED_DIR='GeoLite2-Country_*' | ||
mv $GEOIP_UNTARRED_DIR/$GEOIP_FILE $GEOIP_PATH_TO_FILE | ||
rm -rf $TARBALL $GEOIP_UNTARRED_DIR | ||
fi | ||
echo "Installation of the GeoLite2 country database for counter-processor can no longer be automated. See the Installation Guide for the manual installation process." | ||
pip3 install -r requirements.txt | ||
# For now, parsing sample_logs/counter_2018-05-08.log | ||
for i in `echo {00..31}`; do | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a general comment I'm adding to the top... the branch has a
#
in it. I forget if this causes problems deploying to QA servers or not.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW: it is easy to rename the branch but I think that closes the PR (any way around that?) - let me know if this is needed for the QA build.