|
|
|
# Deployment
|
|
|
|
|
|
|
|
* need `dotenv` package compatible with the `node` version installed on the server
|
|
|
|
* `yarn add -D dotenv@10.0.0`
|
|
|
|
* create a `.env.local` file in the project root, containing
|
|
|
|
* `BASE_URL=/covid-sim/`
|
|
|
|
* build
|
|
|
|
* `yarn build`
|
|
|
|
* install
|
|
|
|
* `rm -fr /var/www/where2test.de/covid-sim/* && cp -r dist/* /var/www/where2test.de/covid-sim/`
|
|
|
|
|
|
|
|
# Data import
|
|
|
|
|
|
|
|
## 1. On `hemera`
|
|
|
|
|
|
|
|
* generate the data on hemera
|
|
|
|
* create the summaries: `./collect.sh Dresden`
|
|
|
|
* upload the data folder and `summaries.zip` to vlsweb6
|
|
|
|
* `rsync -rav summaries.zip output-dresden vlsweb6b:/var/www/where2test.de/covid-sim-data/battery/v16/calibration/dresden/`
|
|
|
|
Deployment scripts are located in
|
|
|
|
```
|
|
|
|
/bigdata/casus/where2test/episim-web-export/deploy-scripts/
|
|
|
|
```
|
|
|
|
|
|
|
|
### Install upload and deployment certificates for your user
|
|
|
|
|
|
|
|
This only needs to be done once for each user who wants to run the uploads
|
|
|
|
|
|
|
|
```
|
|
|
|
/bigdata/casus/where2test/episim-web-export/deploy-scripts/install_keys.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
### Generate data on hemera
|
|
|
|
* run the simulation
|
|
|
|
* the name of the output directory must be unique
|
|
|
|
* if it is not, the data will be overwritten on the server
|
|
|
|
* let's use e.g. `output-example` directory
|
|
|
|
* generate the metadata
|
|
|
|
* create the summaries: `./collect.sh Dresden`
|
|
|
|
* fix start and end dates in `metadata.yaml`
|
|
|
|
|
|
|
|
### Upload data to the web server and deploy
|
|
|
|
|
|
|
|
```
|
|
|
|
/bigdata/casus/where2test/episim-web-export/deploy-scripts/upload_to_webserver.sh output-example
|
|
|
|
|
|
|
|
/bigdata/casus/where2test/episim-web-export/deploy-scripts/dpeloy_on_webserver.sh output-example
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## 3. in the browser
|
|
|
|
* reload with clean cache
|
|
|
|
* hope it works
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 2. On the webserver
|
|
|
|
|
| ... | ... | @@ -27,11 +48,7 @@ cd /var/www/where2test.de/covid-sim-data/battery/v16/calibration/dresden/output- |
|
|
|
unzip ../summaries.zip
|
|
|
|
```
|
|
|
|
|
|
|
|
* fix start and end dates in `metadata.yaml`
|
|
|
|
|
|
|
|
## 3. in the browser
|
|
|
|
* reload with clean cache
|
|
|
|
* hope it works
|
|
|
|
|
|
|
|
|
|
|
|
## 4. Copied from mattermost chat (need to cleaned and organized)
|
| ... | ... | @@ -41,4 +58,16 @@ unzip ../summaries.zip |
|
|
|
* trigger a deployment script on the webserver
|
|
|
|
* have the correct start & end dates in the metadata file
|
|
|
|
* have the unzipped summaries folder inside the output-dresden-whatever folder
|
|
|
|
* You should unzip the summaries.zip into output-dresden_0/summaries, then use the upload script (ie don't use rsync directly): /bigdata/casus/where2test/episim-web-export/deploy-scripts/upload_to_webserver.sh output-dresden_0 (Either run from parent to output-dresden_0, or give absolute path) |
|
|
\ No newline at end of file |
|
|
|
* You should unzip the summaries.zip into output-dresden_0/summaries, then use the upload script (ie don't use rsync directly): /bigdata/casus/where2test/episim-web-export/deploy-scripts/upload_to_webserver.sh output-dresden_0 (Either run from parent to output-dresden_0, or give absolute path)
|
|
|
|
|
|
|
|
# Deployment
|
|
|
|
|
|
|
|
* need `dotenv` package compatible with the `node` version installed on the server
|
|
|
|
* `yarn add -D dotenv@10.0.0`
|
|
|
|
* create a `.env.local` file in the project root, containing
|
|
|
|
* `BASE_URL=/covid-sim/`
|
|
|
|
* build
|
|
|
|
* `yarn build`
|
|
|
|
* install
|
|
|
|
* `rm -fr /var/www/where2test.de/covid-sim/* && cp -r dist/* /var/www/where2test.de/covid-sim/`
|
|
|
|
|