OSDU轻量化单机部署
首先更新系统
sudo apt update
sudo apt upgrade -y
安装docker
sudo apt install -y docker.io
sudo systemctl start docker
sudo systemctl enable docker
安装minikube
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
chmod +x minikube
sudo mv minikube /usr/local/bin/
启动minikube
minikube start --force --memory=30000mb --cpus=8 --base-image='registry.cn-hangzhou.aliyuncs.com/google_containers/kicbase:v0.0.44'
minikube kubectl -- get pods -A
安装kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
开始安装helm
minikube addons enable helm-tiller
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
使用helm安装istio
helm repo add istio https://istio-release.storage.googleapis.com/charts
helm repo update
kubectl create namespace istio-system
helm install istio-base istio/base -n istio-system --create-namespace --wait
helm install istiod istio/istiod -n istio-system --wait
helm ls -n istio-system
使用apt安装python、python3、java-11、maven
sudo apt update
sudo apt install maven -y
mvn -version
mkdir simple_osdu_baremetal && cd simple_osdu_baremetal
tag=$(git ls-remote --tags https://community.opengroup.org/osdu/platform/deployment-and-operations/infra-gcp-provisioning.git | awk '{print $2}' | cut -d '/' -f 3 | cut -d 'v' -f2 | cut -d . -f1-2 | sort -V | tail -n 1)
echo "tag: "$tag &&
curl -LO https://community.opengroup.org/osdu/platform/deployment-and-operations/infra-gcp-provisioning/-/raw/release/$tag/examples/simple_osdu_baremetal/custom-values.yaml
修改custom-values.yaml 文件后执行
helm install -f custom-values.yaml osdu-baremetal oci://community.opengroup.org:5555/osdu/platform/deployment-and-operations/infra-gcp-provisioning/gc-helm/osdu-gc-baremetal
执行 kubectl get pods,直到所有pod全部运行成功
设置CLIENT_ID和CLIENT_SECRET
CLIENT_ID=osdu-admin
CLIENT_SECRET=$(kubectl get secret keycloak-bootstrap-secret -o jsonpath="{.data.KEYCLOAK_OSDU_ADMIN_SECRET}" | base64 --decode)