24 Commits
Author SHA1 Message Date
California Sullivan 5fc1e4980f deploy.sh: finally bump SQLAlchemy version
With the collector back in the repo and working with the latest UI, we
can now bump the SQLAlchemy version.

Also update the requirements.txt file that github scans.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
2019-04-25 09:16:23 -07:00
California Sullivan cb52b309f5 deploy.sh: install uwsgidecoders correctly, don't pip install uwsgi
We aren't using the uwsgi python library anywhere so don't pip install
it. We just use the binary which can and should be supplied by the
distro.

uwsgidecoders is a normal python library we rely on, so install it the
same way we install other libraries.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
2019-04-25 09:16:23 -07:00
California Sullivan 0653a0643a scripts: use a new sites_nginx.conf file for deploy.sh
We need the sites_nginx.conf file that includes collector support for
deploy.sh as well as the one that does not include collector support for
deployui.sh.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
2019-04-25 09:16:23 -07:00
California Sullivan 16154a7f25 collector: update to work with latest UI
Minor changes to the collector code were necessary for it to be
compatible with the latest telemetryui. For example, the database was
renamed to "telemetry" and classifications and build IDs are no longer
in separate tables. These resulted in small changes to the config.py in
the collector directory and the report_handler.py file.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
2019-04-25 09:16:23 -07:00
California Sullivan 4cad0d4808 collector: re-add to project
Partially revert commits 6a2b1dd1 'Redesigned the telemetry backend app'
and fa4b233f 'Removed the "shared" folder'.

These commits removed the collector app from the telemetrics-backend
project, but we still supported deploying the collector from old
versions of the project. This resulted in a situation where we could not
update collector code.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
2019-04-25 09:16:23 -07:00
California Sullivan 58b53d43c4 deploy(ui).sh: fix package installation un Ubuntu 16.04
Ubuntu 16.04 does not have a 'redis' package, it has 'redis-server'.
Ubuntu 18.04 has both and they're essentially aliases of eachother.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
2019-04-18 07:54:18 -07:00
California Sullivan b3735bbc02 deploy(ui).sh: do_deploy: also do_upgrade_pkgs
When we deploy new code we should also be sure to upgrade the python
packages in the virtualenv to match the code.

Also fix the deployui.sh script's do_deploy. There was no conf variable
set in _get_db_pass, causing the script to hang.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
2019-04-17 15:00:32 -07:00
California Sullivan 97557f9395 deploy(ui).sh: add upgradepkgs function
This will install current requirements into the virtualenv. Previously
we had no easy way to do so.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
2019-04-17 15:00:32 -07:00
California Sullivan 79303be6f1 deployui.sh: upgrade SQLAlchemy python package
Fixes CVE-2019-7548 in the latest UI.

deploy.sh also needs to be updated, but it requires code changes and
some housekeeping.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
2019-04-17 15:00:32 -07:00
California Sullivan d2e92db72f requirements: upgrade Jinja2, add redis
Fixes CVE-2019-10906.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
2019-04-17 15:00:32 -07:00
ajch 63a62deb78 Remove nginx version and server OS
Updating configuration to remove details from information returned to clients.
2019-03-13 13:58:42 -07:00
California Sullivan 4dd3fac131 scripts/deploy(ui).sh: remove clear distinction for psycopg2 install
With the upgraded psycopg2 version this no longer works and in fact
causes the following error:

