Skip to content
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

P4 2879 Cortex - Phantom-Snap Page Rendering #29

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open

Conversation

jrentsch
Copy link

@jrentsch jrentsch commented Jan 26, 2022

For the Reviewer

  • Code review complete
  • Testing Complete
  • Quality ORT App Documentation Updated (your name is in the Validator square for this feature)

When this is complete, you should approve the PR via github.

For the Reviewee

P4 2879 Cortex - Phantom-Snap Page Rendering

Summary

  • Created Dockerfile that contains PhantomJS and runs a uvicorn/fastapi api entrypoint, built on python:3.7-buster
    # /docker created files:

    • .env # Environment variables/example to use when building/running the docker container
    • entrypoint.py # Fastapi/uvicorn api, valid requests sent to handler.py
    • handler.py # creates a lifetime phantom-snap renderer and renders requests that are returned via entrypoint.py
    • openssl.cnf # Modified openssl.cnf (Line 355 disabled) to enable PhantomJS to run in Buster
    • requirements.txt # required python packages for docker build
  • Created docker-compose.yml # Build and run container via docker-compose

  • Modified /phantom_snap/settings.py # Update to contain default settings for Cortex Renderer

  • Created /phantom_snap/cortex_renderer.py # Cortex Renderer (similar to lambda_renderer)

Release Note

Created Dockerfile that runs phantom-snap page rendering via direct request or through cortex_renderer.py

Breaking Changes

None.

Quality Assurance

You have gathered the following items:

  • This PR is tagged with a Release Milestone
  • You have a log message clearly identifying when this feature is working successfully
  • You have a log message clearly identifying when this feature is failing
  • You added a PR against p4-alerting to trigger based on the failure condition above

Given all of the items above, you have updated your Application ORT at the following locations:

  • Features and Alerting: Required.
  • P4 Alerting: Required.

Testing and Verification

Steps to test your application for someone not familiar with it. Required.

  1. Do this:
    In the phantom-snap directory, run:

    • $docker-compose up -d
    • $python3 phantom_snap/tests/test_docker_phantom.py
  2. Look for this.

    • Output from test indicating 'success'
  3. Clean up with this command

    • $docker-compose down && docker rm phantom-snap
    • Remove the phantom-snap image with $docker image rm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant