Discuss

Managing Cloud Servers with Resource Manager

Intro

Resource Manager lets you organize all your project related resource in a single place, from cloud servers, database servers, storage solutions, to local services*.

In this tutorial we will show you how easy it is to fully manage your cloud servers with the Resource Manager.

*Currently only managing cloud servers is available in Resource Manager, more services are coming in the next updates

Connecting to a Cloud Provider

The first thing you need to do is to connect to your cloud provider.
Open the Resource Manager panel:

Right click Cloud Providers:

And click Add New Provider:

Open the Providers dropdown:

And select your cloud provider. For now Linode, Digital Ocean and Hetzner are available as predefined providers, but more cloud providers are coming in the next updates. There’s also an option to connect to any custom cloud provider, where you can define your own servers:

Connecting to Predefined Cloud Providers

If you want to use any of the selected cloud providers, then select it from the dropdown.
Paste the API Key provided by your cloud provider. You can find this key in the control panel of the provider - go directly there or click the Control Panel button, which will load the Cloud Provider control panel URL in your browser:

If you have an existing ssh key, it will be selected automatically in the SSH key option. If you don’t have a ssh key, you can create a new one, clickin the New button:

Next, click Connect:

A success notification will appear, click OK:

And you can see the Cloud Provider added in the Resource Manager:

Connecting to a Custom Provider

You can also connect any custom provider by selecting the Custom option:

Click Connect:

A success notification will appear, click OK:

And you can see the Custom Cloud Provider added in the Resource Manager:

Managing Servers

After you connected to your cloud provider, you can create new servers and manage them here.

Creating a New Server

Predefined Cloud Providers

If you are using any of the predefined Cloud providers, you can create new servers directly from within Wappler.
Right click Servers under your selected Cloud provider and select Create New Server:

Add a name for your server:

And adjust its properties - region, size, OS:

Select ssh key(s) to be used with this server. You can choose more than ssh keys if needed, the default one will be pre-selected:

Click Create:

And you will see a notification displaying the progress:

Once the server is created you will see it under Servers:

Expanding your server you will find the services applied to it, as well as the projects running on this server:

Custom Cloud Providers

For custom cloud providers, there’s no option to create a server from within Wappler. However you can import your existing servers.
Right click Servers under your Custom Cloud provider and select Import Server:

Enter a name for your server and add its IP address:

Click Import:

Once the server is imported you will see it under Servers:

Deploying to Server

After we created our cloud server, now let’s setup our remote target so that we deploy our project to it.
Open the project settings:

Create a new target:

Select Connection - Remote:

And set the Docker Remote type to Cloud Provider SSH:

Open the Cloud Server Dropdown and select your server:

Click Save:

And you are ready to deploy. Select your remote target:

And Click Deploy:

After your project is deployed on the server you will see it under Projects:

Deleting a Server

You can delete the server from your project by clicking the delete button in the top toolbar. Note that this will only remove the server from this project and will leave it running on your Cloud Provider:

If you want to completely destroy your server even on the Cloud Provider, then use the Destroy Server button:

Importing a Server

You can also import an existing server in your project, after you connected to a Cloud Provider. Right click on Server and select import:

Select your server from the dropdown and click the Import button:

You can see your server has been imported: