This walkthrough sets up a locally running OpenShift cluster for:
-
developing Mobile Services (via APBs)
-
developing the Mobile CLI
-
developing the Mobile specific UI in the OpenShift Web Console
cd mobile-core
ansible-galaxy install -r ./installer/requirements.yml
Note: If you encounter a permission error for files under /etc/ansible/roles/
this is because non-root user does not have write access to the default ansible roles folder.
You can either:
-
Allow write access to
/etc/ansible/roles/
-
Run the above command with
--roles-path ./installer/roles/
The installer sets up your OpenShift environment with the service catalog and the OpenShift Ansible Broker (OAB). To run the ansible installer directly and specify any property values:
export DOCKERHUB_USERNAME=<my_dockerhub_username>
export DOCKERHUB_PASSWORD=<my_dockerhub_password>
ansible-playbook ./installer/playbook.yml -e "dockerhub_username=$DOCKERHUB_USERNAME" -e "dockerhub_password=$DOCKERHUB_PASSWORD" --ask-become-pass
Alternatively, to run a script that prompts for property values:
./installer/install.sh
A DockerHub username and password are currently required because the
OpenShift Ansible Broker (OAB) calls Docker APIs to read/load Ansible Playbook
Bundles from a Docker Hub organisation (defaults to aerogear
).
Note
|
If the installer fails, run
make clean in the repo home directory before running the installer again.
|
Note
|
If the installer hangs for a really long time or crashes on oc cluster up step, check free-space on your filesystem.
|
Optional
You can enable Hawkular metrics by passing -e 'hawkular_metrics=true'
as part of your ansible-playbook
command.
cd ui npm run grunt local
If you see an ENOSPC
error, you may need to increase the number of
files your user can watch by running this command:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Once the installer is complete you should be able to access OpenShift at https://192.168.37.1:8443/console/. You will need to accept the self-signed certificate.
You can login using developer
and any password.
Once logged in you should be presented with a catalog
of services.
To create your first Mobile App:
-
Choose the
Mobile
category &Apps
sub-category. -
Choose
Android App
-
Fill in the required information and continue through the wizard.
-
The App should appear in the 'Mobile Applications' section of the Project Overview screen
-
To contribute , check out the Contributing section of the README.