Apinizer Setup Files

Apinizer Images

You can download the latest version from the link below:
	Versiyon: 2021.10.1   
	https://drive.google.com/file/d/1RNvIdBFq3qHYd2yMUMuRE-jO8RLOV0Ns  

Or if you want to download and transfer some specific version by yourself, you use the commands below (Manager, Worker and Cache is mandatory, Integration and Portal depends on your license):
	sudo docker pull apinizercloud/manager:2021.xx.1
    sudo docker save apinizercloud/manager:2021.xx.1 > manager_2021.xx.1.tar

Note: For image names and available versions, please refer to: https://hub.docker.com/u/apinizercloud
TEXT

Instructions for Apinizer Images

Instructions for Apinizer images 
https://drive.google.com/file/d/1DNKMxOqp2kd81pKHkmxx2UVX7k4mkpKb
POWERSHELL


Important!

Next steps can also be found in previously downloaded files.

To extract, use the command "tar xvzf fileName.tar" or "tar xf fileName.tar"


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


sudo setenforce 0

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

Common Configurations

Disable the Swap

Remove or comment the related line from file at /etc/fstab

sudo swapoff -a

sudo vi /etc/fstab              
POWERSHELL

IP Tables

To exit, after pressing Escape, press these buttons (shift + "." for ":") :wq

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 then 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=YOUR-IP-ADDRESS  --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 kurulumu normal kurulum ile aynı. Sadece wget ile elasticsearch indirilmeyecek, setup içinde gelen dosya kullanılacak.

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

Loading Apinizer Images

cd apinizerOffline/apinizerImages

docker load < manager_2021.10.1.tar
docker load < worker_2021.10.1.tar
docker load < cache_2021.10.1.tar
docker load < integration_2021.10.1.tar
POWERSHELL


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