Skip to content
This repository was archived by the owner on Oct 30, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1def717
[CORE-1639] rework documentation structure;
opalczynski Aug 25, 2016
3fa7f56
[CORE-1639] rework documentation structure;
opalczynski Aug 25, 2016
be959b3
[CORE-1639] custom socket documentation work on;
opalczynski Aug 25, 2016
d337674
[CORE-1639] custom socket documentation work on;
opalczynski Aug 25, 2016
54de00e
[CORE-1639] custom socket documentation work on;
opalczynski Aug 25, 2016
d376a9c
[CORE-1639] working on CLI Custom Socket documentation;
opalczynski Aug 26, 2016
c20b082
[CORE-1639] correct main README
opalczynski Aug 26, 2016
dc90f8f
[CORE-1639] correct html template formatting;
opalczynski Aug 26, 2016
fe6851a
[CORE-1639] add advanced socket example;
opalczynski Aug 26, 2016
62bf2ff
[CORE-1639] add config example
opalczynski Aug 26, 2016
84e6f1e
[CORE-1640] re-work hosting interface;
opalczynski Aug 29, 2016
505932b
[CORE-1640] add test for hosting commands;
opalczynski Aug 29, 2016
86794ea
Reade edits
MariuszWisniewski Aug 29, 2016
ff43778
Update README.rst
twack05 Aug 29, 2016
91b00bc
Merge pull request #49 from twack05/patch-1
MariuszWisniewski Aug 29, 2016
e44438c
Readme edits
MariuszWisniewski Aug 29, 2016
98094ef
Readme edits
MariuszWisniewski Aug 29, 2016
f550eff
Update README.md
twack05 Aug 29, 2016
3313f08
Merge pull request #50 from twack05/patch-1
MariuszWisniewski Aug 29, 2016
94c1311
Update docs.md
twack05 Aug 29, 2016
24c9820
Readme edits
MariuszWisniewski Aug 29, 2016
0dc8703
[ci skip] Typo fix
MariuszWisniewski Aug 29, 2016
f7ba3da
[ci skip] proper git clone path
MariuszWisniewski Aug 29, 2016
c6af657
Readme edits
MariuszWisniewski Aug 29, 2016
d27bad8
Update advanced.md
twack05 Aug 29, 2016
c567ed0
Update hello_world.md
twack05 Aug 29, 2016
d457274
Merge pull request #47 from Syncano/CORE-1639
opalczynski Aug 30, 2016
68e9f62
[CORE-1640] remove local paths;
opalczynski Aug 30, 2016
766fe44
[CORE-1640] Merge with develop;
opalczynski Aug 30, 2016
b292ec9
[CORE-1640] update required LIB version;
opalczynski Aug 30, 2016
a9643ed
[CORE-1640] correct isort and tests;
opalczynski Aug 30, 2016
cc76d58
Merge pull request #48 from Syncano/CORE-1640
opalczynski Aug 31, 2016
df8d4ab
[RELEASE v0.6] bump the version;
opalczynski Aug 31, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
197 changes: 136 additions & 61 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,82 +23,86 @@ Installation

**Usage:**

First you need to login into your account
First you need to login into your Syncano account

::

syncano login

It will ask you for your email and password and store account key in
${HOME}/.syncano file. You can also override account key with --key option.
It will ask you for your email and password. After successfully logging in your Account Key (admin key)
will be stored in *${HOME}/.syncano* file. You can also override an Account Key later with *--key* option.

You can specify the default instance name - that would be used in all CLI calls::
You can specify the default instance name that will be used in all consecutive CLI calls::

syncano login --instance-name patient-resonance-4283

After when you want to override this setting use --instance-name in particular command, eg::
If you want to override this setting for a specific command, use --instance-name eg::

syncano sync pull --instance-name new-instance-1234

Documentation
-------------

You can read detailed documentation `here <docs/README.md>`_.

Pulling your instance classes and scripts
-----------------------------------------

In order to pull your instance configuration you can execute
In order to pull your instance configuration, execute

::

syncano sync pull

