Downloading Apinizer Setup Files

Apinizer Images

  • If you want to download the ready version, you can use the link below:
Versiyon: 2022.06.3
https://drive.google.com/file/d/18JesOhyhCoff0hbcIqQi9Gk5JkOo-FFS/view?usp=sharing
POWERSHELL


  • Or you can use the commands below to download a specific version yourself and transfer it to the relevant server (Manager, Worker and Cache are images that may be required depending on your common, Integration and Portal license).
sudo docker pull apinizercloud/manager:2022.xx.1
sudo docker save apinizercloud/manager:2022.xx.1 > manager_2022.xx.1.tar

sudo docker load < manager_2022.xx.1.tar 
POWERSHELL

For package names and downloadable versions: https://hub.docker.com/u/apinizercloud

The instructions in the next steps are also available in the relevant files, and they are also clearly shared here for servers that may have limited access to the internet.

The command "tar xvzf fileName.tar" or "tar xf fileName.tar" can be used to extract the files.

Operating System Configurations

Ubuntu 2020.04 

Centos 7.9

Create Apinizer user

adduser apinizer
usermod -aG sudo apinizer
POWERSHELL

Stop and disable the Firewall

sudo systemctl stop ufw
sudo systemctl disable ufw
POWERSHELL

Create Apinizer user

adduser apinizer
usermod -aG wheel apinizer
passwd apinizer
POWERSHELL

Stop and disable the Firewall

sudo systemctl stop firewalld

sudo systemctl disable firewalld
POWERSHELL

Disable the Selinux

Let's disable SELinux to avoid communication problems on servers.

sudo setenforce 0

sudo sed -i 's/^SELINUX=enforcing$/SELINUX=disabled/' /etc/selinux/config
POWERSHELL

Common Configurations

Disable the Swap

Let's disable swap to avoid communication problems on nodes. For this, the following steps are done. and the swap line in the /etc/fstab file is deleted.

sudo swapoff -a
sudo vi /etc/fstab              
POWERSHELL

IP Tables setup

Then let's close the vi file (:wq). We will continue where we left off with the IPTables settings.

sudo vi /etc/sysctl.d/k8s.conf

net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward=1
net.ipv4.tcp_max_syn_backlog=40000
net.core.somaxconn=40000
net.core.wmem_default=8388608
net.core.rmem_default=8388608
net.ipv4.tcp_sack=1
net.ipv4.tcp_window_scaling=1
net.ipv4.tcp_fin_timeout=15
net.ipv4.tcp_keepalive_intvl=30
net.ipv4.tcp_tw_reuse=1
net.ipv4.tcp_moderate_rcvbuf=1
net.core.rmem_max=134217728
net.core.wmem_max=134217728
net.ipv4.tcp_mem=134217728 134217728 134217728
net.ipv4.tcp_rmem=4096 277750 134217728
net.ipv4.tcp_wmem=4096 277750 134217728
net.core.netdev_max_backlog=300000
POWERSHELL

Save changes

sudo modprobe br_netfilter
sudo sysctl --system
POWERSHELL

Install br_netfilter Module (→ Reboot)

sudo lsmod | grep br_netfilter
sudo reboot
POWERSHELL

Docker Installation

Ubuntu 2020.04Centos 7.9
cd apinizerOffline/docker

sudo dpkg -i *.deb

# Create required directories
sudo mkdir -p /etc/systemd/system/docker.service.d

# Create daemon json config file
sudo tee /etc/docker/daemon.json <<EOF
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "100m"
  },
  "storage-driver": "overlay2"
}
EOF

# Start and enable Services
sudo systemctl daemon-reload 
sudo systemctl restart docker
sudo systemctl enable docker

sudo groupadd docker

sudo gpasswd -a $USER docker
POWERSHELL
cd apinizerOffline/docker

rpm -ivh --replacefiles --replacepkgs *.rpm

# Create required directories
sudo mkdir -p /etc/systemd/system/docker.service.d

# Create daemon json config file
sudo tee /etc/docker/daemon.json <<EOF
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "100m"
  },
  "storage-driver": "overlay2"
}
EOF

# Start and enable Services
sudo systemctl daemon-reload 
sudo systemctl restart docker
sudo systemctl enable docker
POWERSHELL


Kubernetes Installation

Ubuntu 2020.04Centos 7.9
cd apinizerOffline/kubernetes
sudo dpkg -i *.deb
POWERSHELL
cd apinizerOffline/kubernetes
yum install -y --cacheonly  --skip-broken --disablerepo=* *.rpm
systemctl enable kubelet && systemctl start kubelet
POWERSHELL

(On Master and Worker nodes)

docker load < kube-apiserver_v1.18.17.tar
docker load < kube-proxy_v1.18.17.tar
docker load < kube-controller-manager_v1.18.17.tar
docker load < kube-scheduler_v1.18.17.tar
docker load < pause_3.2.tar
docker load < etcd_3.4.3-0.tar
docker load < coredns_1.6.7.tar
docker load < flannel_v0.13.1-rc2.tar
POWERSHELL

(On Master Node)

kubeadm init --pod-network-cidr=10.244.0.0/16 --apiserver-advertise-address=YOURIPADDRESS  --kubernetes-version=v1.18.17

kubectl apply -f kube-flannel.yml
POWERSHELL

(On Master Node)

$ sudo kubeadm token create --print-join-command
POWERSHELL

(On Worker Nod)

Result of the previous command we execute on Master node will be executed on each worker node.
BASH

MongoDB Installation

Ubuntu 2020.04Centos 7.9
cd apinizerOffline/mongodb
sudo dpkg -i *.deb
POWERSHELL
cd apinizerOffline/mongodb
yum install -y --cacheonly  --skip-broken --disablerepo=* *.rpm
POWERSHELL

Except the below 2 steps, the rest is the same as MongoDb installation.

sudo vi /etc/yum.repos.d/mongodb.repo
[MongoDB]
name=MongoDB Repository
baseurl=http://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.2/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc
POWERSHELL
sudo yum install -y mongodb-org
POWERSHELL

Elasticsearch Installation

Elasticsearch installation is the same as normal installation. Just elasticsearch will not be downloaded with wget, the file that comes in the setup will be used.

cp apinizerOffline/elasticsearch/elasticsearch-7.9.2-linux-x86_64.tar.gz /opt/elasticsearch/

Uploading Apinizer Images to Kubernetes

cd apinizerOffline/apinizerImages

docker load < manager_2022.xx.1.tar
docker load < worker_2022.xx.1.tar
docker load < cache_2022.xx.1.tar
docker load < integration_2022.xx.1.tar
POWERSHELL


After the Image load, rest is same with original instructions.