Skip to content

Commit

Permalink
Dir fixes (#19)
Browse files Browse the repository at this point in the history
Fixes in dir structure
  • Loading branch information
kleineshertz authored Mar 12, 2023
1 parent 615914c commit 8aba1c1
Show file tree
Hide file tree
Showing 29 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions doc/started.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ If you are running Windows, you will be using WSL for development, so make sure

## Prepare data directories

In production environments, Capillaries server components ([Daemon](glossary.md#daemon), [Toolbelt](glossary.md#toolbelt), [Webapi](glossary.md#webapi)) need access to configuration files, source data files and target directories. In dev environments, we want Capillaries components to access those files and directories in the uniform way: for dockerized component and for the scenarios when [Daemon](glossary.md#daemon), [Toolbelt](glossary.md#toolbelt), and [Webapi](glossary.md#webapi) are run by developers. We use `/tmp/capitest_*` directories that can be accessed using the same path - from the host machine and from containers (see [docker-compose.yml](../docker-compose.yml) for volume definitions).
In production environments, Capillaries server components ([Daemon](glossary.md#daemon), [Toolbelt](glossary.md#toolbelt), [Webapi](glossary.md#webapi)) need access to configuration files, source data files and target directories. In dev environments, we want Capillaries components to access those files and directories in the uniform way: for dockerized component and for the scenarios when [Daemon](glossary.md#daemon), [Toolbelt](glossary.md#toolbelt), and [Webapi](glossary.md#webapi) are run by developers. We use `/tmp/capi_*` directories that can be accessed using the same path - from the host machine and from containers (see [docker-compose.yml](../docker-compose.yml) for volume definitions).

Run these commands from the root project directory, they will create those data directories and populate them with sample configurations and sample source data:

Expand Down Expand Up @@ -103,7 +103,7 @@ If you are running Windows, you will be using WSL for development, so make sure

Is there a way to develop and debug Capillaries server components in a dev environment like VSCode without running it from WSL? Yes, but you will have to solve two problems.

1. Data directories `/tmp/capitest_*` will not be available from Windows, so you will have to tweak all configuration files and shell scripts so they reference Windows paths. This is doable, but it's a tedious job.
1. Data directories `/tmp/capi_*` will not be available from Windows, so you will have to tweak all configuration files and shell scripts so they reference Windows paths. This is doable, but it's a tedious job.

2. When [test_tag_and_denormalize](../test/code/tag_and_denormalize/README.md) integration test runs in WSL and uses Webapi executed from Windows dev environment, `curl` command will not be able to connect to Webapi's `http://localhost:6543` because of the known WSL limitation descussed at https://github.com/microsoft/WSL/issues/5211 and at https://superuser.com/questions/1679757/how-to-access-windows-localhost-from-wsl2 . You will need to use host IP address or use `$(localhost).local` instead of `localhost` in the shell script.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"totals_start_policy": "auto",
"uri_suffix": "?raw=1",
"dir_cfg": "https://github.com/capillariesio/capillaries/blob/main/test/data/cfg/tag_and_denormalize_quicktest",
"dir_in": "https://github.com/capillariesio/capillaries/blob/main/test/data/in/tag_and_denormalize",
"dir_in": "https://github.com/capillariesio/capillaries/blob/main/test/data/in/tag_and_denormalize_quicktest",
"dir_out": "/tmp/capi_out/tag_and_denormalize_quicktest"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions test/data/out/lookup_quicktest/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Placeholder for out files
1 change: 1 addition & 0 deletions test/data/out/py_calc_quicktest/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Placeholder for out files
1 change: 1 addition & 0 deletions test/data/out/tag_and_denormalize_quicktest/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Placeholder for out files
8 changes: 5 additions & 3 deletions test/deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ Host <genesis_bastion_ip>
Just for convenience, let's store deploy tool arguments and other configuration settings in shell variables, for example:
```
export capideploy=../../build/capideploy.exe
export DEPLOY_ARGS="-prj capideploy_project_dreamhost.json -prj_params $HOME/capideploy_project_params_dreamhost.json"
export DEPLOY_ROOT_KEY=$HOME/.ssh/sampledeployment001_rsa
export DEPLOY_ARGS="-prj capideploy_project_genesis.json -prj_params $HOME/capideploy_project_params_genesis.json"
export DEPLOY_ROOT_KEY=$HOME/.ssh/sampledeployment002_rsa
export BASTION_IP=<dreamhost_bastion_ip>
```

Expand Down Expand Up @@ -97,7 +97,9 @@ This command will populate /tmp/capi_in, /tmp/capi_cfg, /tmp/capi_out
cd ./test/code/lookup
./1_create_quicktest_data.sh
./create_bigtest_data.sh
cd test/code/tag_and_denormalize
cd ../py_calc
./1_create_quicktest_data.sh
cd ../tag_and_denormalize
./1_create_quicktest_data.sh
```

Expand Down

0 comments on commit 8aba1c1

Please sign in to comment.