This guide explains how to set up a Redis server on a Linux virtual machine (VM) in Google Cloud Platform (GCP), ready to integrate with CloudM Migrate. The process involves creating a VM instance, installing Redis, and configuring CloudM Migrate to connect to the Redis server.
Assumptions
This guide assumes that you:
-
Have a basic understanding of Google Cloud Platform (GCP), including creating VM instances and managing networking within GCP.
-
Are familiar with the process of setting up and configuring virtual machines in a cloud environment.
Prerequisites
-
Platform: Google Cloud Platform (GCP)
-
Operating System: Ubuntu 16.04+ (not PRO)
-
Disk Type: Standard or Balanced disk
-
VM Specifications: The number of CPUs, RAM, and disk size should be based on the size of your migration tasks.
Note: Currently, this guide is specific to Google Cloud Platform (GCP).
1. Create a VM Instance in GCP
-
Log in to your Google Cloud Console.
-
Create a new VM instance with Ubuntu 16.04+. Ensure the VM is in the same subnet as your CloudM Migrate servers for proper communication.
-
Choose the appropriate machine type based on the expected load of the migration (e.g., CPU, RAM, disk size).
-
Select a Standard / Balanced disk for storage.
2. Connect to Your VM via SSH
-
Open your terminal or use the SSH button in the GCP console to access the VM instance.
3. Install Redis on the VM
Run the following commands to install Redis on the Ubuntu VM:
4. Verify Redis Installation
Once installed, verify Redis is running by using the redis-cli
tool:
If Redis is running correctly, it will respond with PONG
.
5. Configure Redis Bindings
To allow CloudM Migrate to connect to Redis, you need to update the binding configuration:
-
Edit the Redis configuration file:
-
Use the Page Down key to scroll to the
bind
configuration line. By default, it will be set to:
-
Change the bind address to
0.0.0.0
to allow external connections:
-
Save and exit the editor:
-
Press
CTRL+X
to exit. -
Press
Y
to confirm the changes, thenEnter
to save.
-
6. Restart Redis
To apply the new binding settings, restart the Redis service with the following command:
7. Troubleshooting Redis Logs (If Necessary)
If you encounter issues, you can view the Redis logs for troubleshooting:
This will display the latest Redis log entries to help identify any errors or issues.
8. Disable Local Redis Service on Primary Migration Server
-
On your primary migration server, disable the local Redis service to avoid conflicts. You can do this by stopping or disabling the Redis service.
9. Configure CloudM Migrate to Use the Redis Server
-
Open the CloudM Migrate Service Manager on your primary migration server.
-
In the Redis Server Location field, enter the internal IP address or hostname of the Redis server you just set up.
-
Click Update Configuration to save the changes.
-
Restart the CloudM Migrate service to apply the new Redis configuration.