-
Make sure you have the latest version of Minishift installed.
-
Run the following commands:
./scripts/minishift_start.sh ./scripts/prepare.sh ./deploy/deploy-image.sh $(minishift ip):8443 mobile -
Open the mobile developer console URL printed by the script.
-
Make sure you have
ocCLI installed and logged into the remote cluster as a cluster-admin user.oc login <openshift-url>
-
Export
NAMESPACEandOPENSHIFT_HOSTvariables and runprepare.shscript:export NAMESPACE="<your-project-name>" export OPENSHIFT_HOST="<your-openshift-host>" ./scripts/prepare.sh
-
Deploy the service using one of the following commands:
# Deploy the latest image ./deploy/deploy-image.sh $OPENSHIFT_HOST $NAMESPACE # OR deploy the service using S2I ./deploy/deploy-image-stream.sh $OPENSHIFT_HOST $NAMESPACE <git-ref>
- Nodejs >= 10
- An OpenShift cluster. You can either use a local cluster, or a remote cluster.
It is recommended to use the latest release of Minishift to run the local cluster. Make sure you have it installed and then run the following commands to start development locally:
./scripts/minishift_start.sh
./scripts/prepare.sh
./scripts/development.sh # You can add "--skip-npm-install" argument if you want to skip installation of node modulesIf you are using a remote cluster, make sure you have oc CLI installed locally and login to the remote cluster. You will need a user that has cluster-admin permission.
oc login <openshift-url>then you need to run the prepare script:
./scripts/prepare.shand start the development server:
export OPENSHIFT_HOST=<openshift-hostname>
export OPENSHIFT_USER_TOKEN=$(oc whoami -t)
npm run start:server &
npm run start:clientThis will start the MDC in development mode, and you should see the console opened inside a browser tab. It will watch local files and the browser tab will be refreshed automatically whenever changes are made inside the ./src directory.
NOTE: As of version 1.1.12 this is not required anymore as MDC provides a proxy between itself and the Openshift API
The mobile developer console will need to talk to the OpenShift API server directly. However, the requests will likely to be blocked by the browser due to CORS restrictions.
To fix this, you will need to manually update the OpenShift master configuration to allow CORS requests from the mobile developer console.
If you are using Minishift, you should use the CORS addon. Installation of this plugin is automated in ./scripts/minishift_start.sh.
If you are using a remote cluster, you should check OpenShift configuration guide on how to update the CORS configurations.
make buildmake testCreate a new Git tag and the CI job will automatically push the built image to quay.io.