Question
How to configure and add OVH dedicated servers to my cloud.net cloud?
Environment
Cloud.net, all versions.
Answer
At least two servers are required to play compute resource and backup server roles.
Infrastructure Wizard doesn't allow adding a server to the existing Compute/Backup Zones thus you might need to follow the instructions in How to install additional Compute Resource |
As an example, in this article, we will use the following servers' profiles:
As for a compute resource the CPU, Storage, and RAM very depend on the use case. The backup server has sufficient CPU, RAM resources to work under pretty high load where only backup storage is an option to extend. The bandwidth of 1Gbps of the public (management) network is fine where the Private network needs at least a double of this value.
Compute Resource | Backup Server |
Note. Use original CentOS 7 kernel |
Note. Use original CentOS 7 kernel |
2 network interfaces Networks: Public - management - 1 Gbps Private (type vRack) - appliance / provisioning - 2 Gbps |
2 network interfaces Networks: Public - management - 1 Gbps Private (type vRack) - appliance / provisioning - 2 Gbps |
Install your servers
Assuming that the servers have been already ordered then let's configure them.
Go to Bare Metal Cloud > All my servers > Select a sever > Click the sign … next to the System (OS), then click Install > Install from an OVHcloud template > Type of OS (Basic) :: Linux (CentOS 7 x64, original kernel) :: Customise the partition configuration (yes) > Without SSH Keys > Confirm.
Storage
We’ve ordered 2x960GB SSD NVMe for both servers and configured the software RAID level 1 (Mirroring). It's a good choice to start with, and the decision of other variants mostly depends on the use case.
Disk partitioning
Compute resource. Allocating 50GB for the root partition is fine and the rest of the disk space will be used for storing virtual machine disks. The swap size should be at least 4GB according to the RedHat recommendations.
Backup server. The backup server disk partitioning is similar to the compute resource. The /backupstorage mount point will be used for storing backups and templates. The filesystem ext4 for both root and the backup storage partitions is an optimal choice.
Networks
Appliance network. Order additional IPs (IP block/range) to use for allocating them to the Virtual Servers inside OnApp.
OVH portal > Bare Metal Cloud > IPs
Just for test purposes, we ordered a small IP block
There are two ways on how to use IP addresses of this block: Configuration within a dedicated server and Configuration within a virtual rack (vRack) or on a Dedicated Cloud offer
We need to go with the second way and order virtual rack vRack (Bare Metal Cloud > Order > vRack) and then add all our servers and IP range to this vRack to logically connect the resources together.
Our IP block has the following characteristics
Network IP: 51.89.49.132
Broadcast IP: 51.89.49.135
Hosts: 51.89.49.133
Gateway IP: 51.89.49.134
Netmask: 255.255.255.252
Configure your servers
There are a few changes we need to make inside the OS before we can start the OnApp installation.
Storage
Compute resource
Since the OVH installer adds all partition to fstab we need to remove or comment-out that one which will be used for storing virtual servers.
OnApp will use LVM for managing the virtual server storage on this partition |
On the installation step, we specify vmstorage as a mount point for this partition:
Verify it's present:
[root@ns3158640 ~]# grep vmstorage /etc/fstab
/dev/md3 /vmstorage ext4 defaults 1 2
[root@ns3158640 ~]#
Comment it out:
[root@ns3158640 ~]#sed -i '/\/vmstorage/ s/^/#/' /etc/fstab
Umount:
[root@ns3158640 ~]# umount /vmstorage
Backup server
There are no additional changes regarding the storage we would need to perform on the backup server.
Network
Compute resource
We need to create network interface configuration files to set up the appliance (public network for VMs) and backup/provisioning network.
OVH provides the private network (vRack) we ordered earlier and so let's utilize it for these purposes.
[root@ns3158640 ~]# ip -o l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000\ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000\ link/ether d0:50:99:d4:8f:00 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\ link/ether d0:50:99:d4:8e:ff brd ff:ff:ff:ff:ff:ff
4: usb0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000\ link/ether 7e:36:6e:77:b8:e4 brd ff:ff:ff:ff:ff:ff
[root@ns3158640 ~]#
We can see that the interface eth1 is the one we need to configure:
[root@ns3158640 ~]# echo -e 'DEVICE=eth1\nBOOTPROTO=none\nONBOOT=yes\nTYPE=Ethernet' > /etc/sysconfig/network-scripts/ifcfg-eth1
To have both networks on the same interface we will use VLAN to separate them. Let's use a VLAN id 101 for the provisioning network and give the compute resource and backup server IPs from a private network range 10.0.0.0/24.
[root@ns3158640 ~]# echo -e 'DEVICE=eth1.101\nBOOTPROTO=none\nONBOOT=yes\nVLAN=yes\nIPADDR=10.0.0.2\nPREFIX=24\nNETWORK=10.0.0.0' > /etc/sysconfig/network-scripts/ifcfg-eth1.101
Bring the interfaces up:
[root@ns3158640 ~]# ifup eth1 && ifup eth1.101
Now you should see the following
[root@ns3158640 ~]# ip -o a | grep eth
2: eth0 inet 51.89.97.56/24 brd 51.89.97.255 scope global eth0\ valid_lft forever preferred_lft forever
2: eth0 inet6 2001:41d0:700:3638::/64 scope global \ valid_lft forever preferred_lft forever
2: eth0 inet6 fe80::d250:99ff:fed4:8f00/64 scope link \ valid_lft forever preferred_lft forever
3: eth1 inet6 fe80::d250:99ff:fed4:8eff/64 scope link \ valid_lft forever preferred_lft forever
5: eth1.101 inet 10.0.0.2/24 brd 10.0.0.255 scope global eth1.101\ valid_lft forever preferred_lft forever
5: eth1.101 inet6 fe80::d250:99ff:fed4:8eff/64 scope link \ valid_lft forever preferred_lft forever
[root@ns3158640 ~]#
Later in the Infrastructure Wizard during configuring Appliance Network we will use eth1 as an interface that is connected to the appliance network. |
Backup server
Repeat the same steps as for the compute resource changing an IP address of the provisioning network
[root@ns3186232 ~]# echo -e 'DEVICE=eth1\nBOOTPROTO=none\nONBOOT=yes\nTYPE=Ethernet' > /etc/sysconfig/network-scripts/ifcfg-eth1
[root@ns3186232 ~]# echo -e 'DEVICE=eth1.101\nBOOTPROTO=none\nONBOOT=yes\nVLAN=yes\nIPADDR=10.0.0.1\nPREFIX=24\nNETWORK=10.0.0.0' > /etc/sysconfig/network-scripts/ifcfg-eth1.101
Bring the interfaces up:
[root@ns3158640 ~]# ifup eth1 && ifup eth1.101
Verify the compute resource is accessible by the IP of the provisioning network:
[root@ns3186232 ~]# ping -I eth1.101 10.0.0.2 -c3
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.377 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.487 ms
64 bytes from 10.0.0.2: icmp_seq=3 ttl=64 time=0.380 ms
--- 10.0.0.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.377/0.414/0.487/0.056 ms
[root@ns3186232 ~]#
OnApp Control Panel
So now it's time to run Infrastructure Wizard and add these servers to your cloud.net cloud.
Infrastructure wizard
Control Panel > Admin tab > scroll down and click on the
menu > Start.
1. Create Compute Zone and add compute resources using details from OVH.
You can add more than one compute resource on this page. |
2. Configure Local Storage for storing Virtual Server data. We will use the partition /dev/md3 we removed from fstab.
3. Add our backup server
You can add more than one backup server on this page. |
4. Configure backup server storage and backup/provisioning network. We will use the mount point backupstorage as backup storage and the network interface eth1.101 we configured earlier for the backup/provisioning network.
5. Configure Appliance network. We will add network address 51.89.49.132, network mask 255.255.255.252 and network gateway 51.89.49.134. Since it's a public IP range then do not specify any VLAN ID. Select network interface eth1 (vRack) under the computer resource.
If IP block is used in a virtual rack (our case) then the last IP of the range is always a gateway of this subnet |
6. Make sure everything is correct and press the OK, Build! button.
Billing
Add the newly created resources to one of the existing buckets or create new ones using the billing wizard or buckets menu.
Create your first Virtual Server
1. Add a new template to your cloud (do no forget to add it to the template store which is available in the user's bucket) or use one of the preinstalled templates.
2. Create a new Virtual Server
Verify the Virtual Server responses to ping (if there are no firewall rules applied to the VS that may block this).
Important. Before creating VS.
All supported OnApp CP versions.
Go to the network settings menu. Select the network you have just created via the Infrastructure Wizard, the IP net, and edit the IP range. In our case, we need to change the Start/End address to 51.89.49.133
Reasons:
Using such a small IP range (/30, 4 IPs in total, one host IP) requires editing of the newly created IP range and correcting the Start/End address IP otherwise only the gateway IP address will be available for further allocation to the Virtual Servers.
It's caused by that we had to specify the last IP of this range as a gateway (OVH requirements) but OnApp CP reserves the first IP of the range to be a gateway during the default IP range creation and thus excludes it from the list.
Comments
0 comments
Please sign in to leave a comment.