Deploying Multiwoven on Azure VMs

This guide will walk you through setting up Multiwoven on an Azure VM. We’ll cover launching the VM, installing Docker, running Multiwoven with its dependencies, and finally, accessing the Multiwoven UI.

Prerequisites:

  • An Azure account with an active VM (Ubuntu recommended).
  • Basic knowledge of Docker, Azure, and command-line tools.
  • Docker Compose installed on your local machine.

Note: This guide uses environment variables for sensitive information. Replace the placeholders with your own values before proceeding.

1. Azure VM Setup:

  1. Launch an Azure VM: Choose an Ubuntu VM with suitable specifications for your workload.

    Network Security Group Configuration:

    • Open port 22 (SSH) for inbound traffic from your IP address.
    • Open port 8000 (Multiwoven UI) for inbound traffic from your IP address (optional).

    SSH Key Pair: Create a new key pair or use an existing one to connect to your VM.

  2. Connect to your VM: Use SSH to connect to your Azure VM.

    Example:

    ssh -i /path/to/your-key-pair.pem azureuser@<your_vm_public_ip>
    

    Replace /path/to/your-key-pair.pem with the path to your key pair file and <your_vm_public_ip> with your VM’s public IP address.

  3. Update and upgrade: Run sudo apt update && sudo apt upgrade -y to ensure your system is up-to-date.

2. Docker and Docker Compose Installation:

  1. Install Docker: Follow the official Docker installation instructions for Ubuntu: https://docs.docker.com/engine/install/

  2. Install Docker Compose: Download the latest version from the Docker Compose releases page and place it in a suitable directory (e.g., /usr/local/bin/docker-compose). Make the file executable: sudo chmod +x /usr/local/bin/docker-compose.

  3. Start and enable Docker: Run sudo systemctl start docker and sudo systemctl enable docker to start Docker and configure it to start automatically on boot.

3. Download Multiwoven docker-compose.yml file and Configure Environment:

  1. Download the file:
curl -LO https://multiwoven-deployments.s3.amazonaws.com/docker/docker-compose/docker-compose.yaml
  1. Download the .env file:
curl -LO https://multiwoven-deployments.s3.amazonaws.com/docker/docker-compose/.env.production
  1. Rename the file .env.production to .env and update the environment variables if required.
mv .env.production .env
  1. **Configure .env, This file holds environment variables for various services. Replace the placeholders with your own values, including:
    • DB_PASSWORD and DB_USERNAME for your PostgreSQL database
    • REDIS_PASSWORD for your Redis server
    • (Optional) Additional environment variables specific to your Multiwoven configuration

Example .env file:

DB_PASSWORD=your_db_password
DB_USERNAME=your_db_username
REDIS_PASSWORD=your_redis_password
# Modify your Multiwoven-specific environment variables here

4. Run Multiwoven with Docker Compose:

  1. Start Multiwoven: Navigate to the multiwoven directory and run docker-compose up -d. This will start all Multiwoven services in the background, including the Multiwoven UI.

5. Accessing Multiwoven UI:

Open your web browser and navigate to http://<your_vm_public_ip>:8000 (replace <your_vm_public_ip> with your VM’s public IP address). You should now see the Multiwoven UI.

6. Stopping Multiwoven:

To stop Multiwoven, navigate to the multiwoven directory and run.

docker-compose down

7. Upgrading Multiwoven: When a new version of Multiwoven is released, you can upgrade the Multiwoven using the following command.

docker-compose pull && docker-compose up -d
Make sure to run the above command from the same directory where the docker-compose.yml file is present.

Additional Notes:

Note: the frontend and backend services run on port 8000 and 3001, respectively. Make sure you update the VITE_API_HOST environment variable in the .env file to the desired backend service URL running on port 3000.
  • Depending on your network security group configuration, you might need to open port 8000 (Multiwoven UI) for inbound traffic.
  • For production deployments, consider using a reverse proxy (e.g., Nginx) and a domain name with SSL/TLS certificates for secure access to the Multiwoven UI.