Skip to content

Add backup and migrate option #775

Add backup and migrate option

Add backup and migrate option #775

Workflow file for this run

name: Run a GaiaNet Node v2
on:
schedule:
- cron: "0 0 * * *"
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
run-node-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install apt packages
run: |
sudo apt-get update && sudo apt-get install -y curl git jq lsof supervisor
- name: Run install script
run: |
chmod +x ./install.sh
./install.sh
export PATH=$HOME/gaianet/bin:$PATH
gaianet --help
- name: Initialize
run: |
export PATH=$HOME/gaianet/bin:$PATH
gaianet init
sleep 10
- name: Run
run: |
export PATH=$HOME/gaianet/bin:$PATH
gaianet start
sleep 10
- name: Test localhost API
continue-on-error: true
run: |
curl --fail -X POST http://localhost:8080/v1/chat/completions \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"messages":[{"role":"system", "content": "You are a helpful assistant."}, {"role":"user", "content": "Where is Paris?"}]}'
- name: Test frp API
continue-on-error: true
run: |
ADDRESS=$(jq -r '.address' $HOME/gaianet/config.json)
DOMAIN=$(jq -r '.domain' $HOME/gaianet/config.json)
curl --fail -X POST https://$ADDRESS.$DOMAIN/v1/chat/completions \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"messages":[{"role":"system", "content": "You are a helpful assistant."}, {"role":"user", "content": "Where is Paris?"}]}'
- name: Stop
run: |
export PATH=$HOME/gaianet/bin:$PATH
gaianet stop
echo "LOGFILE: start-llamaedge.log\n\n"
cat ~/gaianet/log/start-llamaedge.log
echo "LOGFILE: init-qdrant.log\n\n"
cat ~/gaianet/log/init-qdrant.log
echo "LOGFILE: start-qdrant.log\n\n"
cat ~/gaianet/log/start-qdrant.log
echo "LOGFILE: start-gaia-frp.log\n\n"
cat ~/gaianet/log/start-gaia-frp.log