Southern-Coalition-Team-19 / southerncoalition

GNU General Public License v3.0
0 stars 4 forks source link

Create a new container microservice to run CutyCapt to turn LucidWorks Banana analytics into static file images to use in report cards. #12

Open computate opened 4 years ago

computate commented 4 years ago

Willing to learn CutyCapt, Apache Solr, LucidWorks Banana, Containers, image processing and quay.io.

computate commented 4 years ago

You might try embedding CutyCapt in the actual container image of the running southerncoalition application to be executed as a background task to reduce the number of pods. See the OpenShift Development course for more details: https://role.rhu.redhat.com/rol-rhu/app/courses/do288-4.2/pages/ch05s05

sudo yum install -y source-to-image
sudo install -d -o $USER -g $USER /usr/local/src/southerncoalition-s2i
s2i create southerncoalition-s2i /usr/local/src/southerncoalition-s2i
cd /usr/local/src/southerncoalition-s2i

The s2i create command creates a template Dockerfile with comments, tailored for running on an OpenShift cluster with a random user ID and OpenShift-specific labels. It also creates stubs for the S2I scripts that you can customize to fit the needs of your application. After you update the Dockerfile and S2I scripts as needed, you can build the builder image using the podman build command.

Update the Dockerfile to include CutyCapt as a yum dependency.

'''Dockerfile RUN yum install -y epel-release && yum install -y CutyCapt && yum clean all -y

I think the build is normally based on this Dockerfile here: 

https://catalog.redhat.com/software/containers/redhat-openjdk-18/openjdk18-openshift/58ada5701fbe981673cd6b10?container-tabs=dockerfile

But instead of running FROM rhel7:7-released, it might need to run FROM openshift/base-centos7 or centos8

```bash
sudo podman build -t southerncoalition-s2i .

When the builder image is ready, you can build an application container image using the s2i build command. This allows you to test the S2I builder image locally, without the need to push it to a registry server and deploy an application using the builder image to an OpenShift cluster:

s2i build src southerncoalition-s2i latest

Then we can deploy it to quay.io and deploy it to our application.