-
Notifications
You must be signed in to change notification settings - Fork 10
203 lines (176 loc) · 7.09 KB
/
pipeline.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# MIT License
#
# Copyright (c) 2021 Theodor Amariucai and EASE Lab
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
name: STeLLAR Pipeline
concurrency: staging_environment
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build_client:
name: Build framework
runs-on: ubuntu-22.04
env:
working-directory: ./src
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Check syntax
uses: golangci/[email protected]
with:
working-directory: ${{env.working-directory}}
args: --timeout 5m --skip-dirs raw-code
skip-pkg-cache: true
skip-build-cache: true
- name: Build client binary
working-directory: ${{env.working-directory}}
run: |
docker build -t stellar .
docker create --name temp stellar /bin/bash
- name: Package client artifact
run: |
mkdir -p "setup/deployment/raw-code"
docker cp temp:/app/stellar ./main
docker cp temp:/app/setup/deployment/raw-code/functions setup/deployment/raw-code/functions
tar -czvf build.tar ./main ./setup/deployment/raw-code/functions
- name: Upload client artifact
uses: actions/upload-artifact@v2
with:
name: STeLLAR-build
path: build.tar
retention-days: 1
test_vhive:
name: vHive integration tests
needs: [ build_client ]
runs-on: ubuntu-22.04
env:
working-directory: ./src
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Download client artifact
uses: actions/download-artifact@v2
with:
name: STeLLAR-build
- name: Untar client build
run: tar --strip-components=1 -xvf build.tar
- name: Setup vHive Data Transfer (producer-consumer) Containers
run: |
cat > vHive.json <<- EOM
[
{
"GatewayID": "10.96.0.2:50051",
"FunctionMemoryMB": 128,
"ImageSizeMB": 60,
"PackageType": "Image"
},
{
"GatewayID": "10.96.0.3:50051",
"FunctionMemoryMB": 128,
"ImageSizeMB": 60,
"PackageType": "Image"
}
]
EOM
docker network create --subnet=10.96.0.0/16 benchnet
docker run -d --name=producer --net=benchnet --ip 10.96.0.2 vhiveease/producer-consumer:latest
docker run -d --name=consumer --net=benchnet --ip 10.96.0.3 vhiveease/producer-consumer:latest
docker run -d -p 50052:9000 --net=benchnet --ip 10.96.0.46 --name minio -e "MINIO_ROOT_USER=minio" -e "MINIO_ROOT_PASSWORD=minio123" minio/minio server /data
wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo mv mc /usr/local/bin
mc alias set myminio http://10.96.0.46:9000 minio minio123
mc mb myminio/mybucket
- name: vHive Producer-consumer (Inline Data Transfer) Integration Tests
run: ./main --g . --o latency-samples --c experiments/tests/vhive/data-transfer.json
- name: vHive Producer-consumer (Storage Data Transfer) Integration Tests
run: ./main --g . --o latency-samples --c experiments/tests/vhive/data-transfer-minio.json
- name: vHive Chameleon Integration Tests
run: |
cat > vHive.json <<- EOM
[
{
"GatewayID": "10.96.0.4:50051",
"FunctionMemoryMB": 128,
"ImageSizeMB": 60,
"PackageType": "Image"
}
]
EOM
docker run -d --name=chameleon-func --net=benchnet --ip 10.96.0.4 vhiveease/chameleon:latest
./main --g . --o latency-samples --c experiments/tests/vhive/burstiness-image-package.json
- name: vHive Hello Python Integration Tests
run: |
cat > vHive.json <<- EOM
[
{
"GatewayID": "10.96.0.5:50051",
"FunctionMemoryMB": 128,
"ImageSizeMB": 60,
"PackageType": "Image"
}
]
EOM
docker run -d --name=hellopy-func --net=benchnet --ip 10.96.0.5 vhiveease/hellopy:latest
./main --g . --o latency-samples --c experiments/tests/vhive/burstiness-image-package.json
- name: vHive RNN Serving Integration Tests
run: |
cat > vHive.json <<- EOM
[
{
"GatewayID": "10.96.0.6:50051",
"FunctionMemoryMB": 128,
"ImageSizeMB": 60,
"PackageType": "Image"
}
]
EOM
docker run -d --name=rnnserving-func --net=benchnet --ip 10.96.0.6 vhiveease/rnnserving:latest
./main --g . --o latency-samples --c experiments/tests/vhive/burstiness-image-package.json
deploy:
name: Deploy framework
needs: [ test_aws, test_vhive ]
runs-on: ubuntu-22.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Download client build
uses: actions/download-artifact@v2
with:
name: STeLLAR-build
- name: Untar client build
run: tar --strip-components=1 -xvf build.tar
- name: Prepare benchmarking functions
run: |
mkdir -p setup/deployment/raw-code/functions
cp -R ./src/setup/deployment/raw-code/functions setup/deployment/raw-code/functions
- name: Push to deployment branch
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "vHive Bench Bot"
git remote set-url origin https://ease-lab:${{secrets.ACCESS_TOKEN}}@github.com/ease-lab/STeLLAR.git
git checkout --orphan deployment
git rm -rf --ignore-unmatch --cached .
git add --ignore-errors --force scripts endpoints experiments main setup/deployment/raw-code/functions
git commit -m "Automated push from successful STeLLAR pipeline"
git push origin HEAD:deployment --force