Quickstart

Prerequisite

First of all, you have to create an account on the admin web UI

Sandbox Configuration

An empty sandbox called Free Sandbox is created along with your account

Administration Free Sandbox

Now, you have to setup your environment.

Setup your environment

To write server-side macro scripts, you need a working development environment.

Install JDK 1.8

Download and install the JDK (version 1.8) from oracle.com

Install Eclipse

Download Eclipse Mars (4.2) or higher on eclipse.org

Install ZetaPush Plugin

Troubleshooting

  • On Ubuntu 14.04, there's a "feature" that prevents eclipse auto-completion from working (you have to reconfigure the "keyboard input method" and disable the use of ctrl-space as a system-wide keyboard shortcut)
  • On Ubuntu 16.04, the UI of Eclipse can freeze during the installation of the plugin. This problem comes from the GTK version used by Eclipse. You have to change the GTK Version in eclipse.ini to fix the problem

CLI Tool (Linux)

The CLI tool is packaged as a .deb (for Debian/Ubuntu).

The package comprises the CLI, a manual, and auto-complete features for the bash shell

Download

wget http://zms-site.zetapush.com/cli/zetapush-zms_1.3.0-1_all.deb
sudo dpkg -i zetapush-zms_1.3.0-1_all.deb

zms

Commands

compile

Loads all zms files from the given folder, including, and recursively, resources from referenced recipes. Runs validation checks and reports any errors.

deploy

Runs all checks from compile and additionally deploys all the code from all the macroscripts from your recipe (including dependencies) to a remote zetapush server. After a successful deployment, the deployed APIs are available for immediate use.

install

Runs all checks from compile and additionally installs the recipe to the local repository. A locally installed recipe can then be successfully referenced from other recipes.

deployRecipe

Runs all checks from compile and additionally fully deploys your recipe to a remote zetapush server. The full deployment on a possibly empty sandbox includes for your recipe and recursively for its dependencies : creation of all services, provisionning, startup code.

More information

For a more detailed documentation of command line options you can type man zms, or zms <command>.

Skeleton Project

New in CLI/plugin v1.3.0 : you can type zms skeleton from a command shell or use the new project wizard inside Eclipse to generate a ZMS project skeleton.
Alternatively, you can use the old method :

Clone project

git clone https://github.com/zetapush/com.zetapush.quickstart.git
cd com.zetapush.quickstart

Configure

Set your profile information in zms.properties

# Your SandBox Id created via https://admin.zpush.io:
zms.businessId=<SET-YOUR-SANDBOX-ID>
# Your username & password to login you via https://admin.zpush.io/
zms.username=<SET-YOUR-USERNAME>
zms.password=<SET-YOUR-PASSWORD>

Deploy (via cli)

To deploy the skeleton project on your previously created sandbox, you have to run the following command from a shell prompt:

zms deployRecipe

Deploy (via eclipse)

Eclipse Plugin