Set up: your account, a lab project and csph

Reading · 10 min · Module 1, lesson 1 of 446 min left in this module

Module 1 · Your first deployLesson 1 of 4

Goal: Sign up, create the lab project and environment, install csph and point it at them, and find the ID of anything you create.

Key idea

Every lab in this path runs in one project, learn, with one environment, lab. Set them up once and tell csph to use them, and every command after this lands in the right place.

Sign up

Create your account at console.computesphere.com. Checkout asks for a card, but the first 14 days are a free trial and nothing is charged until day 15.

During the trial you can run up to two Flex spherelets at a time. That's enough for every lab here, since each one uses a single Flex spherelet.

Find your way around the console

The menu on the left is where you'll spend your time:

  • Projects lists your projects. Open one to see its environments and services.
  • Open a service to see its status. Its Logs tab holds its runtime and deploy logs, and Settings holds everything you can change.
  • Deployments lists everything running across the account.

Create the lab project and environment

  1. Create the project

    Go to Projects and choose New project. Set Project name to learn and choose Create.

    You should seeA project called learn in your Projects list.

  2. Create the environment

    Open learn, choose New environment, set Environment name to lab, keep the suggested Region, and choose Create.

    You should seeAn environment called lab inside learn.

Install csph

csph is the ComputeSphere command line.

brew install computesphere/cli/csph

Check it with csph --version.

Sign in and point csph at the lab

csph auth login

csph prints a code and a web address. Open the address, confirm the code, and you're in.

Now make learn and lab your defaults. Copy each ID from the first column of the list:

csph projects list
csph projects use <project-id>
csph environments list --project <project-id>
csph environments use <environment-id>
csph context

csph context should show your account, learn and lab. From now on, csph deploy deploys there.

Finding any ID

Commands take IDs. When a lesson says <something-id>, one of these finds it, in the first column:

csph projects list
csph environments list --project <project-id>
csph services list --project <project-id>
csph deployments list --service <service-id>
Prefer to create the project and environment from the terminal?
csph projects create --name learn
csph regions list
csph environments create --name lab --region <region> --project <project-id>

Then run the use commands above. Every list command also takes -i for an interactive picker, which is handy when you can't remember an ID.

Check yourself

You run csph deploy and get “deploying a bare image needs a target”. What's missing?