Skip to content

merge

merge #716

Workflow file for this run

name: kubernetes
on:
push:
pull_request:
workflow_dispatch:
inputs:
build_type:
required: true
description: "定制构建选项: 指定构建类型"
default: '--with-build-type=release'
type: choice
options:
- '--with-build-type=release'
- '--with-build-type=dev'
build_options:
required: false
description: "定制构建选项: 请查看 docs/options.md"
default: ' '
type: string
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
linux-x86_64:
if: 0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Prepare Source Code
run: |
echo $PATH
env
docker info
id -u
id -g
who
cat /etc/os-release
hostnamectl
uname -s
uname -m
uname -r
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
cat /proc/cpuinfo | grep "cpu cores" | uniq
cat /proc/cpuinfo| grep "processor"| wc -l
lscpu
export IPV6=$(ip -6 address show | grep inet6 | awk '{print $2}' | cut -d'/' -f1 | sed -n '2p')
export IPV4=$(ip -4 address show | grep inet | grep -v 127.0.0 | awk '{print $2}' | cut -d'/' -f1 | sed -n '1p')
echo $IPV4
echo $IPV6
echo "X_IPV6=${IPV6}" >> $GITHUB_ENV
echo "X_IPV4=${IPV4}" >> $GITHUB_ENV
sudo apt install -y jq curl
curl https://detect-ip.xiaoshuogeng.com/ip/json | jq
echo ${{ env.BRANCH_NAME }}
echo ${{ github.actor }}
echo ${{ github.repository }}
echo ${{ github.repository_owner }}
echo ${{ github.head_ref }}
echo ${{ github.ref_name }}
# git submodule update --init
# 准备数据库容器
# bash sapi/docker/database/start.sh
sudo mkdir -p /usr/local/swoole-cli
uid=$(id -u) && gid=$(id -g) && sudo chown -R ${uid}:${gid} /usr/local/swoole-cli
mkdir -p ${{ github.workspace }}/var/build-github-action-container/
- name: Prepare
run: |
set -x
sudo sed -i "[email protected]@azure.archive.ubuntu.com@g" /etc/apt/sources.list
sudo sed -i "[email protected]@azure.archive.ubuntu.com@g" /etc/apt/sources.list
sudo sh sapi/quickstart/linux/kubernetes/debian-init.sh
sudo sh sapi/quickstart/linux/kubernetes/runtime/install-containerd.sh
sudo sh sapi/quickstart/linux/kubernetes/install-kubernetes.sh
# sudo sh sapi/quickstart/linux/kubernetes/runtime/install-cri-dockerd.sh
# sudo sh sapi/quickstart/linux/kubernetes/install-kubernetes-debian.sh
- name: Kubernetes Init
run: |
set -x
cat /etc/crictl.yaml
sudo systemctl status containerd | cat
ls -lh /var/run/containerd/containerd.sock
# sudo sh sapi/quickstart/linux/kubernetes/kubeadm-init.sh --cri-socket dockerd
sudo sh sapi/quickstart/linux/kubernetes/kubeadm-init.sh --cri-socket containerd
sudo sh sapi/quickstart/linux/kubernetes/install-cni-calio.sh
# sudo sh sapi/quickstart/linux/kubernetes/install-nginx-ingress.sh
# sudo sh sapi/quickstart/linux/kubernetes/kubernetes-dashboard.sh
# sudo sh sapi/quickstart/linux/kubernetes/install-metrics-server.sh
# kubectl create -f sapi/quickstart/linux/kubernetes/kubernetes-dashboard-sample-user.yaml
sleep 30
sudo kubectl get node -o wide
sudo kubectl get pod --all-namespaces
sudo crictl ps
sudo ipvsadm -ln