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/
复制代码
/usr/bin/pip2.7 install sasl
复制代码
yum install openldap-devel
复制代码
yum install libxslt-devel
复制代码
编译完成
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
复制代码
7.初始化 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
复制代码
8.安装 helm
wget https://ali-perseus-release.oss-cn-huhehaote.aliyuncs.com/AIACC-Build-Dep/helm-v3.7.2-linux-amd64.tar.gz
tar -zxvf helm-v3.7.2-linux-amd64.tar.gz
cd linux-amd64/
mv helm /usr/bin/
4.helm 安装 HUE
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!
复制代码
开启 tracing
修改配置文件
vi $HUE_HOME/huevalues.yaml ,tracing 改为 true
需要重新启动 hue
开启 jaeger
评论