This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

Introducing Cloudways Community Forum. Start Discussions and Get Instant Help From Cloudways Community. JOIN NOW

How to use Cloudways ClusterJanuary 9, 2018

Getting your application up and running on Cloudways Cluster isn’t hardly different from Cloudways single-tier offering. However, there are several small details that differ when your application is hosted on Cloudways Cluster. These details are described below in order to provide you with options to better utilize the services provided to you through Cloudways Cluster.

In this KB:

  • Prerequisites to taking your website live
  • How to map your domain
  • How to create an A Record entry at your DNS provider
  • Domain / Subdomain Examples
  • DNS Propagation

cloudways

Before you Begin

Before you point your domains to your web application, we assume that:

  • You have already deployed your website on top of a Cloudways cluster and that everything is tested to be working.
  • You have setup transactional email add-on for outgoing emails (if applicable), otherwise, your application may not be able to send emails

This is the last step of migrating your website to Cloudways; pointing the necessary DNS records to the new Cloudways cluster.

Note: Remember that each Cloudways account comes with one free managed migration (and you can buy as many as you want). If you have any problems during the transition, just get a managed migration!

We have divided our guide into two parts. Part A deals with the changes required on your Cloudways account for adding the domain to your web application. Part B covers how you can add records at your domain registrar to point the domain. It is essential for you to complete both parts of this guide.

Part A (Domain Settings at Cloudways)

Step 1: Cluster Application Management

Log into the Cloudways Platform with your credentials. Select your target application located next to the cluster name.

cloudways

Step 2: Mapping Your Domain

Under Cluster Application Manager area, click on the Domain Management section located on the left side of the screen.

There are two ways to point your domain for which details are mentioned below.

Primary Domain (Recommended)

To ensure your deployed Cloudways application knows which website name (i.e. www.mysite.com) it should respond to, i.e., you need to map a primary domain to your application.

Now enter your website name in the domain field. It should be an FQDN (Fully Qualified Domain Name) like www.mysite.com, blog.mysite.com, shop.mysite.com etc. Click on Save Changes button.

cloudways
Additional Domains (Optional/When needed)

Additional Domains refer to alias website names that you want your application to respond to (i.e. www.myalternatesitename.com). You would not need it, and you can set them anytime.

Or, if you have a multisite website, for example, WordPress MU and you want to map different domains to subsites of your multisite network, you can use this additional domains feature. Make sure to keep your main domain added under Primary Domain option.

You will have to follow the same DNS-related steps listed below for primary domain and/or additional domains that you add to your application.

cloudways

Part B (Settings at Domain Registrar)

Step 3: Create a CNAME in Your DNS Provider Panel

Now you need to access your DNS provider panel and create the proper DNS record ( CNAME). In most cases, depending on your DNS provider, you can follow the high-level process explained below:

  • Stopping an application will:
  • Navigate to your DNS Management page. The location and name of this page vary by provider, but it can be found under Domain Management or Advanced Settings and then select the domain name that you want to update.
  • Locate the Records section. Choose to create a CNAME from the drop-down list and then complete the below fields:
    • Host / Name (subdomain i.e. first part of your domain before the first dot)
    • Points to (Application URL/Domain located in the Access Details section.).
    • TTL (‘Time To Live’ is a propagation time. The value should be lowest i.e. 1 minute or leave this option default as per your registrar).
  • Click the Save Changes button to apply the changes.

As explained, the process can vary significantly from one provider to another. In the case of any issue, contact our Live Chat agents or open a support ticket and we will assist you accordingly.

Check if DNS Propagation has Completed

Once you are done with adding/updating DNS records, it will take time up to 24 hours (depending on your domain registrar) for the changes take effective across the internet.
You can check the status of your domain(s) propagation by using some online available tool such as https://www.whatsmydns.net
That’s it. Once your domain has been pointed, your website is live on Cloudways!

In this KB:

  • Application credentials
  • SFTP Access to your Cluster’s Web Application

You can use SFTP to access/update files and folders on your application on your cluster. Application credentials will be required for SFTP access.
Prerequisites

  • Please make sure that you set the folder permissions to 775 and file permissions to 664 when uploading/updating via SFTP to avoid issues with your application.
  • Before you proceed, you would need to whitelist your IP address from Whitelist IP section under the Cluster Management area.

Step 1: Get Application Credentials

Log into the Cloudways Platform and select your target cluster from the list.

cloudways

Since Cluster only allows Application Credentials, you can find these in the Access Details section under Cluster Application Manager.

cloudways

Step 2: SFTP Access

