This flask
application is a demo for listing, creating, viewing, and
deleting files from the following storage types:
- Local storage: either by using container storage or a PersistentVolume (recommended)
- S3 storage from AWS or other compatible service
- S3 NooBaa object storage from OpenShift Container Storage
This application requires OpenShift Container Storage to be installed and configured in the OCP cluster before deploying since it uses the following storage classes provided by OCS:
For reference, OpenShift Container Storage Operator and Local Storage Operator provide the following storage classes on the OCP cluster:
nfs-storage
local-volume-class
ocs-storagecluster-cephfs
ocs-storagecluster-ceph-rbd
ocs-storagecluster-ceph-rgw
openshift-storage.noobaa.io
There is a kustomization
folder that contains all the
resources needed to deploy the application in the three variants
(ephemeral
, pvc
, s3
, and s3-obc
).
If the deployment type is s3
, be sure to fill the appropriate details on the
following files:
For the s3-obc
there is no need to provide the Secret
and ConfigMap
since
they are created automatically by the ObjectBucketClaim
resource.
There is also a Makefile
that aids in deploying and cleaning up resources,
$ make deploy [TYPE=<ephemeral|pvc|s3|s3-obc>]
$ oc new project image-tool
$ oc kustomize kustomization/overlays/pvc/ | oc apply -f -
Depending on the type of deployment used you can access the web interface in one of the following URLs:
The web page will tell you which storage type is being used.
$ make clean [TYPE=<ephemeral|pvc|s3|s3-obc>]
$ oc project default
$ oc delete project/image-tool