This plug-in was built to test the process of deploying an extremely simple app based on the ChRIS application environment on OpenShift
To test this, I wrote a really simple python script which makes an API call to ygoprodeck, available here, requests 10 random cards from their database, and stores all of the information for each of those cards as a single line in a json file titled random_cards.json at the specified output_dir.
In order to implement the app on OpenShift, a Docker image needed to be created. Building the image on my computer (an m1 mac) resulted in some issues, so I resorted to a bit of a workaround.
- I used the OpenShift website to attempt to build the container from this github repository.
- Once built, I copied the location of the image created on the internal OpenShift registry located in the administrator layout at Builds->ImageStreams->randomcard->details->Image Repository
- I ran create_randomcard.yml placing the copied image location at "image" here on my local computer, using oc apply -f create_randomcard.yml
A few notes:
- The persistent volume claim used with this application was created on the OpenShift website
- Given the pod is designed to start and then close, the restartPolicy specification needs to be set to OnFailure in the create_randomcard.yml, otherwise the pod will enter into a CrashLoopBackOff error
- This page will be updated after I've had the chance to build the docker image on a non-m1 mac to see if that resolves the need for the OpenShift imagestream workaround