To use SFTP, you will need an SFTP client. We have used Filezilla in this example.

Here is a list of the fields you will need to enter in your SFTP client:

  • Host (or Host Name): Enter your Cluster Remote URL with SFTP as protocol. This can be found from the Access Details within Application Credentials in Cluster Application Manager area.
  • Password: Insert the password you noted above.
  • Port: Set the port to 22.
  • Click on Quickconnect.

Once you have entered all the required details as mentioned above, press Connect. This will connect to your cluster. Since you are using the Application Credentials, you will land directly in the application folder.

The most interesting sub-folders within the application folder for you are public_html (application code), private_html (where you can store private application data, read more here) and logs (where you can find application logs).

cloudways

That’s it. You have learned how to use Application credentials and access your application via SFTP.

In this KB:

  • How to connect to MySQL remotely
  • What is MySQL Workbench
  • How to connect MySQL Workbench with your Cloudways server
  • How to manage and edit your database with MySQL Workbench

Remote Connection to MySQL

You can connect remotely to MySQL service running on your cluster. In order to do so, you need to first whitelist your IP address from the Whitelist IP section under the Cluster Management area. The URL to use for remotely connected to MySQL is provided on the Access Details section along with MySQL credentials.

Cloudways Login

MySQL Workbench is a unified visual tool for database management. It provides data modeling, SQL development, and comprehensive administration tools for server configuration and user administration. MySQL Workbench is available for Windows, Linux, and Mac OS.

We recommend using it instead of our Cloudways MySQL Manager for databases bigger than 200MB.

To download the MySQL Workbench tool, click here.

Step 1: Download MySQL Workbench

As shown in the image above, simply click on the Download Now button to download the MySQL Workbench.
Cloudways Login

Step 2: Using MySQL Workbench

To start using this tool, open the tool and select the New Connection option on the screen. It will make a new connection to the database server.
Cloudways Login

Step 3(a): Get MySQL Credentials

Before making a connection, note down your Application and MySQL credentials. Your MySQL credentials can be retrieved from the Access Detail section under the Application Management area.
Cloudways Login

Step 3(b): Set Up a New Connection

Please follow the steps below to Setup A New Connection

  • 1- Type the Connection Name: Mysql Connection
  • 2 to 6- MySQL Hostname : REMOTE_URL_UNDER_MYSQL_ACCESS
  • 7- MySQL username: sykrrffspf
  • 8- MySQL Server Port: 3306
  • 9- MySQL Password: Click on store in vault and enter Your_Mysql_Password
  • 10 Click on ok

Cloudways Login

Step 4: Now Double-Click on the Connection You have Just Created

Click on the created connection to connect to your database.

Cloudways Login

Step 5: Edit And Manage Your Database

That’s it! Now you are ready to manage your database as you like.

Cloudways Login

In this KB:

  • Generating and downloading SSH keys
  • Uploading the SSH public key to your Git Repository
  • Copying the Repository SSH address
  • Deploying code from your Repository
  • Checking Deployment logs
  • Git Deployment FAQs

Git is a very popular version control system used to implement development workflows.

The Cloudways Platform allows you to deploy code to your Cluster application from your git repositories. Your git repository must support git over SSH for this to work.

Step 1: Go to Application Management

Log into the Cloudways Platform with your credentials. Click on Clusters in the top menu bar and select your application next to the Cluster name.
cloudways

Step 2: Generating and Downloading SSH Keys

We will use these keys to allow access from your Cloudways cluster to your git repository.

  • Click on the Deployment via Git section in the Application Management area.
  • Now click on the Generate SSH Keys button to generate the keys.

Now, click on Download SSH Keys to download the SSH Public Key that we will use in the next step.

cloudways
Now, click on Download SSH Keys to download the SSH Public Key that we will use in the next step.
cloudways

Step 3: Upload the SSH Public Key to Your Git Repository

We are using a Github account to exemplify the next two steps. If you are using another git service, you will have to find the equivalent way of completing them.

For Github:

  • Log into Github and select your desired repository. Once done, go to Settings.
  • Here you will find the Deploy keys option.
  • Click on the Add Deploy Key button to add the SSH key we downloaded in step 3. Simply open the file we downloaded (git_ssh_key.txt), copy the content and paste into the Key field on Github. You can give a name to this key too in the title field (e.g. Demo).
  • Click on the Add Key button to save the SSH key. (for details, visit this Github doc.)

cloudways

Step 4: Copy the Repository SSH Address

Copy the repository address as shown in the image below. Make sure to copy the SSH address as other formats (like HTTPS) are not supported.

