Subscribe to our blog

Parse is a well-known open source Mobile Backend-as-a-Service

If you haven't seen the previous post on how to run Parse Server on OpenShift, please take a look Parse Server on OpenShift Online (Next Gen).

Here, I'll focus more on dashboard and Parse Server integration. Running Parse mobile backend on OpenShift has been greatly simplified and made available in a few commands.

Note: If you're using self-signed certs for your router, then you need to accept them for the dashboard URL and Parse Server URL, otherwise you may see issues.

Create a Namespace and Provide Appropriate Permissions

$ oc new-project parse
$ oc adm policy add-scc-to-user anyuid -z default -n parse
$ oc adm policy add-scc-to-user privileged -z default -n parse

Importing Parse Server Example Template

$ oc create -f https://raw.githubusercontent.com/parse-community/parse-server-example/master/openshift.json
$ oc new-app parse-server-example  -e APP_ID=myappid -e MASTER_KEY=supersecret
$ oc patch route/parse-server-example -p '{"spec":{"tls": {"termination":"edge"}}}'
$ oc get routes -l app=parse-server-example -o jsonpath='{.items[*].spec.host}'
$ PARSE_SERVER_URL=$(oc get routes -l app=parse-server-example -o jsonpath='{.items[*].spec.host}')
$ PARSE_SERVER_URL='https://'$PARSE_SERVER_URL'/parse'
$ oc volume dc/mongodb --remove --name mongodb-data #incase you dont have persistent volume

Deploy Parse Dashboard

$ oc project parse
$ oc new-app https://github.com/parse-community/parse-dashboard.git \
-e PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=true \
-e PARSE_DASHBOARD_SERVER_URL=$PARSE_SERVER_URL \
-e PARSE_DASHBOARD_MASTER_KEY="supersecret" \
-e PARSE_DASHBOARD_APP_ID="myappid" \
-e PARSE_DASHBOARD_APP_NAME="MyApp" \
-e PARSE_DASHBOARD_USER_ID="user1" \
-e PARSE_DASHBOARD_USER_PASSWORD="pass"
$ oc expose dc parse-dashboard --port=4040
$ oc expose svc parse-dashboard
$ oc patch route/parse-dashboard -p '{"spec":{"tls": {"termination":"edge"}}}'
$ oc get routes

How to Use?

Open the the dashboard URL and use the following credentials for logging into the Parse Dashboard: user1/pass
parse dashboard screenshot

Conclusion

You can deploy and scale your Parse Server easily using OpenShift. OpenShift has the capability to autoscale, so deploy your Parse Server and set it to scale on demand.

For simplicity, this post did not use a persistent volume, but if you need data persisted use OpenShift volumes.


About the author

Browse by channel

automation icon

Automation

The latest on IT automation that spans tech, teams, and environments

AI icon

Artificial intelligence

Explore the platforms and partners building a faster path for AI

open hybrid cloud icon

Open hybrid cloud

Explore how we build a more flexible future with hybrid cloud

security icon

Security

Explore how we reduce risks across environments and technologies

edge icon

Edge computing

Updates on the solutions that simplify infrastructure at the edge

Infrastructure icon

Infrastructure

Stay up to date on the world’s leading enterprise Linux platform

application development icon

Applications

The latest on our solutions to the toughest application challenges

Original series icon

Original shows

Entertaining stories from the makers and leaders in enterprise tech