nsc login, the SDKs can use that login to act inside your own workspace, the same way a tenant token acts inside a customer’s tenant.
That makes your workspace a good place to develop the parts of your platform that run inside a tenant, such as creating instances or managing revokable tokens.
When your partner account is ready, the same code runs in your customers’ tenants. Only the source of the token changes.
Create a client from your login
Log in
Install the
nsc CLI and log in.
The browser asks you to pick a workspace. The SDKs act inside the workspace you pick.Create the client
loadDefaults() loads your login, and the client authenticates with it.The client acts inside the workspace you picked at login, not a customer’s tenant. Anything you create belongs to that workspace and counts toward its usage.
NSC_TOKEN_FILE is set, loadDefaults() uses that token file instead of your login. Unset it to go back to your login.
Use a development token instead
loadDefaults() works when your code runs on the machine where you logged in.
To run it somewhere else, such as a script on another machine or a container, use a development token instead.
It acts in the same workspace as your login.
Generate a development token
Run this on the machine where you ran The token lasts about an hour and is not renewed, so generate a new one when it expires.
nsc login, because it uses your login.What you can build this way
Your login works with every Namespace client, not just IAM, and for everything a tenant token can do. You can build and test:- Running instances, builds, and other workloads.
- Using storage, such as cache volumes, the container registry, and secrets.
- Reading policies.
- Creating, listing, and revoking revokable tokens.
Move to production
In production, your service acts for a customer with a tenant token instead of your login. Your platform issues the token for the customer’s tenant with its partner credentials. ReplaceloadDefaults() with that token:
Next steps
Instances quickstart
Run your first instance in your workspace.
Partner credentials
Set up partner credentials to manage tenants.