cloudways

Step 5: Deploy Code from Your Repository

  • Back on Cloudways console, paste the SSH address you got in Step 4 into the Git Remote Address field.
  • Then choose the branch of your repository you want to deploy from. In this example, we use the master branch.
  • Next, type the deployment path (i.e. the folder in your cluster where the code will be deployed). Make sure to end it with a /. If you leave this field empty, the code will be deployed to public_html/.
  • Finally, click on the Start Deployment button to deploy your code to the selected path.

cloudways

Step 6: Repository Successfully Cloned

You will get a notification once the deployment process has been completed.
You have further options to delete the repository from the server (no files will be deleted, see FAQ below), pull the latest changes or change the branch you deploy from.

cloudways

Step 7: Check Deployment Logs

If you want to analyze your git deployment history (e.g. when and who did a deployment) and other deployment details, just click on the View Deployment Logs button.

cloudways

Git Deployment FAQs:

1) I want to make sure certain files are not overwritten on the Cloudways server (e.g. configuration files) as they are specific to my development environment.
You can use .gitignore to specify a list of files to ignore when cloning / pulling data from the repository into the Cloudways cluster.

2) What happens to the existing files in the deployment folder when I run a deploy?
Deployment does not delete any existing files present on the deployment folder but not on the source repository.
For example, you have these files in the deployment folder: a.php, b.php, image.jpg, and git pull brings changes to a.php and b.php. Both a.php and b.php will be updated, but image.jpeg will remain unchanged.

3) Can I deploy to a specific folder within public_html?
Yes, you can specify the folder within public_html that you want to deploy to. For example, as an application developer, you may have a repository with just a theme, and you can deploy that repository to the theme folder under public_html and instead of the public_html root.

4) Can I still use SFTP to update my application files and folders?
You can do it, but there can be undesired side effects. Any file that you modify via SFTP, will be overwritten with the file in the repository the next time you pull it (if the same change was not done in the repository file).

5) What happens if I remove the git integration through the Cloudways console?
Removing the git integration will just delete the git configuration files related to the particular application you are removing it from. It will NOT remove any application

6) specific files or folders from the application root nor change in any way the source repository.

In this KB:

  • Locating Manage Services section
  • Starting or stopping a service
  • Purging or disabling Varnish

Services work differently in a containerized environment. When you restart any service, all the containers on which that service is running are recycled one after another. This guide will explain how to manage services within a cluster on the Cloudways Platform.

In the Cluster Management area (Clusters menu, then choose a cluster), you will find the Manage Services section. From there, you can control several important services for your application (Apache, Nginx, Mysql …).

cloudways

How to Restart Services

To restart any service, click on the Restart button.
cloudways
TAfter restarting, you will be notified about the status.
cloudways

How to Purge or Disable Varnish

To start Varnish service, click on the Enable button.
cloudways

To stop Varnish service, click on the Disable button.

cloudways

To purge the Varnish cache from the cluster (i.e. if you have done some changes that you want to check immediately), click on the Purge button.
cloudways

Note: When you disable Varnish, the container on which Varnish service is running is removed from the Cluster. It will be recreated once you enable the service again.

In this KB:

  • How to Navigate to the Packages tab?
  • Change versions of available packages

In the Packages tab, you could install and uninstall several important packages including PHP, Redis and Elasticsearch.

Navigate to the Packages Tab

Login to your Cloudways Cluster Account. In the topmost menu bar, click on the Clusters. Next, click on the cluster where you wish to add/remove packages.

image1

Click Settings & Packages, and then the Packages tab.

Change Versions of Available Packages

At the moment, you could see three options, PHP, Elasticsearch and Redis.

image3

Upgrade/Downgrade PHP version

The default PHP version is 7.0. However, you could upgrade the version to 7.1, or downgrade to 5.6 as per your requirements. Choose the desired version from the drop-down menu and click Save to apply the changes.

image2

Enable/Disable Elasticsearch

You can enable or disable Elasticsearch for your cluster. You could choose from three available versions, 1.7, 2.4 and 5.6. To enable/disable or change the version of the Elasticsearch, click the drop-down menu:

image5

Note: that once you have upgraded to Elasticsearch 5.6, you cannot downgrade to lower versions.

Install/Uninstall Redis

Install or uninstall Redis by selecting the appropriate option from the drop-down menu.

image4

If you need to install a package that is not included in the list, please contact Cloudways Support for further details.

Please insert Content
Have Questions? Ask From Our Helpful Community

Comments are closed.

Do you still need help?

Our Technical Support team is always at work.