This will fetch all Classes and Scripts into current working directory, and
store configuration in syncano.yml file. If you want to pull only selected
classes/scripts you can add -c/--class or -s/--script option eg.
This will fetch all Classes and Scripts into the current working directory, and
store configuration in *syncano.yml* file. If you want to pull only selected
classes/scripts you can add *-c/--class* or *-s/--script* option e.g.

::

syncano sync pull -c Class1 -c Class2 -s script_label_1 -s "script label 2"

Scripts source code is stored in scripts subdirectory, and names are based on
script labels. Keep in mind that script labels in syncano are not unique, and
this tools can't handle this kind of situation.
The Scripts' source code is stored in the scripts subdirectory. Their names are based on
script labels. Keep in mind that script labels in Syncano are not unique, and
this tool cannot yet handle this kind of situation when pulling a Script from Syncano.

Classes and Scripts configuration is stored in syncano.yml file. If file
syncano.yml already exists only classes and scripts stored in this file, will
be pulled and updated. If you want to pull whole instance you can use -a/--all
flag.
Classes and Scripts configuration is stored in *syncano.yml* file. If this file already
exists, only classes and scripts stored in this file will be pulled and updated.
If you want to pull the whole instance you can use *-a/--all* switch flag.

Pushing your changes
--------------------

When you have made some changes to syncano.yml or some script source code you
can push the changes to syncano using
After you have made changes to *syncano.yml* or any of the script's source code,
you can push the changes to Syncano using

::

syncano sync push

It will push only changes newer then last synchronization time. This time is
recorded using .sync file last modification time. If syncano.yml has changed
it will try to push all data to syncano. Otherwise it will just push changed
source code files for scripts. If you want to force push all changes you can
use -a/--all option.
It will push only changes newer than the last synchronization time.
As last synchronization time we use *.sync* file last modification time.
If *syncano.yml* has changed, it will try to push all data to Syncano. Otherwise,
it will just push the source code files for scripts that were changed.
If you want to force push all changes you can use *-a/--all* option.

If you want to just push selected classes/scripts changes you can provide them
with -c/--class or -s/--script options like in the pull example above.
If you only want to push changes from selected classes/scripts you can provide them
with *-c/--class* or *-s/--script* options like in the pull example above.

Synchronization of changes in realtime
Synchronize changes in real-time
--------------------------------------

There is also an option to synchronize your project live. When you change
syncano.yml or some script source code pointed to by syncano.yml your changes
will be automatically pushed to syncano.
There is an option to synchronize your project in real-time. When you change
syncano.yml or the source code of a script described in *syncano.yml*, your changes
will be automatically pushed to Syncano.

::

syncano sync watch

This command will push all your project configuration to syncano and will
wait for changes made to project files. When it detects file modification
it will push those changes to syncano.
This command will push all of your project's configuration to Syncano and will
wait for changes made to project files. When it detects that any file was modified,
it will push those changes to Syncano.


Syncano Parse migration tool
Expand All @@ -108,8 +112,8 @@ This tool will help you to move your data from Parse to Syncano.

**Usage:**

Currently supports only transferring data. This tool takes the Parse schemas and transform them to Syncano classes.
Next step is to move all of the data between Parse and Syncano. The last step is rebuilding the relations between
Currently supports only transferring data. This tool takes the Parse schemas and transforms them to Syncano classes.
The next step is to move all of the data between Parse and Syncano. The last step is rebuilding the relations between
objects.


Expand All @@ -132,7 +136,7 @@ Will run the configuration that will ask you for the following variables:
* -c (--current) which will display the current configuration;
* -f (--force) which allow to override the previously set configuration;

The configuration will be stored in your home directory in .syncano file under the P2S section.
The configuration will be stored in your home directory in the .syncano file under the P2S section.
It's used to call the Parse API and Syncano API as well.

Run migration
Expand All @@ -142,50 +146,102 @@ Run migration

syncano migrate parse

This command will run the synchronization process between Parse and Syncano. Sit comfortably in your chair and read
This command will run the synchronization process between Parse and Syncano. Sit back, relax, and read
the output.

Tips & Troubleshooting
----------------------

