Skip to content

Latest commit

 

History

History
241 lines (199 loc) · 6.79 KB

minishift_install.adoc

File metadata and controls

241 lines (199 loc) · 6.79 KB

Setting up AeroGear Mobile on Minishift

Before Installation

  1. Install Minishift

    Check Minishift version is at least 1.16.1:

    $ minishift version
    minishift  v1.16.1+d9a86c9
  2. Install OC

Installation

  1. Clone the minishift-mobilecore-addon repo.

  2. Add mobilecore to the minishift add-ons catalog:

    minishift addons install -f minishift-mobilecore-addon/
    minishift addons enable minishift-mobilecore-addon
    Note
    On 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
  1. Set the following environment variables:

    export MINISHIFT_ENABLE_EXPERIMENTAL=y
    export CONTAINER_REPO_USERNAME=<docker hub username>
    export CONTAINER_REPO_PASSWORD=<docker hub password>
    Note
    If 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, the aerogearcatalog organization is used.
  2. 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.

  3. Configure Minishift resources

    AeroGear recommends configuring Minishift to start with extra CPUs and RAM:

    minishift config set cpus 4
    minishift config set memory 4096
  4. Clear Minishift to enable mobile core:

    minishift stop
    minishift delete
  5. 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

Troubleshooting

  1. 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.

  2. Try deleting the Minishift VM and restarting:

    minishift stop
    minishift delete
    minishift start --openshift-version v3.9.0 --service-catalog
  3. Confirm the addon-env config values are correct:

    minishift config get addon-env

    If values are incorrect, follow the instructions in Setting up Minishift.

  4. Review the following scenarios:

Service catalog flag is not recognized

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

Mobile tab not appearing in the service catalog

  1. Make sure the Ansible Service Broker is running:

    1. Log into your Minishift cluster as admin:

      oc login -u system:admin
    2. 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
    3. If the asb pods are not running, start them using either of the following commands:

      oc rollout latest asb
      oc rollout latest asb-etcd
  2. Make sure the Ansible Service Broker can find the Mobile APBs by following the procedure in APBs not displayed in service catalog

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.

  1. Check the Docker hub values:

    minishift config get addon-env
  2. 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

Errors displayed when stopping or deleting Minishift

  1. Check any links to Minishift documentation displayed in the errors.

  2. Check the Minishift configuration, typically ~/.minishift for any possible permission issues.

  3. Try running minishift stop and retrying minishift delete.

  4. 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