From 8647ebee422686b5eeb2f42da7546b71a3063d52 Mon Sep 17 00:00:00 2001 From: Dan Funk Date: Wed, 20 May 2020 10:57:20 -0400 Subject: [PATCH 1/7] Moving spiff back to master branch, with fixes for parallel, and performance improvements. --- Pipfile | 2 +- Pipfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Pipfile b/Pipfile index 6f374722..6c9960d2 100644 --- a/Pipfile +++ b/Pipfile @@ -24,7 +24,7 @@ pyjwt = "*" requests = "*" xlsxwriter = "*" webtest = "*" -spiffworkflow = {editable = true,git = "https://github.com/sartography/SpiffWorkflow.git",ref = "bug/the_horror"} +spiffworkflow = {editable = true,git = "https://github.com/sartography/SpiffWorkflow.git",ref = "master"} alembic = "*" coverage = "*" sphinx = "*" diff --git a/Pipfile.lock b/Pipfile.lock index 38ab9ef7..904d32bd 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "bd289126c41b0f5f2761f0415d85e1110a584256460374a9ce4cda07c0033ddd" + "sha256": "26d23456010d3e5a559386d412cef3beacd92d5a4e474f2afdb0737ea0f20f04" }, "pipfile-spec": 6, "requires": { @@ -783,7 +783,7 @@ "spiffworkflow": { "editable": true, "git": "https://github.com/sartography/SpiffWorkflow.git", - "ref": "7dc54f1205de7006bdda6d966dc957e558f3c7f3" + "ref": "2c9698894f7e526a91bf3ca8c4b9fc9b6b01e807" }, "sqlalchemy": { "hashes": [ From 57615edde3ea915e17017ac0e8da58f585f3b47f Mon Sep 17 00:00:00 2001 From: Dan Funk Date: Wed, 20 May 2020 14:01:09 -0400 Subject: [PATCH 2/7] adding wsgi configuration. --- crconnect.wsgi | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 crconnect.wsgi diff --git a/crconnect.wsgi b/crconnect.wsgi new file mode 100644 index 00000000..2b1e701e --- /dev/null +++ b/crconnect.wsgi @@ -0,0 +1,4 @@ +import os +import sys + +from crc import app as application From 2c407ae607baaf6daa85001f013999ded3ad2301 Mon Sep 17 00:00:00 2001 From: Dan Funk Date: Wed, 20 May 2020 14:21:39 -0400 Subject: [PATCH 3/7] adding requirements.txt and a way to regenerate it. --- crconnect.wsgi | 11 +++++ deploy/requirements.txt | 90 +++++++++++++++++++++++++++++++++++ deploy/update_requirements.sh | 4 ++ 3 files changed, 105 insertions(+) create mode 100644 deploy/requirements.txt create mode 100755 deploy/update_requirements.sh diff --git a/crconnect.wsgi b/crconnect.wsgi index 2b1e701e..6c7ce423 100644 --- a/crconnect.wsgi +++ b/crconnect.wsgi @@ -1,4 +1,15 @@ +opython_home = '/usr/local/envs/crcpython3' + import os import sys +# Calculate path to site-packages directory. + +python_version = '.'.join(map(str, sys.version_info[:2])) +site_packages = python_home + '/lib/python%s/site-packages' % python_version + +# Add the site-packages directory. + +site.addsitedir(site_packages) + from crc import app as application diff --git a/deploy/requirements.txt b/deploy/requirements.txt new file mode 100644 index 00000000..420a888f --- /dev/null +++ b/deploy/requirements.txt @@ -0,0 +1,90 @@ +alabaster==0.7.12 +alembic==1.4.2 +amqp==2.5.2 +aniso8601==8.0.0 +attrs==19.3.0 +babel==2.8.0 +bcrypt==3.1.7 +beautifulsoup4==4.9.1 +billiard==3.6.3.0 +blinker==1.4 +celery==4.4.2 +certifi==2020.4.5.1 +cffi==1.14.0 +chardet==3.0.4 +click==7.1.2 +clickclick==1.2.2 +commonmark==0.9.1 +configparser==5.0.0 +connexion==2.7.0 +coverage==5.1 +docutils==0.16 +docxtpl==0.9.2 +et-xmlfile==1.0.1 +flask==1.1.2 +flask-bcrypt==0.7.1 +flask-cors==3.0.8 +flask-marshmallow==0.12.0 +flask-migrate==2.5.3 +flask-restful==0.3.8 +flask-sqlalchemy==2.4.1 +flask-sso==0.4.0 +future==0.18.2 +httpretty==1.0.2 +idna==2.9 +imagesize==1.2.0 +importlib-metadata==1.6.0 +inflection==0.4.0 +itsdangerous==1.1.0 +jdcal==1.4.1 +jinja2==2.11.2 +jsonschema==3.2.0 +kombu==4.6.8 +ldap3==2.7 +lxml==4.5.1 +mako==1.1.2 +markupsafe==1.1.1 +marshmallow==3.6.0 +marshmallow-enum==1.5.1 +marshmallow-sqlalchemy==0.23.0 +numpy==1.18.4 +openapi-spec-validator==0.2.8 +openpyxl==3.0.3 +packaging==20.4 +pandas==1.0.3 +psycopg2-binary==2.8.5 +pyasn1==0.4.8 +pycparser==2.20 +pygments==2.6.1 +pyjwt==1.7.1 +pyparsing==2.4.7 +pyrsistent==0.16.0 +python-dateutil==2.8.1 +python-docx==0.8.10 +python-editor==1.0.4 +pytz==2020.1 +pyyaml==5.3.1 +recommonmark==0.6.0 +requests==2.23.0 +six==1.14.0 +snowballstemmer==2.0.0 +soupsieve==2.0.1 +sphinx==3.0.3 +sphinxcontrib-applehelp==1.0.2 +sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-htmlhelp==1.0.3 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-serializinghtml==1.1.4 +spiffworkflow +sqlalchemy==1.3.17 +swagger-ui-bundle==0.0.6 +urllib3==1.25.9 +vine==1.3.0 +waitress==1.4.3 +webob==1.8.6 +webtest==2.0.35 +werkzeug==1.0.1 +xlrd==1.2.0 +xlsxwriter==1.2.8 +zipp==3.1.0 diff --git a/deploy/update_requirements.sh b/deploy/update_requirements.sh new file mode 100755 index 00000000..adbf1142 --- /dev/null +++ b/deploy/update_requirements.sh @@ -0,0 +1,4 @@ +jq -r '.default + | to_entries[] + | .key + .value.version' \ + ../Pipfile.lock > requirements.txt From 5f793db6065c189db3afb14caae760aec3b7ac4a Mon Sep 17 00:00:00 2001 From: Dan Funk Date: Wed, 20 May 2020 15:07:16 -0400 Subject: [PATCH 4/7] It is critical that the Pipfile python version matches the python version on the server. --- Pipfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index 6c9960d2..375ba042 100644 --- a/Pipfile +++ b/Pipfile @@ -38,4 +38,4 @@ xlrd = "*" ldap3 = "*" [requires] -python_version = "3.7" +python_version = "3.6.9" From de7cebbd7d7d349e462b8b9ee5ab863e03b4f1fa Mon Sep 17 00:00:00 2001 From: Dan Funk Date: Wed, 20 May 2020 15:32:40 -0400 Subject: [PATCH 5/7] o --- crconnect.wsgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crconnect.wsgi b/crconnect.wsgi index 6c7ce423..069796e4 100644 --- a/crconnect.wsgi +++ b/crconnect.wsgi @@ -1,4 +1,4 @@ -opython_home = '/usr/local/envs/crcpython3' +python_home = '/usr/local/envs/crcpython3' import os import sys From d0f380e2242b50a7cc3a16bcf7d1b93da97b0721 Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Wed, 20 May 2020 16:49:32 -0400 Subject: [PATCH 6/7] Uses Python 3.6.9 --- .travis.yml | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fba238f6..9ca51691 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: python python: - - "3.7" + - "3.6.9" services: - postgresql diff --git a/Dockerfile b/Dockerfile index 160a8f41..e759c07d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.7-slim +FROM python:3.6.9-slim WORKDIR /app From d76c18d329b2ebd6c64b6e2b9437263c387ae764 Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Wed, 20 May 2020 20:13:09 -0400 Subject: [PATCH 7/7] Installs curl --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e759c07d..fae1657f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,8 @@ COPY Pipfile Pipfile.lock /app/ RUN pip install pipenv && \ apt-get update && \ apt-get install -y --no-install-recommends \ - gcc python3-dev libssl-dev postgresql-client git-core && \ + gcc python3-dev libssl-dev \ + curl postgresql-client git-core && \ pipenv install --dev && \ apt-get remove -y gcc python3-dev libssl-dev && \ apt-get purge -y --auto-remove && \