-
Check Minishift version is at least 1.16.1:
$ minishift version minishift v1.16.1+d9a86c9
Note: Make sure you have setup proper virtualization environment: https://docs.openshift.org/latest/minishift/getting-started/setting-up-virtualization-environment.html#setting-up-xhyve-driver
-
Clone the minishift-mobilecore-addon repo.
-
Add mobilecore to the minishift add-ons catalog:
minishift addons install -f minishift-mobilecore-addon/ minishift addons enable minishift-mobilecore-addon
NoteOn subsequent installs, make sure to update the minishift-mobilecore-addon
repo (git pull
) before running these commands to ensure the addon and mobile-core versions are compatibile.
Note
|
You may want to install the admin user addon for minishift to give
you an admin user to login in with Enable the admin-user addons by default (or apply it later):
minishift addons enable admin-user
|
minishift addons enable admin-user
-
Set the following environment variables:
export MINISHIFT_ENABLE_EXPERIMENTAL=y export CONTAINER_REPO_USERNAME=<docker hub username> export CONTAINER_REPO_PASSWORD=<docker hub password>
NoteIf you use a Docker Hub organization, set a variable for it using export CONTAINER_REPO_ORG=<your docker hub org>
. If you don’t specify CONTAINER_REPO_ORG in the next step, theaerogearcatalog
organization is used. -
Configure Minishift for AeroGear:
minishift config set addon-env CONTAINER_REPO_USERNAME=${CONTAINER_REPO_USERNAME},CONTAINER_REPO_PASSWORD=${CONTAINER_REPO_PASSWORD}
Other options include:
-
CONTAINER_REPO_ORG: defaults to 'aerogearcatalog', specifies where to search for service catalog items.
-
CORE_REPO: defaults to 'aerogear', specifies the organziation or user in github to install the mobile-core component, that is, https://github.com/<CORE_REPO>/mobile-core.git.
-
CORE_BRANCH defaults to 'master', specifies the branch in the the CORE_REPO to install.
-
CONSOLE_IMAGE defaults to 'openshift/origin-web-console:v3.9.0', change this to specify a particular image to use for running the console.
-
-
Configure Minishift resources
AeroGear recommends configuring Minishift to start with extra CPUs and RAM:
minishift config set cpus 4 minishift config set memory 4096
-
Clear Minishift to enable mobile core:
minishift stop minishift delete
-
Create a new Minishift cluster with service catalog and mobile core:
minishift start --openshift-version v3.9.0 --extra-clusterup-flags "--service-catalog"
If you did not enable the addon, you need to apply it manually:
minishift addons apply minishift-mobilecore-addon
When the installation is complete you are prompted to login using either the
oc
CLI or the OpenShift web console:OpenShift server started. The server is accessible via web console at: https://192.168.42.193:8443 You are logged in as: User: developer Password: <any value> To login as administrator: oc login -u system:admin -- Applying addon 'mobilecore':..................... Installing and starting MCP extension, this can take a while .... Installing Ansible Service Broker.. mobile core successfully enabled
-
If you can see the the OpenShift service catalog, but not the mobile tab, note that the installation may not have completed. Wait some time before reviewing Mobile tab not appearing in the service catalog section.
-
Try deleting the Minishift VM and restarting:
minishift stop minishift delete minishift start --openshift-version v3.9.0 --service-catalog
-
Confirm the addon-env config values are correct:
minishift config get addon-env
If values are incorrect, follow the instructions in Setting up Minishift.
-
Review the following scenarios:
This is an error output by Minishift when it is running without the MINISHIFT_ENABLE_EXPERIMENTAL
environment variable set to 'y'. To correct this run the following in your current shell:
export MINISHIFT_ENABLE_EXPERIMENTAL=y
-
Make sure the Ansible Service Broker is running:
-
Log into your Minishift cluster as admin:
oc login -u system:admin
-
Check that the asb pod is running correctly in the
ansible-service-broker
namespace:oc get pods -n ansible-service-broker
If the asb pod is running correctly, you see something similar to the following:
NAME READY STATUS RESTARTS AGE asb-1-8n4b6 1/1 Running 0 46m asb-etcd-1-ptzmp 1/1 Running 0 46m
-
If the asb pods are not running, start them using either of the following commands:
oc rollout latest asb oc rollout latest asb-etcd
-
-
Make sure the Ansible Service Broker can find the Mobile APBs by following the procedure in APBs not displayed in service catalog
This issue is typically caused by incorrect values for the CONTAINER_REPO_USER, CONTAINER_REPO_PASSWORD or CONTAINER_REPO_ORG.
-
Check the Docker hub values:
minishift config get addon-env
-
After correcting any values, you need to delete and restart the Minishift VM:
minishift stop minishift delete minishift start --openshift-version v3.9.0 --service-catalog
-
Check any links to Minishift documentation displayed in the errors.
-
Check the Minishift configuration, typically
~/.minishift
for any possible permission issues. -
Try running
minishift stop
and retryingminishift delete
. -
If the issue is still occurring, delete the Minishift configuration directory and recreate it:
sudo rm -rf ~/.minishift minishift addons install -f /path/to/minishift-mobilecore-addon minishift addons enable mobilecore