Skip to content
This repository was archived by the owner on Aug 12, 2022. It is now read-only.

Commit 3699443

Browse files
Nightly test
1 parent 0ba2915 commit 3699443

5 files changed

Lines changed: 59 additions & 31 deletions

File tree

.travis.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ language: node_js
33
node_js:
44
- "8.9"
55

6-
services:
7-
- postgresql
8-
96
jobs:
107
include:
118
- stage: test-app-waf
9+
services:
10+
- postgresql
1211
install:
1312
- npm --prefix app/waf install
1413
before_script:
@@ -25,21 +24,46 @@ jobs:
2524
script:
2625
- scripts/publish_api_ref.sh
2726
- stage: fvt
28-
if: TRAVIS_EVENT_TYPE = cron
29-
before_script:
27+
services:
28+
- postgresql
29+
sudo: required
30+
install:
31+
- npm install -g newman newman-reporter-html
3032
- pushd test/vpn
3133
- ./vpn_install.sh
34+
- popd
35+
before_script:
36+
# Build ADCaaS image
37+
- pushd app/waf
38+
- docker build . -t f5devcentral/f5-openstack-services:adcaas-latest
39+
- popd
40+
# Import config values
41+
- for VAR in OS_AUTH_URL OS_PASSWORD BIGIQ_HOST BIGIQ_PORT BIGIQ_PASSWORD ; do
42+
TEST_VAR=TEST_$VAR ;
43+
sed -i "s/^$VAR=.*$/$VAR="$(echo ${!TEST_VAR} | sed 's/\//\\\//g')"/g" deploy/appcluster.rc ;
44+
done
45+
- sed -i "s/ENABLE_EFK=true/ENABLE_EFK=false/g" deploy/appcluster.rc
46+
- sed -i "s/DATABASE_HOST=postgres-server/DATABASE_HOST=localhost/g" deploy/appcluster.rc
47+
- sed -i "s/ASG_HOST=asg-server/ASG_HOST=localhost/g" deploy/appcluster.rc
48+
- cat deploy/appcluster.rc
49+
# Start ADCaaS
50+
- pushd scripts
51+
- ./start_all.sh
52+
- popd
53+
# Connect to lab VPN
54+
- pushd test/vpn
3255
- ./vpn_connect.sh
33-
- popd
56+
- popd
3457
script:
35-
- pushd test/Auto
36-
- export name=`openssl rand -base64 8`
37-
- ./auto_test.sh
38-
after_success:
39-
- ./auto_clean.sh
58+
- pushd test
59+
- ./test_all.sh & > /dev/null
60+
- popd
61+
- docker logs -f ADCAAS
4062
- stage: publish-image-and-docs
4163
language: python
4264
sudo: required
65+
services:
66+
- postgresql
4367
before_install:
4468
- docker pull f5devcentral/containthedocs:latest
4569
install:

app/waf/src/datasources/bigip.datasource.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{
1212
"template": {
1313
"method": "GET",
14-
"timout": 2000,
14+
"timeout": 10000,
1515
"url": "{url}",
1616
"headers": {
1717
"Authorization": "{cred64en}"
@@ -26,7 +26,7 @@
2626
]
2727
}
2828
},
29-
{
29+
{
3030
"template": {
3131
"method": "POST",
3232
"url": "{url}",

app/waf/src/services/bigip.service.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,18 @@ export class BigIpManager {
9292
await this.mustBeReachable();
9393

9494
let url = `${this.baseUrl}/mgmt/tm/sys`;
95-
let response = await this.bigipService.getInfo(url, this.cred64Encoded);
95+
this.logger.info('zhaoqin in getSys url is ' + url);
96+
this.logger.info(
97+
'zhaoqin in getSys cred64Encoded is ' + this.cred64Encoded,
98+
);
99+
let response = {};
100+
try {
101+
this.logger.info('zhaoqin in getSys before bigipService.getInfo');
102+
response = await this.bigipService.getInfo(url, this.cred64Encoded);
103+
this.logger.info('zhaoqin in getSys after bigipService.getInfo');
104+
} catch (err) {
105+
this.logger.info('zhaoqin in getSys err is ' + err.message);
106+
}
96107
return JSON.parse(JSON.stringify(response))['body'][0];
97108
}
98109

@@ -375,7 +386,12 @@ export class BigIpManager {
375386
private async mustBeReachable(): Promise<void> {
376387
return this.reachable()
377388
.then(b => {
378-
if (!b) throw new Error();
389+
if (!b) {
390+
this.logger.info('zhaoqin in mustBeReachable b is false');
391+
throw new Error();
392+
} else {
393+
this.logger.info('zhaoqin in mustBeReachable b is true');
394+
}
379395
})
380396
.catch(() => {
381397
let msg =

deploy/appcluster.rc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,5 @@ ASG_PORT=443
5656

5757
VE_RANDOM_PASS=false
5858
ENABLE_EFK=true
59+
60+
UV_THREADPOOL_SIZE=128

deploy/docker-compose.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,21 @@ services:
1111
- adcaas:adcaas-server
1212

1313
adcaas:
14+
network_mode: host
1415
image: f5devcentral/f5-openstack-services:adcaas-latest
1516
container_name: ADCAAS
1617
env_file:
1718
- ./appcluster.rc
1819
ports:
1920
- ${ADCAAS_APP_PORT:-3000}:3000
2021
depends_on:
21-
- postgres
2222
- ASG
23-
links:
24-
- postgres:postgres-server
25-
- ASG:asg-server
2623
volumes:
2724
- ${DEPENDENCIES_DIRECTORY}:/var/dependencies
2825
- ${DATA_DIRECTORY}:/var/data
2926

30-
postgres:
31-
image: postgres:11.1
32-
container_name: POSTGRES
33-
environment:
34-
- POSTGRES_USER=${DATABASE_USER:-postgres}
35-
- POSTGRES_PASSWORD=${DATABASE_PASSWORD:-postgres}
36-
- POSTGRES_DB=${DATABASE_DB:-postgres}
37-
ports:
38-
- ${DATABASE_PORT:-5432}:5432
39-
volumes:
40-
- ${DATABASE_DATA_DIRECTORY}:/var/lib/postgresql/data
41-
4227
ASG:
28+
network_mode: host
4329
image: f5devcentral/f5-openstack-services:asg-1.0.12
4430
container_name: ASG
4531
environment:

0 commit comments

Comments
 (0)