1. This tool currently does not support checking if an object is already present in the Syncano instance.
If the sync is run twice, the data will be duplicated. To avoid this,
simply remove your instance using Syncano dashboard;

2. The whole process can be quite slow because of the throttling on both sides: Parse and Syncano on free trial accounts (which is the bottom boundary for scripts);

Syncano Hosting
===============

Syncano Hosting is a simple way to host the static files. CLI supports it in the following way:
Syncano Hosting is a simple way to host your static files on Syncano servers.
The CLI supports it in the following way:

::
This command will list files for currently hosted website::

syncano hosting --list-files
syncano hosting list

This command will list files in hosting which match the default hosting.
This command will publish all files inside *<base_dir>* to the default Syncano Hosting instance.
When publishing the whole directory, the structure will be mapped on Syncano.::

::
syncano hosting publish <base_dir>

syncano hosting --publish <base_dir>
This command will unpublish currently published hosting::

This command will publish all files inside <base_dir> and will publish it to the Syncano Hosting (default one).
The whole directory structure - will be mapped in Syncano Hosting.
syncano hosting unpublish


Tips & Troubleshooting
----------------------
This command will permamently delete the hosting::

1. This tool currently does not support checking if some object is already present in the Syncano instance,
so if sync is run twice the end results is that data is duplicated. To avoid such cases,
simply remove your instance in using Syncano dashboard;
syncano hosting delete

2. The process can be quite slow - it's because of the throttling on both sides: Parse and Syncano on free accounts
(which is the bottom boundary for scripts);
This command will delete the specified file::

3. If you encounter any problems, have some improvements proposal or just wanna talk,
please write me: sebastian.opalczynski@syncano.com;
syncano hosting delete hosting/file/path

4. The Syncano can be found on - please do not hesitate to ask for help or share your thoughts;
This command will update single file::

* Github:
* https://github.com/Syncano/
* Gitter:
* https://gitter.im/Syncano/community
* https://gitter.im/Syncano/community-pl
* Slack:
* http://syncano-community.github.io/slack-invite/
syncano hosting update hosting/file/path local/file/path

Custom Sockets
--------------

This is a list of commands available for Custom Sockets.
If you want to know more about Custom Sockets, `read the detailed docs here <docs/custom_sockets/docs.md>`_.

To install a Custom Socket from a local file::

syncano sockets install /path/to/dir

To install a Custom Socket from a URL::

syncano sockets install https://web.path.to/your.file

List all Custom Sockets::

syncano sockets list

List all defined endpoints (for all Custom Sockets)::

syncano sockets list endpoints

Display chosen Custom Socket details::

syncano sockets details socket_name

Delete a Custom Socket::

syncano sockets delete socket_name

Create a template from a template stored in Syncano CLI::

syncano sockets template /path/to/output_dir

Create a template from an existing Custom Socket::

syncano sockets template /path/to/out --socket socket_name

Run endpoint defined in Custom Socket::s

syncano sockets run socket_name/endpoint_name

Run endpoint providing POST data::

syncano sockets run socket_name/my_endpoint_12 POST --data '{"one": 1}'

In all of the above cases you can override the Syncano instance being used::

--instance-name my_instance_name

Providing the instance name this way will override the default instance name
defined during initial setup (*syncano login --instance-name my_instance*)


Running scripts
Expand All @@ -198,3 +254,22 @@ This command will allow you to execute any script (Script Endpoint) with optiona
::

syncano execute <instance_name> <script_endpoint_name> --payload="<payload_in_JSON_format>"


Issues
========

1. If you encounter any problems, have some improvement ideas or just wanna talk,
please write to me directly: sebastian.opalczynski@syncano.com;

2. Syncano team can be reached in multiple ways. Please do not hesitate to ask for help or share your thoughts. You can find us on:

* Github:
* https://github.com/Syncano/
* Slack:
* http://syncano-community.github.io/slack-invite/
* Gitter:
* https://gitter.im/Syncano/community
* https://gitter.im/Syncano/community-pl
* Support e-mail:
* `support@syncano.io <mailto:support@syncano.io>`_
Loading