
Mobile Client Service
Prerequisites
Setup
Checkout to $GOPATH/src/github.com/aerogear
mkdir -v $GOPATH/src/github.com/aerogear
git clone https://github.com/aerogear/mobile-client-service $GOPATH/src/github.com/aerogear/mobile-client-service
make setup
Build
# Build the API server
make build
# Build the UI
make ui
Run
Run locally
If you don't have openshift running
oc cluster up
Create the Mobile Client custom resource definition
oc create -f deploy/crd.yaml
There is an example custom resource template at deploy/cr.yaml to create Mobile Client instances.
Create a new target project
oc new-project <target-project>
Now set the NAMESPACE env var to point at the target-project
export NAMESPACE=<target-project>
Also set KUBERNETES_CONFIG to point to your .kube/config which is usually at $HOME/.kube/config
export KUBERNETES_CONFIG=$HOME/.kube/config
Then
make serve
Run on OpenShift
oc project <namespace>
oc process -f mobile-client-service.template.yaml | oc create -f -
For more information on parameters, run:
oc process -f mobile-client-service.template.yaml --parameters
Test
make test
Generate the API definition for the CRD
If you are changing the type definition of (MobileClient)[./pkg/apis/aerogear/v1alpha1/types.go], you should run the following command to regenerate some of the files.
Make sure you have the operator-sdk installed locally, and then run
operator-sdk generate k8s