During our First Developers release, you will require two types of API keys (called 'keystores') in order to deploy your work to the network;
- An Identity Keystore: This keystore acts as your personal credentials for using the Distributed Computer.
- A Bank Keystore: This keystore is used to keep track of the amount of value (called 'credits') that you have available. Note: Don't worry! Every First Developer is given a lot of credits, and we'll let you know how to get more for free when you need them.
Both keystores can be downloaded from the Portal, which is also where you can check the amount of value left in your Bank Keystore(s), and more.
Identity keystores can be provisioned, downloaded, and revoked all from the First Devs tab in the Portal, once you have made an account.
New Identity Keys can be provisioned by clicking the green "+" in the top-right of the table on this page. This will prompt you to enter a label and then the generated key will appear in the table.
Identity Keys can be downloaded by clicking on the green download button. This will prompt you to enter an optional passphrase to encrypt the keystore with (hit 'Continue' without entering anything in the passphrase field to leave them unencrypted), and will then prompt you to save the keystore file with the default name
We recommend saving your
id.keystore file in your home directory at
/home/<YOUR_USER_NAME>/.dcp/id.keystore (Linux & macOS), or
C:\Users\<YOUR_USER_NAME>\.dcp\id.keystore (Windows). This is the default location where our APIs will look to find your identity keystore, which is needed to deploy a job.
Note: We recommend not changing the name of the id.keystore when you save it
Identity Keystores can be revoked by clicking the red "-" to the right of the download button. This will immediately revoke the key's association to your account, so any keystore files that you have downloaded will stop working.
Your Bank Keystores are listed in the Accounts page on the portal. Your portal account will come with a 'default' keystore, which has a balance of 0 credits. If you signed up for the First Developers beta, your default keystore should also have a balance of 10 credits.
If you do not see 10 credits in your default keystore on the Accounts page, please sign up for the First Developers beta. If you have done this and still don't see 10 credits in your default keystore after logging out, logging back in, and waiting for up to 10 minutes, please send us a message on Slack or email us at email@example.com. We'll get it sorted out right away!
You can use any Bank Keystore to earn credits using the Portal's in-built Worker tab. All you have to do is go to the Worker tab and click the green "Start" button. This will start using your computer's processing power to complete computational jobs in exchange for credits that you can use to deploy your own work. You can stop this at any time by clicking "Stop" or exiting the browser tab. You can earn credits in more ways for free, which we'll be sharing by email once you're running low.
Your Bank Keystores can be downloaded from the Accounts page by clicking the arrow at the bottom of the keystore card, and then clicking "Download". We recommend saving this keystore file in your home directory at
/home/<YOUR_USER_NAME>/.dcp/default.keystore (Linux & macOS), or
C:\Users\<YOUR_USER_NAME>\.dcp\default.keystore (Windows). This is the default location where our APIs will look to find your bank keystore, which is needed to deploy a job.
Note: We recommend not changing the name of the default.keystore when you save it
Using Keystores From Web Apps That Use The Distributed Computer
Providing the Bank Keystore for deploying jobs from your browser is easy - the
dcp-client APIs will automatically prompt you with a modal to upload your Bank Keystore when you start deploying the job.
⚠️Warning The following is a temporary solution. It exposes your (revocable) Identity Keystore to the public. It will be replaced very soon with a long-term solution, and all First Developer Identity Keystores (but not Bank Keystores!) will be revoked. ⚠️
To provide your identity keystore, which is required to access the Distributed Computer's Scheduler, you must include your Identity Keystore in the web directory where your HTML is located. The
dcp-client APIs will look for it when deploying your job, and warn you in the console if it could not be located.
Here is an example directory structure for how your app might be set up:
www/ index.html id.keystore
Using Keystores from NodeJS DCP Apps
dcp-client APIs to build NodeJS apps is even easier - the APIs will look for your keystores in the default location:
~/.dcp. This is what your
.dcp folder should look like:
.dcp/ id.keystore default.keystore
If the keystores could not be found, the APIs will throw an error containing information about where they were searching for the files.
You are now ready to start deploying jobs to the Distributed Computer! Follow or continue through our getting started guide
When Deploying A Job, The Error Says "Role DEPLOY is required"
This error most likely means your account has not been approved for the "First Developers" program. If you haven't yet, please sign up. If you have already done this and the issue is not resolved after a few minutes, please contact us on Slack or by email (firstname.lastname@example.org).
If this error persists once your account is approved, this error could indicate that the Identity Keystore you are using is not associated with your Portal account. Check the Identity Keystore section of the First Devs tab in the Portal to confirm that the Identity Keystore you are trying to use is one of the ones listed in the table. If it is not, try creating and downloading a new Identity Keystores following the instructions above, and upload it when prompted instead of the one that caused the error.