This tutorial takes you from a new user account to a running Linux instance you log in to over SSH. You use the origin CLI for almost every step and the GraphQL API for the payment method.
What you’ll build
You’ll end up with an organization that holds one project. In the project runs one instance, in the project’s default VPC, with a public IPv4 address that you connect to over SSH.
The following diagram shows the end state.
What you’ll learn
- How to install the CLI and log in.
- How to register an organization and read its review status.
- How to create a project and add a payment method.
- How to import a key pair, launch an instance and log in to it.
- How to remove what you created.
Before you begin
- An Origin Cloud user account.
- A Linux or macOS computer with
ssh,ssh-keygenandcurl. - Your company’s billing details: postal address, invoice email address, contact person and, outside Germany, a VAT identification number. The billing address must be in an EU member state.
- A credit or debit card for the payment method.
Cost
The instance, its root volume and its public IPv4 address are billable for as long as they exist. Registering an organization, creating a project and the default VPC cost nothing. If you follow Clean up right after the tutorial, you pay for a few minutes of usage. For current rates, see Pricing.
Step 1: Install the CLI and log in
-
Install the
originCLI. See Install the CLI. -
Log in. Your browser opens the Origin Cloud login page:
Terminal window origin id loginOn a machine without a browser, use
origin id login --deviceinstead. See Log in.
Step 2: Register your organization
-
Register the organization with its billing details. Add
--vat-id <vat-id>if the billing address is outside Germany:Terminal window origin admin register-organisation \--name "Example GmbH" \--street "Example Street 1" \--city Berlin \--postal-code 10115 \--country DE \--invoice-email billing@example.com \--contact-person "Jane Doe" -
Note the
orgIdin the output, for example0a1b2c3d4e5f. You’re now the organization’s Owner and its billing administrator.
For details and the other way to create an organization, see Create an organization.
Step 3: Check the review status
-
Read the organization’s status:
Terminal window origin admin get-organisation --id <org-id> -
Check
status:ACTIVE: continue with the next step.PENDING_REVIEW: the platform operator reviews the organization. You get an email when it’s approved. Continue with steps 4 to 6 in the meantime; only step 7 needs an active organization.REJECTED: the decision is final, and you can’t continue.
For what each status allows, see Organization review status.
Step 4: Create a project
-
Create a project:
Terminal window origin admin create-project --org-id <org-id> --name "Getting started" -
Note the project’s
urnandprojectIdin the output. The following steps pass the URN as--project-urn.Example output (illustrative):
{"admin": {"createProject": {"urn": "urn:origin:cloud:admin::0a1b2c3d4e5f::lumen-482910375","orgId": "0a1b2c3d4e5f","projectId": "lumen-482910375","name": "Getting started"}}}
Step 5: Add a payment method
A new project is charged to your organization’s default billing account. Launching an instance is refused with PAYMENT_METHOD_REQUIRED until that billing account has a verified payment method.
-
Follow Add a payment method for your project. You start the setup through the API, enter the card on the payment provider’s page, and confirm it through the API.
-
Verify that the billing account’s
paymentMethodStatusisVERIFIED.
Step 6: Create a key pair
The instance accepts SSH logins only with the key pair you name at launch. In this step you create a key on your computer and import its public half.
-
Create a key on your computer:
Terminal window ssh-keygen -t ed25519 -f ~/.ssh/origin-getting-started -C getting-started -
Import the public key into your project:
Terminal window origin compute import-key-pair \--project-urn <project-urn> \--name getting-started \--public-key "$(cat ~/.ssh/origin-getting-started.pub)" -
Note the key pair’s
urnin the output.
The private key never leaves your computer. To have the platform generate a key pair instead, see Create a key pair.
Step 7: Launch an instance
-
Choose an instance type. Pick one whose
availableistrue, for example a small one such asgp1.core.2:Terminal window origin compute list-instance-types -
Choose an image. The list contains the platform-provided images and any of your own. Platform-provided images have the
__typenameComputePublicImage. Pick one by itsdescription, and note itsurnanddefaultUser:Terminal window origin compute list-images --project-urn <project-urn> -
Launch the instance. Without
--subnet-urn, it goes into the project’s default VPC, which the platform creates now, with an internet gateway and a public address for the instance:Terminal window origin compute launch-instance \--project-urn <project-urn> \--image-urn <image-urn> \--key-pair-urn <key-pair-urn> \--instance-type gp1.core.2 -
Note the instance’s
urnandloginUserin the output.Example output (illustrative):
{"compute": {"launchInstance": {"urn": "urn:origin:cloud:compute:eu-central1:0a1b2c3d4e5f:lumen-482910375:i-79PVin5MmNc","instanceId": "i-79PVin5MmNc","instanceType": "gp1.core.2","loginUser": "cloud","status": "INITIALIZING"}}} -
Wait until the instance is running. Repeat this command until
statusisRUNNING:Terminal window origin compute get-instance --instance-urn <instance-urn>
If the launch is refused, the error code tells you why. For example, INSUFFICIENT_CAPACITY means no machine has room for that type right now; try a smaller type or try again later. See Error codes.
Step 8: Connect to the instance
The default VPC’s security group allows SSH from anywhere, so no firewall change is needed. Logins need the key pair’s private key; passwords are refused. To allow SSH from your own address only, see Security groups.
-
Find the instance’s public address. The platform assigned it as a Floating IP at launch.
get-instanceshows it asfloatingIpAddresson the instance’s network interface:Terminal window origin compute get-instance --instance-urn <instance-urn>If
floatingIpAddressisnull, the platform couldn’t assign a public address, for example because the public IP quota is used up. See Limits. -
Log in as the instance’s
loginUser, with the private key from step 6:Terminal window ssh -i ~/.ssh/origin-getting-started cloud@<public-address> -
Verify that you’re on the instance. The login user has passwordless
sudo:Terminal window sudo whoamiExample output (illustrative):
root
Clean up
Remove what you created so it stops costing money.
-
Terminate the instance. Its root volume and network interface are deleted, and the auto-assigned public address is released with it:
Terminal window origin compute terminate-instance --instance-urn <instance-urn> -
Delete the key pair:
Terminal window origin compute delete-key-pair --key-pair-urn <key-pair-urn> -
Verify that the instance reaches
TERMINATED:Terminal window origin compute get-instance --instance-urn <instance-urn>
The default VPC stays in the project. It costs nothing, and the next launch without a subnet reuses it. To delete the project as well, delete the default VPC first with origin network delete-vpc, then the project. See Manage projects.
Next steps
- Compute: instance lifecycle, images and instance types.
- Storage: add volumes and take snapshots.
- Network: build your own VPC with private subnets.
- IAM: invite your team and assign roles.
- Service accounts: automate with the API.