update #904
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ceph | |
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 "s@security.ubuntu.com@azure.archive.ubuntu.com@g" /etc/apt/sources.list | |
sudo sed -i "s@archive.ubuntu.com@azure.archive.ubuntu.com@g" /etc/apt/sources.list | |
sudo bash sapi/quickstart/linux/ceph/debian-init.sh | |
sudo curl -lo /usr/local/bin/cephadm https://php-cli.jingjingxyk.com/cephadm | |
sudo chmod a+x /usr/local/bin/cephadm | |
# sudo apt install -y cephadm | |
# https://docs.ceph.com/en/latest/dev/cephadm/developing-cephadm/#compiling-cephadm | |
cephadm version --verbose | |
- name: Run | |
run: | | |
set -x | |
sudo cephadm bootstrap \ | |
--mon-ip ${{ env.X_IPV4 }} \ | |
--dashboard-password-noupdate \ | |
--initial-dashboard-user admin \ | |
--initial-dashboard-password ceph \ | |
--allow-fqdn-hostname \ | |
--single-host-defaults | |
#--no-cleanup-on-failure \ | |
sleep 30 |