Setting Up the AppViewX Cloud Connector
- Via a Open Virtual Appliance (OVA)
The AppViewX Virtual Image is an Open Virtual Appliance (OVA) that is bundled with the software, network, and Docker prerequisites for installing the AppViewX Cloud Connector without altering the OS configuration on their systems.
When setting up the cloud connector via a virtual image, you will be required to download only the license file.
- Via the Native OS
- With Docker runtime
Tenant/Administrator/User to provision a Linux machine with docker installed fulfilling prerequisites across the following categories: hardware, operating system, Docker, and server and network. If all prerequisites are met, you can install the AppViewX Cloud Connector via the Native OS.
When setting up the cloud connector via the native OS, you will be required to download a package that contains the cloud connector installer and the license file.
- RHEL 8+ without Docker runtime
Tenant/Administrator/User to provision a RHEL8+ machine fulfilling prerequisites (generic as well as those exclusive for RHEL 8+) across the following categories: hardware, operating system, Docker, and server and network.
Optional (If required) - To install RHEL OS in the K3s setup with minimal sudo access, refer to the section CC Installation with Minimal Sudo Access in RHEL OS.
- With Docker runtime
- Helm model in a Kubernetes cluster
CC Installation with Minimal sudo Access in RHEL
To configure the minimal permissions for the user installing the cloud connector,
-
Copy the below content to a text file/editor and do the following:
appviewx_user> ALL=(ALL) NOPASSWD: <cc_tar_file_location>/deps/tools/k3s ctr images import <cc_tar_file_location>/deps/tools/mid-server-docker-image/avx-mid-server-base-* .tar --data-dir=<cc_tar_file_location>/k3s-data-dir/k3s-state/k3s <appviewx_user> ALL=(ALL) NOPASSWD: /usr/local/bin/k3s-uninstall.sh <appviewx_user> ALL=(ALL) NOPASSWD: /bin/mkdir -p <cc_tar_file_location>/k3s-data-dir/k3s-state/k3s/agent/images/ <appviewx_user> ALL=(ALL) NOPASSWD: /bin/mkdir -p /etc/rancher/k3s <appviewx_user> ALL=(ALL) NOPASSWD: /bin/ln -sf k3s /usr/local/bin/kubectl <appviewx_user> ALL=(ALL) NOPASSWD: /bin/ln -sf k3s /usr/local/bin/crictl <appviewx_user> ALL=(ALL) NOPASSWD: /bin/ln -sf k3s /usr/local/bin/ctr <appviewx_user> ALL=(ALL) NOPASSWD: /bin/rm -f /etc/yum.repos.d/rancher-k3s-common*.repo <appviewx_user> ALL=(ALL) NOPASSWD: /bin/rm -f /etc/systemd/system/k3s.service <appviewx_user> ALL=(ALL) NOPASSWD: /bin/rm -f /etc/systemd/system/k3s.service.env <appviewx_user> ALL=(ALL) NOPASSWD: /bin/systemctl enable /etc/systemd/system/k3s.service <appviewx_user> ALL=(ALL) NOPASSWD: /bin/systemctl daemon-reload <appviewx_user> ALL=(ALL) NOPASSWD: /bin/systemctl restart k3s <appviewx_user> ALL=(ALL) NOPASSWD: /bin/systemctl disable k3s <appviewx_user> ALL=(ALL) NOPASSWD: /bin/touch /etc/systemd/system/k3s.service.env <appviewx_user> ALL=(ALL) NOPASSWD: /bin/tee /etc/yum.repos.d/rancher-k3s-common.repo <appviewx_user> ALL=(ALL) NOPASSWD: /bin/tee /usr/local/bin/k3s-killall.sh <appviewx_user> ALL=(ALL) NOPASSWD: /bin/tee /usr/local/bin/k3s-uninstall.sh <appviewx_user> ALL=(ALL) NOPASSWD: /bin/tee /etc/systemd/system/k3s.service.env <appviewx_user> ALL=(ALL) NOPASSWD: /bin/tee -a /etc/systemd/system/k3s.service.env <appviewx_user> ALL=(ALL) NOPASSWD: /bin/tee /etc/systemd/system/k3s.service <appviewx_user> ALL=(ALL) NOPASSWD: /bin/tee /etc/logrotate.d/k3s <appviewx_user> ALL=(ALL) NOPASSWD: /bin/cp <cc_tar_file_location>/deps/tools/mid-server-docker-image/rancher-mirrored-core dns-coredns-*.tar <cc_tar_file_location>/k3s-data-dir/k3s-state/k3s/agent/images/ <appviewx_user> ALL=(ALL) NOPASSWD: /bin/cp <cc_tar_file_location>/deps/tools/mid-server-docker-image/rancher-local-path-pr ovisioner-*.tar <cc_tar_file_location>/k3s-data-dir/k3s-state/k3s/agent/images/ <appviewx_user> ALL=(ALL) NOPASSWD: /bin/cp <cc_tar_file_location>/deps/tools/mid-server-docker-image/rancher-mirrored-paus e-*.tar <cc_tar_file_location>/k3s-data-dir/k3s-state/k3s/agent/images/ <appviewx_user> ALL=(ALL) NOPASSWD: /bin/cp <cc_tar_file_location>/deps/tools/k3s /usr/local/bin/ <appviewx_user> ALL=(ALL) NOPASSWD: /bin/grep '^\\s*SELINUX=enforcing' /etc/selinux/config <appviewx_user> ALL=(ALL) NOPASSWD: /bin/chmod 755 /usr/local/bin/k3s-killall.sh <appviewx_user> ALL=(ALL) NOPASSWD: /bin/chmod 755 /usr/local/bin/k3s <appviewx_user> ALL=(ALL) NOPASSWD: /bin/chmod 755 /usr/local/bin/k3s-uninstall.sh <appviewx_user> ALL=(ALL) NOPASSWD: /bin/chmod 0600 /etc/systemd/system/k3s.service.env <appviewx_user> ALL=(ALL) NOPASSWD: /bin/chmod 0755 /etc/systemd/system/k3s.service <appviewx_user> ALL=(ALL) NOPASSWD: /usr/bin/sh -c touch /usr/local/bin/k3s-ro-test && rm -rf /usr/local/bin/k3s-ro-test <appviewx_user> ALL=(ALL) NOPASSWD: /bin/sha256sum /usr/local/bin/k3s /etc/systemd/system/k3s.service /etc/systemd/system/k3s.service.env <appviewx_user> ALL=(ALL) NOPASSWD: /bin/chcon -u system_u -r object_r -t container_runtime_exec_t /usr/local/bin/k3s <appviewx_user> ALL=(ALL) NOPASSWD: /sbin/iptables-restore <appviewx_user> ALL=(ALL) NOPASSWD: /sbin/iptables-save <appviewx_user> ALL=(ALL) NOPASSWD: /sbin/ip6tables-restore <appviewx_user> ALL=(ALL) NOPASSWD: /sbin/ip6tables-save <appviewx_user> ALL=(ALL) NOPASSWD: /sbin/restorecon -R -i /etc/systemd/system/k3s.service <appviewx_user> ALL=(ALL) NOPASSWD: /sbin/restorecon -R -i /etc/systemd/system/k3s.service.env <appviewx_user> ALL=(ALL) NOPASSWD: /bin/rm -rf <cc_tar_file_location>/k3s-data-dir <appviewx_user> ALL=(ALL) NOPASSWD: /bin/sh -c umount "$0" && rm -rf "$0" <cc_tar_file_location>/k3s-data-dir/kubelet/pods/* <appviewx_user> ALL=(ALL) NOPASSWD: /bin/sh -c rm -rf <cc_tar_file_location>/deps/logs && rm -rf <cc_tar_file_location>/deps/properties/inventory && rm -rf <cc_tar_file_location>/deps/*.log && rm -rf <cc_tar_file_location>/deps/utils/*.yaml <appviewx_user> ALL=(ALL) NOPASSWD: /bin/touch .tmp /usr/local/bin/.tmp <appviewx_user> ALL=(ALL) NOPASSWD: /bin/rm /usr/local/bin/.tmp <appviewx_user> ALL=(ALL) NOPASSWD: /bin/bash -c cat > /etc/systemd/system/kube-cert-auto-renew.service <appviewx_user> ALL=(ALL) NOPASSWD: /bin/bash -c cat > /etc/systemd/system/kube-cert-auto-renew.timer <appviewx_user> ALL=(ALL) NOPASSWD: /bin/systemctl stop kube-cert-auto-renew.service <appviewx_user> ALL=(ALL) NOPASSWD: /bin/systemctl stop kube-cert-auto-renew.timer <appviewx_user> ALL=(ALL) NOPASSWD: /bin/systemctl start kube-cert-auto-renew.timer <appviewx_user> ALL=(ALL) NOPASSWD: /bin/systemctl enable kube-cert-auto-renew.timer <appviewx_user> ALL=(ALL) NOPASSWD: /bin/systemctl disable kube-cert-auto-renew.timer <appviewx_user> ALL=(ALL) NOPASSWD: /bin/systemctl disable kube-cert-auto-renew.service <appviewx_user> ALL=(ALL) NOPASSWD: /bin/systemctl daemon-reload <appviewx_user> ALL=(ALL) NOPASSWD: /bin/rm -f /etc/systemd/system/kube-cert-auto-renew.timer <appviewx_user> ALL=(ALL) NOPASSWD: /bin/rm -f /etc/systemd/system/kube-cert-auto-renew.service
- Replace <appviewx_user> with the username intended for installing the cloud connector.
- Replace <cc_tar_file_location> with the full path to the directory where the install.sh script or the cloud connector tar file is located.
- Log in as the root user on the machine where the Cloud Connector is to be installed.
-
Execute the following command:
visudo
- Copy the content of the text file (in step 1) and paste it into the /etc/sudoers file, directly below the line "root ALL=(ALL) ALL".
-
Save the /etc/sudoers file and switch back to the intended user
(which was replaced in the text file). Execute the command:
su - <appviewx_user>isudo
Installing the Cloud Connector
- Create and download a cloud connector package tar from the UI and move the tar, license files to the cloud connector installation environment.
- Switch to the directory where the Cloud connector tar is present.
-
To extract the installer, from the downloaded package, extract the
tar.gz file using the command given below:
tar -zxvf <filename>.tar.gz
Example:tar - zxvf pesrv07-test-94-99-appviewx-appviewx-net-cloud-connector.tar.gz
-
Execute the following command:
vi deps/tools/install_k3s.sh
-
Search for chown in the file and comment the lines
adding a “#” at the start of each line.
There will be 3 occurrences of chown, and all of these should be commented as below:
# $SUDO chown root:root ${TMP_BIN}# $SUDO chown root:root ${KILLALL_K3S_SH}# $SUDO chown root:root ${UNINSTALL_K3S_SH} - Save and exit the install_k3s.sh file.
-
To install the cloud connector, trigger the install.sh script
below.
./install.sh
The cloud connector is installed with the specified user with the minimal sudo privileges.
