Skip to content

Commit

Permalink
Merge pull request #123 from finp/MOBDOC-23
Browse files Browse the repository at this point in the history
add doc for website
  • Loading branch information
maleck13 committed May 22, 2018
2 parents 7a7f9ec + 4ebe43f commit ff940e4
Showing 1 changed file with 123 additions and 0 deletions.
123 changes: 123 additions & 0 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -1 +1,124 @@
= Getting Started with the Mobile CLI


*NOTE: The Mobile CLI is still under construction and not yet fit for
use.*

The Mobile CLI is a standalone CLI that can also be used as a kubectl or
oc plugin.

It focuses on a small set of commands to empower mobile focused
developers to consume and take full advantage of the RedHat mobile suite
of services ontop of Kubernetes/OpenShift.

It uses a language familiar to mobile developers and abstracts away some
of the complexity of dealing with Kubernetes/OpenShift which can be
initially daunting and overwhelming.

[[examples]]
Examples
~~~~~~~~

*Note: Not all of these commands currently exist but are present below
to show the general concept.*

[source,bash]
----
mobile get services
mobile create serviceinstance <serviceName> --namespace=<namespace>
mobile get clients --namespace=<namespace>
mobile get clientconfig <mobileClientID> --namespace=<namespace>
mobile create integration <consumingServiceInstanceID> <providingServiceInstanceID> --namespace=<namespace>
----

[[installing-the-cli]]
Installing the CLI
~~~~~~~~~~~~~~~~~~

. Clone the https://github.com/aerogear/mobile-cli repo.

. Execute the installer script from inside the `scripts` directory.
+
[source,bash]
----
./install.sh
----
[[core-objects-or-resources]]
Core Objects or Resources
~~~~~~~~~~~~~~~~~~~~~~~~~
In a similar fashion to the oc and kubectl CLI, we have some core
resources that we work with. Some of these are backed by things like
secrets while others are defined as custom resources.
* *MobileClient:* The mobile client is a resource that represents your
mobile client application as part of the OpenShift UI. It gives us the
context and information needed to show you relevant information around
your particular mobile runtime as well as allowing us to setup the
different kind of client builds required.
* *ClientConfig* The client config, is a resource created by aggregating
together all of the available service configs. This resource is the
configuration required in order to consume your mobile aware services
from your mobile client. It is used by the client SDKs for the various
mobile services.
* *ServiceConfig:* The service config contains the services' information
that is used to configure the Mobile SDK. For more information see
link:./docs/service_config.md[here].
* *ClientBuild* The client build is backed by a regular BuildConfig,
however the CLI will help you create this BuildConfig with as little
effort as possible. This allows you to focus on just the mobile parts
rather than needing to understand how to setup and manage a buildconfig
and builds. For example, it will help you manage build credentials, and
keys and ensure the build integrates seamlessly with the aereogear
mobile build farm.
* *Binding* The binding is backed by a binding resource in the service
catalog. Once again we try to remove the need to understand how to
create the native objects so that you can focus on being productive and
building your mobile app. When doing a binding, you will be able to
integrate different mobile services together. For example when using
sync and keycloak you can bind them together and have your sync service
protected by keycloak. This is as simple as
`mobile create integration <consuming_service_instance_id> <providing_service_instance_id>`
[[command-structure]]
Command Structure
~~~~~~~~~~~~~~~~~
[[get]]
get
^^^
....
client gets a single mobile client in the namespace
clients gets a list of mobile clients represented in the namespace
clientconfig get clientconfig returns a client ready filtered configuration of the available services.
integration get a single integration
integrations get a list of the current integrations between services
serviceconfig get a mobile aware service definition
serviceconfigs get a list of deployed mobile enabled services
serviceinstances get a list of provisioned service instances based on the service name.
services get mobile aware services that can be provisioned to your namespace
....
[[create]]
create
^^^^^^
....
client create a mobile client representation in your namespace
integration integrate certain mobile services together. mobile get services will show you what can be integrated.
serviceconfig create a new service config
serviceinstance create a running instance of the given service
....
[[delete]]
delete
^^^^^^
....
client deletes a single mobile client in the namespace
integration delete the integration between mobile services.
serviceconfig delete a service config
serviceinstance deletes a service instance and other objects created when provisioning the services instance, such as pod presets
....

0 comments on commit ff940e4

Please sign in to comment.