xAPPnow LOW CODE PLATFORM - User Manual 

Still no account yet?

×

Training Administration Preparations

 
 

Overview

 
In this training we will explain what data you need before starting any installation or configuration:
 
  • Environment
  • URI for Develop, Test, Production
  • Domain
  • Decide the name of your domain
  • Groups and Roles
  • Together with Business Analysts ask for the Groups and roles used for your Application
  • Configure AD ROLES AND GROUPS
  • Backup
  • Server
  • Frequency
     
  • Docker Installation
     
 
The goal of this topic is to train you in the pre-installation tasks of xAPPnow Low Code Platform. The platform administrator is the responsible of the installation.
 
Exercise 1: Configure logical volumes
 
  • Step 1: Configure disk to be used by logical volume group(optional)
 
Remark: These steps are needed if you need to configure directories like /home or /var/lib/docker on an external disk using logical volumes.
 
  • Step 2: List disks
 
lsblk -o NAME,HCTL,SIZE,MOUNTPOINT | grep -i "sd"
 
  • Step 3: Create partition on selected disk. Assuming the disk assigned to use by lvm is /dev/sdx.
     
    Remark: Sequence of key needed after executing fdisk command. Press enter after selected key.
 
 
fdisk /dev/sdx
 
n      -> create new partition
p      -> creates primary partition
1      -> makes partition the first on the disk
enter  -> accept the default first cylinder
enter  -> accept the default last cylinder
t          -> change partition type
8e       -> changes to LVM partition type
p         -> list setup
w        -> write changes
 
  • Step 4: Create physical volume
 
pvcreate /dev/sdx1
 
  • Step 5: Create volume group
     
vgcreate <VOLUME_GROUP> /dev/sdx1
 
 
  • Step 6: Create logical volumes
     
lvcreate -L 20G -n <LOGICAL_VOLUME_HOME> <VOLUME_GROUP>
lvcreate -L 20G -n <LOGICAL_VOLUME_DOCKER> <VOLUME_GROUP>
 
  • Step 7: Format the logical volumes
 
mkfs -t ext4 /dev/<VOLUME_GROUP>/<LOGICAL_VOLUME_HOME>
mkfs -t ext4 /dev/<VOLUME_GROUP>/<LOGICAL_VOLUME_DOCKER>
 
  • Step 8: Create mount points
     
mkdir -p /home
mkdir -p /var/lib/docker
mount -t ext4 /dev/<VOLUME_GROUP>/<LOGICAL_VOLUME_HOME>  /home
mount -t ext4 /dev/<VOLUME_GROUP>/<LOGICAL_VOLUME_DOCKER>  /var/lib/docker
 
  • Step 9: Use blkid command to list partitions UUID blkid. Add partitions to /etc/fstab. Fix /home mount path
 
UUID=209d8f9c-c7fc-4553-a305-166ca1116bae  /home ext4    defaults    0    1
 
 
Exercise 2: Increase logical volumes size (optional)
 
Remark: This task is executed if the filesystem use lvm configuration and needs to be increased in size
 
lvextend -L +<SIZE> /dev/<VOLUME_GROUP>/<LOGICAL_VOLUME>
resize2fs /dev/<VOLUME_GROUP>/<LOGICAL_VOLUME>
 
Example:
 
lvextend -L +20G /dev/ <VOLUME_GROUP>/var
resize2fs /dev/<VOLUME_GROUP>/var
 
 
Exercise 3: Add xAPPnow user
 
  • Step 1: Execute the following commands:
     
adduser appollo
usermod -aG sudo appollo
 
Exercise 4: Accept your ssh public key on server (optional)
 
Remark: This step allows the access using ssh on servers that need ssh trusted key connection. It is needed that the server allows the user to copy the public key. This steps are needed for automatic synchronize of                     backup files to other server.
 
  • Step 1: Check if ssh keys are already generated by listing the content of .ssh directory of the user
     
    ls ~/.ssh
     
  • Step 2: Generate ssh keys on current server in case they don't exist
     
ssh-keygen -t rsa
 
  • Step 3: Copy the public key to remote server
 
scp ~/.ssh/id_rsa.pub  <USER>@<IP>:/home/<USER>
 
  • Step 4: Connect to the other server
 
ssh <USER>@<IP>
 
  • Step 5: Copy the key to authorized_keys file for appollo user on the other server
 
sudo cat id_rsa.pub  /home/appollo/.ssh/authorized_keys
 
 
Exercise 5: Update repository
 
apt update
apt install aptitude net-tools byobu htop zip unzip snapd apache2-utils p7zip-full
 
Exercise 6: Configure postgresql huge pages (optional)
Remark: Huge pages configured by the operating system are used for postgres shared buffers. A huge page size is 2MB.
 
 
echo 'vm.nr_hugepages = <NUMBER_PAGES>' > /etc/sysctl.d/42-hugepages.conf
sysctl --system
Where NUBMER_PAGES is the number of huge pages to use, example: 1024 will use 2048MB of RAM for huge pages.
After this is set postgresql can use a bigger size for shared buffers.
To remove this configuration from the system the change can be reverted with the commands:
 
rm  /etc/sysctl.d/42-hugepages.conf
sysctl --system
 
 
 
Exercise 7: Install certbot (optional)
Remark: Certbot tool is used for secure access using https and certificates management
 
snap install core
snap refresh core
snap install --classic certbot
ln -s /snap/bin/certbot /usr/bin/certbot
 
 
Exercise 8: Install Docker
 
Remark: Steps are taken from https://docs.docker.com/engine/install/ubuntu/
 
apt install apt-transport-https ca-certificates curl gnupg lsb-release
 
  • Step 2: Import the repository’s GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
 
  • Step 3: Add the Docker APT repository to your system
 
echo \
       "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
       $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
 
  • Step 4: Install docker
     
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io
 
  • Step 5: Allow appollo user to run docker commands
     
usermod -aG docker appollo
chmod 666 /var/run/docker.sock
 
  • Step 6: Download and install docker-compose with following commands
     
curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
 
  • Step 7: Verify docker installation.Check docker and docker-compose version
 
docker --version
docker-compose --version