Introduction
This article is a step-by-step guide of accessing the Elastifile LB IP from clients which reside on a different VPC or a different project.
The Elastifile load balancer is based on GCP routes.
Each route entry represents a single storage node in the Elastifile system.
* Note: Currently, the routes propagation over peered network is a beta feature.
Setup
In the following example we will use the following environment:
Elastifile Cluster
Project Name: "canary-support"
VPC Name: "dadee-network"
CIDR: "10.142.0.0/20"
NFS Clients
Project Name: "support-team-a"
VPC Name: "snir-shared"
CIDR: "10.141.0.0/20"
Note: VPC can be in the same project. The process is the same.
Load Balancer IP [Mount Point]
Step-by-Step instructions
- Set up VPC peering between the two VPC. This case VPC peering between two VPCs.
- Validate VPC peering is established and connected. Status should say "Connected".
- Run the following commands in order to allow the beta feature of import/export routes between VPC networks. If routes already were Exported from Elastifile VPC and Imported into client VPC skip to step 5.
# Modify the arguments according to your own environment!
# On the Elastifile project, use the export routes flag
$ gcloud --project=canary-support beta compute networks peerings update peering --network=dadee-network --export-custom-routes
# On the clients project, use the import routes flag
$ gcloud --project=support-team-a beta compute networks peerings update peering --network=snir-shared --import-custom-routes
-
Modify the firewall rules. For Elastifile VPC, Add the clients' subnet IP range to the 'elastifile-storage-client' FW rule. For Client VPC, add the Elastifile subnet allowing mount ports open.
Example below:Name: elastifile-storage-client-<cluster>
Targets tags:[Elastifile Storage Nodes Network Tags]
Source: 10.141.0.0/20[Client Network Range]
tcp: 111,644,2049,4040,4045
udp: 111,644,2049,4040,4045
other: icmpClient firewall rule:
Targets:[Client Network Tags]
Source: 10.142.0.0/20[Elastifile Network Range]
tcp: 111,644,2049,4040,4045
udp: 111,644,2049,4040,4045
other: icmp -
Now you can use the load balancer IP for mounting the Elastifile shares in your clients:
root@client ~]# showmount -e 10.251.255.1 Export list for 10.251.255.1: /first/root * /second/root * /third/root *