This repository was archived by the owner on Aug 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,12 +3,11 @@ language: node_js
33node_js :
44 - " 8.9"
55
6- services :
7- - postgresql
8-
96jobs :
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,49 @@ 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+ - cat deploy/appcluster.rc
46+ - sed -i "s/ENABLE_EFK=true/ENABLE_EFK=false/g" deploy/appcluster.rc
47+ # Start ADCaaS
48+ - pushd scripts
49+ - ./start_all.sh
50+ - popd
51+ # Connect to lab VPN
52+ - pushd test/vpn
3253 - ./vpn_connect.sh
33- - popd
54+ - popd
3455 script :
35- - pushd test/Auto
36- - export name=`openssl rand -base64 8`
37- - ./auto_test.sh
38- after_success :
39- - ./auto_clean.sh
56+ - pushd tmp
57+ - NODE_TLS_REJECT_UNAUTHORIZED=0 node app.js
58+ - docker build -t simple-app .
59+ - docker run --network host simple-app
60+ - popd
61+ - pushd test
62+ - ./test_all.sh & > /dev/null
63+ - popd
64+ - docker logs -f ADCAAS
4065 - stage : publish-image-and-docs
4166 language : python
4267 sudo : required
68+ services :
69+ - postgresql
4370 before_install :
4471 - docker pull f5devcentral/containthedocs:latest
4572 install :
Original file line number Diff line number Diff line change 1111 {
1212 "template" : {
1313 "method" : " GET" ,
14- "timout " : 2000 ,
14+ "timeout " : 10000 ,
1515 "url" : " {url}" ,
1616 "headers" : {
1717 "Authorization" : " {cred64en}"
2626 ]
2727 }
2828 },
29- {
29+ {
3030 "template" : {
3131 "method" : " POST" ,
3232 "url" : " {url}" ,
Original file line number Diff line number Diff 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 =
Original file line number Diff line number Diff line change @@ -56,3 +56,5 @@ ASG_PORT=443
5656
5757VE_RANDOM_PASS=false
5858ENABLE_EFK=true
59+
60+ UV_THREADPOOL_SIZE=128
Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff line change 1+ FROM node:8.16.1-alpine
2+
3+ WORKDIR /root/app_dir
4+ COPY app.js ./
5+
6+ ENTRYPOINT NODE_TLS_REJECT_UNAUTHORIZED=0 node app.js
Original file line number Diff line number Diff line change 1+ const https = require ( "https" ) ;
2+
3+ var options = {
4+ host : "10.250.15.130" ,
5+ port : 443 ,
6+ path : "/mgmt/tm/sys" ,
7+ method : "GET" ,
8+ headers : { "Authorization" : "Basic YWRtaW46YWRtaW4=" }
9+ } ;
10+
11+ var req = https . request ( options , ( resp ) => {
12+ let data = '' ;
13+
14+ resp . on ( 'data' , ( chunk ) => {
15+ data += chunk ;
16+ } ) ;
17+
18+ resp . on ( 'end' , ( ) => {
19+ console . log ( JSON . parse ( data ) ) ;
20+ } ) ;
21+ } ) . on ( "error" , ( err ) => {
22+ console . log ( "Error: " + err . message ) ;
23+ } ) ;
24+
25+ req . end ( ) ;
You can’t perform that action at this time.
0 commit comments