Getting Started with Cube Cloud: Import GitLab repository via SSH

This guide walks you through creating a new deployment on Cube Cloud from a GitLab repository via SSH.

Navigate to cubecloud.dev, and create a new Cube Cloud account.

Click the Create Deployment button. This is the first step in the deployment creation. Give it a name and select the cloud provider and region of your choice.

Cube Cloud Create Deployment Screen

Next up, the second step in creating a Cube App from scratch in Cube Cloud is to click the Import Git repository via SSH button.

Cube Cloud Upload Project Screen

Now go to your GitLab repository and from the Clone dropdown menu, copy the Clone with SSH URL:

Getting the repository's SSH URL from GitLab

Back in Cube Cloud, paste the URL and click Generate SSH key:

Getting SSH key from Cube Cloud

Now copy the SSH key and go back to GitLab and paste it into the repository's settings. Find the Deploy keys section and click Expand. Give the key a title (Cube Cloud, for example) and paste the SSH key in the relevant field:

Add Cube Cloud deploy key to GitLab

Ensure Grant write permissions to this key is checked, then click Add key. Go back to Cube Cloud and click Connect. After a connection is successfully established, you should see the next screen:

Getting webhook URL from Cube Cloud

Copy the Cube Cloud Git Webhook URL and go to your GitLab project's Webhooks settings. Paste the URL into the correct field, ensure the Push events trigger is checked and click Add webhook.

Add Cube Cloud webhook to GitLab

Back in Cube Cloud, click Connect to test the webhook.

Enter your credentials to connect to your database. Check the connecting to databases guide for more details.

Want to use a sample database instead? We also have a sample database where you can try out Cube Cloud:


FieldValue
Hostdemo-db.cube.dev
Port5432
Databaseecom
Usernamecube
Password12345
Cube Cloud Setup Database Screen

In the UI it'll look exactly like the image below.

Cube Cloud Setup Database Screen

If you run into issues here, make sure to allow the Cube Cloud IPs to access your database. This means you need to enable these IPs in your firewall. If you are using AWS, this would mean adding a security group with allowed IPs.

Step five in this case consists of generating a data schema. Start by selecting the database tables to generate the data schema from, then hit generate.

Generating schemas for a new Cube Cloud deployment

Cube Cloud will generate the data schema and spin up your Cube deployment. With this, you're done. You've created a Cube deployment, configured a database connection, and generated a data schema!

Cube Cloud Playground

You're ready for the last step, running queries in the Playground.

Now you can navigate to Playground to try out your queries or connect your application to the Cube Cloud API.

Cube Cloud Playground

Did you find this page useful?