> For the complete documentation index, see [llms.txt](https://ldsec.gitbook.io/medco-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ldsec.gitbook.io/medco-documentation/v2.0.0/developers/live-demo.md).

# Live Demo

The live demo of MedCo is available at <https://medco-demo.epfl.ch>. The profile `test-local-3nodes` with a custom configuration is used.

## Update demo version

Connect with SSH to the machine, with the `lca1` account. Ask Mickaël or Joao to set up your SSH public key there.&#x20;

### Get the latest version

Ensure the configuration specific to the MedCo stays (see next section).

```bash
cd /home/lca1/medco-repo/medco/deployments/test-local-3nodes
make down
git pull
```

### Configuration update

Update the configuration according to the following examples. For the passwords, use the same as defined in the previous deployments.

{% code title="/home/lca1/medco-repo/medco/deployments/test-local-3nodes/.env" %}

```bash
MEDCO_NODE_HOST=medco-demo.epfl.ch
MEDCO_NODE_HTTP_SCHEME=https
POSTGRES_PASSWORD=xxx
PGADMIN_PASSWORD=xxx
KEYCLOAK_PASSWORD=xxx
I2B2_WILDFLY_PASSWORD=xxx
I2B2_SERVICE_PASSWORD=xxx
I2B2_USER_PASSWORD=xxx
```

{% endcode %}

{% code title="/home/lca1/medco-repo/medco/deployments/test-local-3nodes/docker-compose.yml" %}

```yaml
  glowing-bear-medco:
    environment:
      - "GB_FOOTER_TEXT=Disclaimer: This demo complies with the EPFL regulations and guidelines regarding the storage and use of personal data: https://www.epfl.ch/about/overview/overview/regulations-and-guidelines/"
```

{% endcode %}

### Start deployment

```bash
cd /home/lca1/medco-repo/medco/deployments/test-local-3nodes
make up
```

### Load synthetic demo data

Get them from the Google Drive folder and execute the script

```bash
cd /home/lca1/medco-repo/medco
./test/data/download.sh spo_synthetic

./scripts/load-spo-i2b2-data.sh localhost i2b2medcosrv0 medcoconnectorsrv0
./scripts/load-spo-i2b2-data.sh localhost i2b2medcosrv1 medcoconnectorsrv1
./scripts/load-spo-i2b2-data.sh localhost i2b2medcosrv2 medcoconnectorsrv2
```

## Update certificate

The certificate is provided by Let's Encrypt and valid for a period of 3 months, it thus needs regular renewing. First ensure that the configuration located in `/etc/letsencrypt/renewal/medco-demo.epfl.ch.conf` is correct.

Then as the user `root`, renew the certificate:

```bash
certbot renew
cp /etc/letsencrypt/live/medco-demo.epfl.ch/fullchain.pem \
    /home/lca1/medco-repo/medco/deployments/test-local-3nodes/configuration/certificate.crt
cp /etc/letsencrypt/live/medco-demo.epfl.ch/privkey.pem \
    /home/lca1/medco-repo/medco/deployments/test-local-3nodes/configuration/certificate.key
```

Finally as the user `lca1` restart the stack:

```bash
cd /home/lca1/medco-repo/medco/deployments/test-local-3nodes
make stop
make up
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ldsec.gitbook.io/medco-documentation/v2.0.0/developers/live-demo.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
