Quickstart Guide

The Simulate system can be started using Docker Compose.

Development mode

  1. Ensure that you have installed Docker and start the Docker daemon (if it is not already running).

  2. Clone the main Simulate GitHub repository: [1]

    git clone --recursive https://github.com/alan-turing-institute/simulate.git
    cd simulate
    
  3. Create the auth configuration file:

    cp auth/config.example.json auth/config.dev.json
    
  4. Create the middleware configuration file:

    cp middleware/config.example.json middleware/config.dev.json
    
  5. Create the manager SSH keys and configuration file:

    cp manager/config.example.json manager/config.dev.json
    cd manager/keys && ./create_keys.sh && cd -
    
  6. Add the storage configuration using environment variables: [2]

    export STORAGE_ACCOUNT_NAME=simulate
    export STORAGE_ACCOUNT_KEY=<key>
    
  7. Bring the set of microservices up: [3]

    docker-compose up --build
    
  8. Create a test user [4] on auth:

    curl -X POST localhost:5000/test
    
  9. Create test case data on the middleware:

    curl -X POST localhost:5050/test
    

The frontend will now be available at http://localhost:8080. You can now navigate to this URL in a web browser.

Production mode

  1. Follow the above, but use production configurations:

    cp nginx/project.example-ssl.conf nginx/project.conf
    cp frontend/src/environments/environment.prod.example-ssl.ts frontend/src/environments/environment.prod.ts
    cp auth/config.example.json auth/config.prod.json
    cp middleware/config.example.json middleware/config.prod.json
    cp manager/config.example.json manager/config.prod.json
    cd manager/keys && ./create_keys.sh && cd -
    export STORAGE_ACCOUNT_NAME=simulate
    export STORAGE_ACCOUNT_KEY=<key>
    docker-compose --file docker-compose.prod.yml up --build
    
  2. Generate SSL certificates via letsencrypt:

    sudo certbot certonly --standalone -d simulate.uksouth.cloudapp.azure.com
    

The frontend will now be available http://localhost:80.

[1]Simulate uses Git submodules, hence the --recursive option must be included in the clone command.
[2]Currently, we support MS Azure Storage Accounts. Hence, <key> is a secret key string obtainable through Storage Account “Access Keys” at portal.azure.com.
[3]Docker images can take several minutes to build if this is the first time you are building them.
[4]The test user has the credentials username: turing, password: turing