First launch

If you have unpacked repository from GitHub put all of files from it on your localhost (or other) server, e.g. localhost/skynet/ and then launch in your browser:

http://localhost/skynet/skynet_dev.php

(non-compiled developer version)

or

http://localhost/skynet/skynet.php

(compiled version)

At now you will see the same on both of them - Skynet Control Panel:



This panel displays informations about Skynet status and connections to another clusters. This panel also allows you to easy browse stored in database connections logs.
As you see, Skynet is not connected to any cluster and shows you 2 warnings - about empty password and empty SkynetKeyID. By default, after you download Skynet these two fields are set to start values - you will need to configure them itself. We will do this at the end.

At first, let's try to connect clusters included in Skynet package.

In console at the bottom of window of Skynet Control Panel type:

@connect "CLUSTER_ADDRESS";

where CLUSTER_ADDRESS will be second cluster (http://localhost/skynet/skynet.php if you're in /skynet_dev.php and http://localhost/skynet/skynet_dev.php if you're in /skynet.php)
At next, click on "Send request" button.

You should see information about connection with second cluster and the second cluster address should be stored into database.
Good. Now you have two working clusters. Let's try to create different clusters, e.g. by copying skynet.php into skynet2.php, etc. and try to connect with them.

At the end, let's try to generate SkynetKey ID - this is the unique identifier of your clusters network. All of your clusters must have SAME KEY ID to allow connections between them. For security reasons Skynet cluster is checking this key in every connection. If requested key not match to cluster key then response is not generated.

To generate your Key, launch key generator included in package:

http://localhost/skynet/keygen.php

This keygen generates randomly key in every launch. When you generate your key, place it into your Skynet config file:

/src/SkynetUser/SkynetConfig.php

and in:

/skynet.php

if you launched compiled version (remember that after compiling all configuration data from /src are includes into standalone file)

Put KEY ID into:

const KEY_ID

(default here is: 1234567890, replace it with your Key)

Now, let's go to admin password hash generator. This password is using for accessing to your Skynet Control Panel. By default, this password is not set, so you must create one.
Skynet needs hash of the password, not the plain text of it. To generate password hash go to:

http://localhost/skynet/pwdgen.php

Put your password into input, click on "Generate hash" and place generated hash into config file (/src/SkynetUser/SkynetConfig.php) and into compiled version.

const PASSWORD

Ok, let's back to your Skynet Control Panel:

http://localhost/skynet/skynet_dev.php

or

http://localhost/skynet/skynet.php

You should now see request for password. Log in with it.
At now, you have simple preconfigured Skynet.

REMEMBER: All of your clusters MUST SHARE the same Skynet Key ID.
Full API Documentation is included in Skynet packages available on GitHub.