Skip to content
This repository was archived by the owner on Oct 30, 2018. It is now read-only.

Commit e3ceb1a

Browse files
authored
Merge pull request #52 from Syncano/release-v0.6
[Release v0.6]
2 parents 83f8263 + df8d4ab commit e3ceb1a

19 files changed

Lines changed: 1071 additions & 224 deletions

File tree

README.rst

Lines changed: 136 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -23,82 +23,86 @@ Installation
2323

2424
**Usage:**
2525

26-
First you need to login into your account
26+
First you need to login into your Syncano account
2727

2828
::
2929

3030
syncano login
3131

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

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

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

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

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

43+
Documentation
44+
-------------
45+
46+
You can read detailed documentation `here <docs/README.md>`_.
47+
4348
Pulling your instance classes and scripts
4449
-----------------------------------------
4550

46-
In order to pull your instance configuration you can execute
51+
In order to pull your instance configuration, execute
4752

4853
::
4954

5055
syncano sync pull
5156

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

5661
::
5762

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

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

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

6973
Pushing your changes
7074
--------------------
7175

72-
When you have made some changes to syncano.yml or some script source code you
73-
can push the changes to syncano using
76+
After you have made changes to *syncano.yml* or any of the script's source code,
77+
you can push the changes to Syncano using
7478

7579
::
7680

7781
syncano sync push
7882

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

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

88-
Synchronization of changes in realtime
92+
Synchronize changes in real-time
8993
--------------------------------------
9094

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

9599
::
96100

97101
syncano sync watch
98102

99-
This command will push all your project configuration to syncano and will
100-
wait for changes made to project files. When it detects file modification
101-
it will push those changes to syncano.
103+
This command will push all of your project's configuration to Syncano and will
104+
wait for changes made to project files. When it detects that any file was modified,
105+
it will push those changes to Syncano.
102106

103107

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

109113
**Usage:**
110114

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

115119

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

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

138142
Run migration
@@ -142,50 +146,102 @@ Run migration
142146

143147
syncano migrate parse
144148

145-
This command will run the synchronization process between Parse and Syncano. Sit comfortably in your chair and read
149+
This command will run the synchronization process between Parse and Syncano. Sit back, relax, and read
146150
the output.
147151

152+
Tips & Troubleshooting
153+
----------------------
154+
155+
1. This tool currently does not support checking if an object is already present in the Syncano instance.
156+
If the sync is run twice, the data will be duplicated. To avoid this,
157+
simply remove your instance using Syncano dashboard;
158+
159+
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);
160+
148161
Syncano Hosting
149162
===============
150163

151-
Syncano Hosting is a simple way to host the static files. CLI supports it in the following way:
164+
Syncano Hosting is a simple way to host your static files on Syncano servers.
165+
The CLI supports it in the following way:
152166

153-
::
167+
This command will list files for currently hosted website::
154168

155-
syncano hosting --list-files
169+
syncano hosting list
156170

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

159-
::
174+
syncano hosting publish <base_dir>
160175

161-
syncano hosting --publish <base_dir>
176+
This command will unpublish currently published hosting::
162177

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

166180

167-
Tips & Troubleshooting
168-
----------------------
181+
This command will permamently delete the hosting::
169182

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

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

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

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

182-
* Github:
183-
* https://github.com/Syncano/
184-
* Gitter:
185-
* https://gitter.im/Syncano/community
186-
* https://gitter.im/Syncano/community-pl
187-
* Slack:
188-
* http://syncano-community.github.io/slack-invite/
191+
syncano hosting update hosting/file/path local/file/path
192+
193+
Custom Sockets
194+
--------------
195+
196+
This is a list of commands available for Custom Sockets.
197+
If you want to know more about Custom Sockets, `read the detailed docs here <docs/custom_sockets/docs.md>`_.
198+
199+
To install a Custom Socket from a local file::
200+
201+
syncano sockets install /path/to/dir
202+
203+
To install a Custom Socket from a URL::
204+
205+
syncano sockets install https://web.path.to/your.file
206+
207+
List all Custom Sockets::
208+
209+
syncano sockets list
210+
211+
List all defined endpoints (for all Custom Sockets)::
212+
213+
syncano sockets list endpoints
214+
215+
Display chosen Custom Socket details::
216+
217+
syncano sockets details socket_name
218+
219+
Delete a Custom Socket::
220+
221+
syncano sockets delete socket_name
222+
223+
Create a template from a template stored in Syncano CLI::
224+
225+
syncano sockets template /path/to/output_dir
226+
227+
Create a template from an existing Custom Socket::
228+
229+
syncano sockets template /path/to/out --socket socket_name
230+
231+
Run endpoint defined in Custom Socket::s
232+
233+
syncano sockets run socket_name/endpoint_name
234+
235+
Run endpoint providing POST data::
236+
237+
syncano sockets run socket_name/my_endpoint_12 POST --data '{"one": 1}'
238+
239+
In all of the above cases you can override the Syncano instance being used::
240+
241+
--instance-name my_instance_name
242+
243+
Providing the instance name this way will override the default instance name
244+
defined during initial setup (*syncano login --instance-name my_instance*)
189245

190246

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

200256
syncano execute <instance_name> <script_endpoint_name> --payload="<payload_in_JSON_format>"
257+
258+
259+
Issues
260+
========
261+
262+
1. If you encounter any problems, have some improvement ideas or just wanna talk,
263+
please write to me directly: sebastian.opalczynski@syncano.com;
264+
265+
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:
266+
267+
* Github:
268+
* https://github.com/Syncano/
269+
* Slack:
270+
* http://syncano-community.github.io/slack-invite/
271+
* Gitter:
272+
* https://gitter.im/Syncano/community
273+
* https://gitter.im/Syncano/community-pl
274+
* Support e-mail:
275+
* `support@syncano.io <mailto:support@syncano.io>`_

0 commit comments

Comments
 (0)