diff --git a/.github/workflows/.env b/.github/workflows/.env new file mode 100644 index 0000000..6c0ed6c --- /dev/null +++ b/.github/workflows/.env @@ -0,0 +1 @@ +OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123! \ No newline at end of file diff --git a/.github/workflows/reporting-cli-test-workflow.yml b/.github/workflows/reporting-cli-test-workflow.yml index 627b6f0..29c881b 100644 --- a/.github/workflows/reporting-cli-test-workflow.yml +++ b/.github/workflows/reporting-cli-test-workflow.yml @@ -30,7 +30,7 @@ jobs: - name: Download and run Opensearch and Dashboard run: | wget https://opensearch.org/samples/docker-compose.yml - docker-compose up --detach + docker-compose --env-file .github/workflows/.env up --detach - name: Check Docker containers run: docker ps -a diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index 661499e..d11532f 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -44,8 +44,8 @@ sudo sysctl -w fs.file-max=262144 sudo sysctl -w vm.max_map_count=262144 wget https://opensearch.org/samples/docker-compose.yml docker-compose up --detach -curl -XPOST -u 'admin:admin' 'http://localhost:5601/api/sample_data/ecommerce' -H 'osd-xsrf:true' -curl -XPOST -u 'admin:admin' 'http://localhost:5601/api/sample_data/logs' -H 'osd-xsrf:true' -H 'securitytenant: global' -curl -XPOST -u 'admin:admin' 'http://localhost:5601/api/sample_data/flights' -H 'osd-xsrf:true' -H 'securitytenant: admin_tenant' +curl -XPOST -u 'admin:< Admin password >' 'http://localhost:5601/api/sample_data/ecommerce' -H 'osd-xsrf:true' +curl -XPOST -u 'admin:< Admin password >' 'http://localhost:5601/api/sample_data/logs' -H 'osd-xsrf:true' -H 'securitytenant: global' +curl -XPOST -u 'admin:< Admin password >' 'http://localhost:5601/api/sample_data/flights' -H 'osd-xsrf:true' -H 'securitytenant: admin_tenant' ``` Run `yarn test` inside `reporting-cli`. diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 9557ce0..7a83038 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -64,7 +64,7 @@ NOTE: Values from the command line argument has higher priority than environment Sample command for downloading a dashboard report with basic authentication in png format ``` -opensearch-reporting-cli --url https://localhost:5601/app/dashboards#/view/7adfa750-4c81-11e8-b3d7-01146121b73d --format png --auth basic --credentials admin:admin +opensearch-reporting-cli --url https://localhost:5601/app/dashboards#/view/7adfa750-4c81-11e8-b3d7-01146121b73d --format png --auth basic --credentials admin:< Admin password > ``` Report will be downloaded in the current directory. diff --git a/test/cli.js b/test/cli.js index 0c433ea..244e361 100644 --- a/test/cli.js +++ b/test/cli.js @@ -6,7 +6,7 @@ const path = require('path'); const exec = require('child_process').exec; const url = "http://localhost:5601"; -const credentials = "admin:admin" +const credentials = "admin:myStrongPassword123!" function cli(args, cwd) { return new Promise(resolve => {