From 3cd9613cdf611ec9de55a706dee4b8be5ed4ab60 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Thu, 18 May 2023 21:53:02 +0800 Subject: [PATCH] .github/workflows/setup-k3s-with-existed-vhost.yml: add Setup-ChatWithGPT --- .../setup-k3s-with-existed-vhost.yml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/setup-k3s-with-existed-vhost.yml b/.github/workflows/setup-k3s-with-existed-vhost.yml index dfc6403f..fccb44c5 100644 --- a/.github/workflows/setup-k3s-with-existed-vhost.yml +++ b/.github/workflows/setup-k3s-with-existed-vhost.yml @@ -182,6 +182,46 @@ jobs: harbor_odic_client_token=$HARBOR_OIDC_CLIENT_TOKEN EOF ansible-playbook -i hosts/inventory jobs/init_harbor -D -C + Setup-ChatWithGPT: + runs-on: ubuntu-latest + needs: + - setup-k3s + - setup-keycloak + + steps: + - uses: actions/checkout@v3 + + - name: Setup GhatWithGPT in K3S + shell: bash + run: | + export ANSIBLE_HOST_KEY_CHECKING=False + sudo apt install jq ansible -y + + mkdir -pv ~/.ssh/ + cat > ~/.ssh/id_rsa << EOF + ${SSH_PRIVATE_KEY} + EOF + sudo chmod 0400 ~/.ssh/id_rsa + md5sum ~/.ssh/id_rsa + + mkdir -pv hosts/ + cat > hosts/inventory << EOF + [master] + k3s ansible_host=20.89.154.216 + + [all:vars] + ansible_port=8022 + ansible_ssh_user=ubuntu + ansible_ssh_private_key_file=~/.ssh/id_rsa + ansible_host_key_checking=False + ali_ak=$ALI_AK + ali_sk=$ALI_SK + dns_ak=$DNS_AK + dns_sk=$DNS_SK + ingress_ip=20.89.154.216 + EOF + ansible-playbook -i hosts/inventory jobs/init_chatwithgpt -D + Setup-Agent: Setup-Grafana: runs-on: ubuntu-latest needs: