Quickstart
Clever Cloud provides an automated hosting platform for developers. Deploy your app easily and launch dependencies without having to worry about the infrastructure set up. Follow this guide to get ready to deploy quickly as you learn the basics of Clever Cloud.
Create a Clever Cloud Account
The API of Clever Cloud uses OAuth 1 to perform authentication actions. There are two ways to signup to Clever Cloud: email or GitHub login.
Two Factor Authentication (2FA)
Clever Cloud supports 2FA. You can enable it here: https://console.clever-cloud.com/users/me/authentication
Please, backup your recovery codes, we won’t be able to restore access to your account if you lose access to your regular codes.
Deploy your code
What’s an Application on Clever Cloud
An application is defined on Clever Cloud by the following elements:
- a dedicated language/framework;
- a deployment method (FTP and/or Git);
- resources consumption (CPU, RAM, Disk…), depending on the language or framework used;
- an optional configuration file you may add to your project.
If one of these elements is missing, Clever Cloud can’t deploy your application properly (except the configuration file, optional in some cases).
How it Works
When you push an application’s code to git or via FTP, the platform receives it and checks the resource’s requirements. If they are complete, the deployment is launched. When finished and successful, the application is up and running.
The log system retrieves all output from the application and displays it in the logs tab of your application in the Clever Cloud console.
Supported Platforms
Create an Application Step by Step
In the Clever Cloud Console:
Select the organization
Choose the organization you want to deploy in from the left menu. At this point you must only have the Personal Space but you can create one.
Click on “Create an application”
Find it in the Organization Manager panel, at the top left of the left menu.
This starts the application creation wizard. If your account has been linked to GitHub, you can select a repository from your GitHub account.
If you want to deploy an application within a GitHub organisation, first grant the Clever Cloud API access to it.
Select the language
Choose the language or the framework you want to deploy.
Fine-tune your scaling configuration
Horizontal scaling is the number of instances that can run at the same time. Vertical scaling sets the minimum and maximum size the instance can be.
Name your application
Enter the name and the description of your application.
Optional steps
- The wizard will offer you to add an add-on to your application
- The wizard will offer you to add environment variables to your application
Choose How to Deploy
Troubleshooting
Git ⋅ Remote is asking for a password
If the remote asks you for a password right after a git push attempt, this may be due to a SSH Key misconfiguration.
Add your SSH key to your profile here: https://console.clever-cloud.com/users/me/ssh-keys
The full tutorial about adding SSH key is here: Adding SSH keys
Git ⋅ Unable to resolve the reference master
You are probably trying to push from another branch. Remeber that:
- You can only push to the master branch for deployment. Trying to push to another branch will trigger an error.
- You cannot push a tag (which refers to a commit) to the remote repository. If you do so, no deployment will be triggered.
- In order to push to master from a non-master local branch, use this syntax:
git push <remote-name> <branch-name>:master
GitHub ⋅ Does not appear to be a git repository
You can’t directly push to an application created on Clever Cloud as a GitHub app: in this case, only the automatic deployment from GitHub is henceforth allowed.
If you try to push to Clever Cloud, as you would do for a non-GitHub app, you will get the following error :
fatal: '/data/repositories/<app_id>.git' does not
appear to be a git repository
Indeed, no git repository is created on Clever Cloud because the application is directly cloned from GitHub.
If you have to push directly to a repo in order to deploy an application (eg if you deploy from a CI), then create a non-GitHub app.
Manage your Application
There are many tabs available in the application’s menu on Clever Console:
- Information: General information about your application
- Scalability: Set-up scalability options
- Domain names: Manage custom domain names
- Environment variables: Manage environment variables
- Service dependencies: Link add-ons and applications
- Exposed configuration: Manage exposed environment variables
- Activity: Track last deployments
- Logs: Visualize application’s logs
- Metrics: Visualize application’s metrics
- Consumption: Visualize your application’s consumption.
Create your first add-on
Applications often requires one or more services in addition to the runtime itself. Add-ons are services you can use independently, or you can link them with your application(s). For instance, you may want to add a database or a caching system to your application or just have a database with no linked application.
An add-on can be shared by different applications to share data between them. It can be a database shared by two or three applications of your infrastructure for example, or they can be independent.
Most of the add-ons catalog is provided by Clever Cloud, but vendors are also allowed to provide services external to Clever Cloud (See how to integrate your SaaS with Clever Cloud)
Available add-ons
Clever Cloud provides multiple add-ons to work with your applications:
If your add-on:
Add-on Billing
There are two kinds of billing:
- Per-month billing: Add-ons with fixed resources (storage, CPU and RAM)
- Per-usage billing: Add-ons based on consumption, like FS Bucket and Cellar
Manage your Add-on
Once an add-on is created, at least two tabs are available in the Clever Cloud console:
- Add-on dashboard: This screen provides and overview of your add-on and its options, depending on the type of add-on it is.
- Information tab: This screen sums-up the characteristics of the selected add-on. Features and environment variables (if applicable) are shown.
Other tabs may be available, depending on the add-on type.
Delete an add-on
To delete an add-on:
- Go to the Information tab of the add-on.
- Click on Remove add-on.