1、下载&编译 :
git clone https://github.com/cloudera/hue.git
cd hue
make apps
2、编译遇到的问题&解决
/usr/bin/pip2.7 install setuptools-scm
yum -y install mysql-server mysql mysql-devel
sudo wget https://raw.githubusercontent.com/paulfitz/mysql-connector-c/master/include/my_config.h -P /usr/include/mysql/
yum install sqlite-devel
/usr/bin/pip2.7 install sasl
yum install openldap-devel
yum install libxslt-devel
yum install nodejs
编译完成
3.部署k8s & helm
1.加载br_netfilter模块
sudo modprobe br_netfilter
2.确保iptable可以正确发现bridge traffic
cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
br_netfilter
EOF
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
sysctl --system
3.适配yum仓库
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
4.安装&启动docker
sudo yum install -y docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
5.配置daemon.json
{
"registry-mirrors": ["https://j2e6xpgk.mirror.aliyuncs.com"],
"exec-opts": ["native.cgroupdriver=systemd"],
"default-runtime": "runc"
}
完成 后重启docker
sudo systemctl start docker
6.配置kubernetes.repo
cat <<EOF | sudo tee /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=0
gpgkey=http://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg http://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF
# Set SELinux in permissive mode (effectively disabling it)
sudo setenforce 0
sudo sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config
yum install -y kubelet-1. 23.1-0 kubeadm-1.23.1-0 kubectl-1.23.1-0 --disableexcludes=kubernetes
sudo systemctl enable --now kubelet
5.初始化master
kubeadm init --image-repository=registry.aliyuncs.com/google_containers --control-plane-endpoint="192.168.201.178:6443" --upload-certs --ignore-preflight-errors=Swap --kubernetes-version v1.23.1
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
在/etc/kubernetes/manifests/kube-controller-manager.yaml中增加
--allocate-node-cidrs=true
--cluster-cidr=10.244.0.0/16
6.安装helm
tar -zxvf helm-v3.7.2-linux-amd64.tar.gz
cd linux-amd64/
mv helm /usr/bin/
7.使用helm安装HUE
tar -xf helm-v3.7.2-linux-amd64.tar.gz
cd linux-amd64/
mv helm /usr/bin/
helm repo add gethue https://helm.gethue.com
helm install hue gethue/hue
[root@erdma-pl00 linux-amd64]# helm install hue gethue/hue
NAME: hue
LAST DEPLOYED: Fri Aug 19 17:31:22 2022
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Congratulations, you've launched the Hue SQL Editor for Data Warehouses!
To check the status of your installation run:
helm list --filter hue
Get the recommended URL below and start executing queries:
export WEB_HOST=$(kubectl get node -o jsonpath="{.items[0].metadata.name}")
export WEB_PORT=$(kubectl get service hue-balancer -o jsonpath="{.spec.ports[*].nodePort}" --namespace default)
echo http://$WEB_HOST:$WEB_PORT
Happy Querying!
8.开启tracing
修改配置文件
vi $HUE_HOME/huevalues.yaml ,tracing 改为true
tracing:
enabled: true
开启jaeger