Server Setup for the Project

Install Ubuntu Server

First, we will use the Ubuntu version 24.04 operating system to install on a virtual machine.

We will create a virtual machine using VMware Workstation, to install the application you can refer to the following link:

Proceed to create the virtual machine on VMware Workstation by following these steps:

alt text alt text alt text

Select the Ubuntu Server ISO file we just downloaded.

alt text

Name the virtual machine and choose a folder that you manage.

alt text

Depending on your machine’s configuration, you can select the appropriate Processors and Cores, but GitLab requires at least 2 CPU (Processor Cores).

alt text alt text alt text

Next, choose the default configurations.

alt text alt text

After the virtual machine is installed successfully, we will boot the virtual machine and configure the Ubuntu Server.

alt text

Continue to choose the default configurations.

In the Storage Configuration section, configure the Root ( / ) partition with the remaining available space.

alt text alt text

Tick the option to install OpenSSH.

alt text

Wait for Ubuntu to be successfully set up and proceed with Reboot.

alt text

After the reboot, log in to the server with the username and password you just created. Note the IPv4 upon login, used for SSH into the server. alt text

You can use the ip a command to view IPv4 and other server information.

Open CMD on Windows to SSH into the server using the IPv4 and Username.

alt text

However, when the server is turned off and back on, the IPv4 may change, so we need to set up a static IP for the server. When rebooting, the IP will remain unchanged, making it easier for us to configure.

Switch to Root privileges using the sudo -i command for easier configuration.

Edit the configuration in the 50-cloud-init.yaml file with the command vi /etc/netplan/50-cloud-init.yaml and write the following configuration:

# This is the network config written by 'subiquity'
network:
  ethernets:
    ens33:
      dhcp4: no
      addresses: [192.168.181.100/24]
      gateway4: 192.168.181.2
      nameservers:
              addresses: [8.8.8.8, 8.8.4.4]
  version: 2

Save the file and run the following commands:

$ netplan apply

$ reboot

The gateway4 line is the NAT Gateway IP. We can get it in VMware Workstation by accessing Edit -> Virtual Network Editor -> NAT Setting.

alt text

After successfully configuring the static IP, we will proceed to create a Snapshot and Clone to other servers.

alt text

Right-click on Gitlab Server -> Snapshot -> Take Snapshot and fill in the information.

alt text

alt text

Thus, we have successfully created a Snapshot, after that, we will proceed to clone the server.

Access Snapshot Manager and perform the following steps:

alt text

alt text

After that, we will configure the servers according to the following table:

Server Hostname IP Tĩnh
Gitlab Server gitlab-server 192.168.181.101
Development Server development-server 192.168.181.102
Build Server build-server 192.168.181.103