Command "/var/www/telemetry/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-froo6p21/psycopg2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-bv0up7o3/install-record.txt --single-version-externally-managed --compile --install-headers /var/www/telemetry/venv/include/site/python3.7/psycopg2" failed with error code 1 in /tmp/pip-install-froo6p21/psycopg2/

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
2019-02-28 08:55:56 -08:00
California Sullivan 77a62b5a99 deploy(ui).sh: add redis requirements and config
The caching additions require redis and the redis python module. Add
them to the requirements, and also enable/start redis where appropriate.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
2019-02-28 08:55:56 -08:00
California Sullivan abd94a145c deploy(ui).sh: update psycopg2 requirement
v2.7.3 does not work on Ubuntu 18 or recent versions of Clear. Use
v2.7.6 instead.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
2019-02-28 08:55:56 -08:00
California Sullivan 81cb30874d deploy(ui).sh: remove apt-get remove commands
These could be required for other software on the system, not just the
telemetryui, and should not be unconditionally removed. Instead just
tell the user that they can remove them if they wish.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
2019-02-28 08:55:56 -08:00
Alex Jaramillo f12e1ff831 Adding uWSGI dependencies
Spool processing of crashes requires uwsgidecorators module, in clear
linux the module uwsgi is provided by a bundle but not the decorator.
This change adds installation of uwsgidecorators module to section where
requirements are installed based on the distro.

Signed-off-by: Alex Jaramillo <alex.v.jaramillo@intel.com>
2018-10-08 11:40:42 -07:00
Alex Jaramillo 57da63591b Forking deploy script
Forking deploy script to support deployment of releases (tagged) and to
have a script to deploy ui only.

Signed-off-by: Alex Jaramillo <alex.v.jaramillo@intel.com>
2018-10-02 13:49:43 -07:00
Alex Jaramillo b280a88f1a Bumping Flask version to 0.12.3
Updating required flask version to 0.12.3 that has a patch that fixes
CVE-2018-1000656. App is know to work with Flask 0.12.3

Signed-off-by: Alex Jaramillo <alex.v.jaramillo@intel.com>
2018-08-31 13:03:59 -07:00
Reagan Lopez 6a2b1dd185 Redesigned the telemetry backend app.
- Added migration code to modify 'records' table as follows:
   - Rename 'os_name' ==> 'system_name'
   - Rename 'machine' ==> 'host_type'
   - Rename 'payload_format_version' ==> 'payload_version'
   - Rename 'record_format_version' ==> 'record_version'
   - Rename 'tsp' ==> 'timestamp_client'
   - Rename 'tsp_server' ==> 'timestamp_server'
   - Modify 'payload' type from binary to text
   - Remove 'buildstamp'
   - Remove 'dupe_of'
   - Remove 'dupecount'
   - Remove 'dupemaster'
   - Remove 'security'
   - Remove 'hide'
   - Remove 'icon'
   - Add 'build'
   - Add 'classification'

  - Updated code to reflect the above design changes.
  - Updated code to remove references to 'backtrace' column.
    But not from the table because data migration from
    'backtrace' to 'payload' should be done first.

 - Added migration code to update the table data based on the above
   design changes.

 - Added migration code to update the Views based on the above design
   changes.

 - Removed the 'collector' app.

 - Modified database name to 'telemetry'.

 - Added code to filter out build id >= 100000.
2018-08-31 09:51:11 -07:00
avjarami e12d0bb68d Improvements to vassals ini files
Using system provided uwsgi and reworking application definition
section for telemetry and collector vassals.

clr-on-clr bundle no longer needed for Clear Linux.

Running 'apt-get update' and 'yum check-update' before installing
packages.

Signed-off-by: avjarami <alex.v.jaramillo@intel.com>
2018-04-10 21:03:44 -07:00
Gabriel Briones Sayeg da76a70100 Deploy script single pip install
Signed-off-by: Gabriel Briones Sayeg <gabriel.briones.sayeg@intel.com>
2017-10-09 13:28:05 -07:00
Gabriel Briones Sayeg 1898b2ccd1 Centos with SELinux install
Signed-off-by: Gabriel Briones Sayeg <gabriel.briones.sayeg@intel.com>
2017-10-09 13:28:05 -07:00
avjarami 2a1e87de81 Creating requirements file during installation
Requirements file will not be present when deploy.sh
script is executed, this means it should be created
during the deploy script execution, requirements.txt
will be created under /tmp folder.
2017-08-22 16:43:53 -07:00
Patrick McCarty ca5ff6cd39 Initial commit
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2017-08-11 15:28:56 -07:00