|
1 | 1 | # How to run debug pod on ec2prod
|
2 | 2 |
|
3 |
| -go to ec2prod, then: cd go/src/github.com/LF-Engineering/sync-data-sources/ |
4 |
| -SH=1 DBG=1 DRY='' ./docker-images/run_sds.sh prod |
5 |
| -you are now inside sds debug pod |
6 |
| -/fetch.sh to fetch all data |
7 |
| -all fixtures are now in /data - move them elsewhere mv /data /d |
8 |
| -now mkdir/data - you have empty fixtures directory |
9 |
| -copy anything u need to run from /d to /data, like cp /d/xen/unikraft.yaml /data |
10 |
| -eventually edit that fixture: vim /data/unikraft.yaml |
11 |
| -see example scripts that can be run manually ls /*.sh |
12 |
| -especially /debug_run.sh |
13 |
| -example command: DA_GIT_FORCE_FULL=1 SDS_SKIP_ES_DATA=1 SDS_SKIP_ES_LOG=1 SDS_DEBUG=2 SDS_CMDDEBUG=2 SDS_ONLY_P2O=1 SDS_SKIP_AFFS=1 SDS_SKIP_DATA='' SDS_DRY_RUN='' DA_AFFS_API_FAIL_FATAL=1 syncdatasources 2>&1 | tee -a /sds.log |
14 |
| -MAKE SURE YOU ALWAYS PASS: SDS_ONLY_P2O=1 |
15 |
| -otherwise SDS will “think” that all fixtures in the ssytem are those you want to sync now, so it will assume everything else needs to be DROPPED! |
16 |
| -so ALWAYS pass SDS_ONLY_P2O=1 |
17 |
| -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
18 |
| -now some useful options: |
19 |
| -DA_GIT_FORCE_FULL=1 - to force full sync, not incremental, replace GIT with JIRA etc |
20 |
| -Higher debug levels: SDS_DEBUG=2 SDS_CMDDEBUG=2 |
21 |
| -SDS_SKIP_AFFS=1 - skip affs refresh |
22 |
| -SDS_SKIP_DATA=1 - skip data sync (incremental) so if you specify both SDS_SKIP_DATA=1 and SDS_SKIP_AFFS=1 - nothing will happen |
23 |
| -SDS_DRY_RUN=1 - run in dry-run mode |
24 |
| -DA_AFFS_API_FAIL_FATAL=1 - make any affs API failure fatal |
25 |
| -you can see all possible SDS env variable options in here: https://github.com/LF-Engineering/sync-data-sources/blob/master/sources/context.go#L12 |
| 3 | +- go to ec2prod, then: cd go/src/github.com/LF-Engineering/sync-data-sources/ |
| 4 | + |
| 5 | +- SH=1 DBG=1 DRY='' ./docker-images/run_sds.sh prod |
| 6 | + |
| 7 | +- you are now inside sds debug pod |
| 8 | + |
| 9 | +- /fetch.sh to fetch all data |
| 10 | + |
| 11 | +- all fixtures are now in /data - move them elsewhere mv /data /d |
| 12 | + |
| 13 | +- now mkdir/data - you have empty fixtures directory |
| 14 | + |
| 15 | +- copy anything u need to run from /d to /data, like cp /d/xen/unikraft.yaml /data |
| 16 | + |
| 17 | +- eventually edit that fixture: vim /data/unikraft.yaml |
| 18 | + |
| 19 | +- see example scripts that can be run manually ls /*.sh |
| 20 | + |
| 21 | +- especially /debug_run.sh |
| 22 | + |
| 23 | +- example command: DA_GIT_FORCE_FULL=1 SDS_SKIP_ES_DATA=1 SDS_SKIP_ES_LOG=1 SDS_DEBUG=2 SDS_CMDDEBUG=2 SDS_ONLY_P2O=1 SDS_SKIP_AFFS=1 SDS_SKIP_DATA='' SDS_DRY_RUN='' DA_AFFS_API_FAIL_FATAL=1 syncdatasources 2>&1 | tee -a /sds.log |
| 24 | + |
| 25 | +- MAKE SURE YOU ALWAYS PASS: SDS_ONLY_P2O=1 |
| 26 | + |
| 27 | +- otherwise SDS will “think” that all fixtures in the ssytem are those you want to sync now, so it will assume everything else needs to be DROPPED! |
| 28 | + |
| 29 | +- so ALWAYS pass SDS_ONLY_P2O=1 |
| 30 | + |
| 31 | +- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 32 | + |
| 33 | +- now some useful options: |
| 34 | + |
| 35 | +- DA_GIT_FORCE_FULL=1 - to force full sync, not incremental, replace GIT with JIRA etc |
| 36 | + |
| 37 | +- Higher debug levels: SDS_DEBUG=2 SDS_CMDDEBUG=2 |
| 38 | + |
| 39 | +- SDS_SKIP_AFFS=1 - skip affs refresh |
| 40 | + |
| 41 | +- SDS_SKIP_DATA=1 - skip data sync (incremental) so if you specify both SDS_SKIP_DATA=1 and SDS_SKIP_AFFS=1 - nothing will happen |
| 42 | + |
| 43 | +- SDS_DRY_RUN=1 - run in dry-run mode |
| 44 | + |
| 45 | +- DA_AFFS_API_FAIL_FATAL=1 - make any affs API failure fatal |
| 46 | + |
| 47 | +- you can see all possible SDS env variable options in here: https://github.com/LF-Engineering/sync-data-sources/blob/master/sources/context.go#L12 |
| 48 | + |
| 49 | + |
0 commit comments