This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 937
104 lines (80 loc) · 2.66 KB
/
system.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: system tests
on:
pull_request:
branches:
- master
schedule:
- cron: '43 */4 * * *'
jobs:
system:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v1
with:
go-version: 1.16
- name: check out
uses: actions/checkout@v2
- name: build
run: script/test-build
- name: clone orchestrator-ci-env
run: |
# Only clone if not already running locally at latest commit
remote_commit=$(git ls-remote https://github.com/openark/orchestrator-ci-env.git HEAD | cut -f1)
local_commit="unknown"
[ -d "orchestrator-ci-env" ] && local_commit=$(cd orchestrator-ci-env && git log --format="%H" -n 1)
echo "remote commit is: $remote_commit"
echo "local commit is: $local_commit"
if [ "$remote_commit" != "$local_commit" ] ; then
rm -rf ./orchestrator-ci-env
git clone https://github.com/openark/orchestrator-ci-env.git
fi
- name: apt-get update
run: |
sudo apt-get update
- name: deploy orchestrator-ci-env
run: |
cd orchestrator-ci-env
script/deploy-haproxy
script/run-haproxy
script/deploy-consul
script/run-consul
script/deploy-consul-template
script/run-consul-template
script/deploy-replication
script/deploy-heartbeat
script/run-heartbeat
- name: deploy orchestrator as service
run: |
sudo cp etc/systemd/orchestrator.service /etc/systemd/system/
sudo mkdir -p /usr/local/orchestrator
sudo cp bin/orchestrator /usr/local/orchestrator/
sudo cp resources/bin/orchestrator-client /usr/bin
sudo cp tests/system/orchestrator-ci-system.conf.json /etc/orchestrator.conf.json
- name: reload systemctl
run: |
sudo systemctl daemon-reload
- name: run orchestrator service
run: |
sudo systemctl start orchestrator
- name: test services
run: |
sudo systemctl status orchestrator
- name: orchestrator-client status
run: |
orchestrator-client -c api -path status | jq .
- name: graceful sleep
run: |
echo "Sleeping gracefully to let orchestrator detect the topology"
sleep 20
- name: orchestrator-client cluster
run: |
orchestrator-client -c clusters-alias
orchestrator-client -c all-instances
orchestrator-client -c topology-tabulated -alias ci
orchestrator-client -c replication-analysis
- name: get consul KV values
run: |
consul kv get -recurse mysql/master
- name: system tests
run: script/test-system