Self-Hosted VPC Setup
Deploy NomadicML DriveMonitor within your own AWS Virtual Private Cloud (VPC).
Self-Hosted DriveMonitor VPC Setup
This guide provides instructions for deploying and configuring the NomadicML DriveMonitor application within your own AWS Virtual Private Cloud (VPC). This allows you to maintain full control over your data and infrastructure.
Prerequisites: Information We Need From You
To enable us to prepare and share our pre-configured DriveMonitor VPC AWS EC2 image (AMI) with you, please provide the following information to your NomadicML contact:
-
Your AWS Account ID:
- This is necessary for us to share the pre-configured DriveMonitor AMI directly with your AWS account.
- An AWS account ID is a 12-digit number (e.g.,
012345678901
) that uniquely identifies an AWS account. You can find this in the AWS Management Console, typically in the top-right corner under your account name/menu. The image above is illustrative. Your AWS console might look slightly different.
-
Desired DriveMonitor VPC Domain:
- This is the URL (e.g.,
customer.drivemonitor.nomadicml.com
,yourcompany.drivemonitor-internal.com
) through which you will access your self-hosted DriveMonitor instance. - This domain does not need to be publicly accessible. Access can be restricted to your internal VPC network.
- You will be responsible for configuring DNS for this domain to point to the Elastic IP address you will set up in the steps below.
- Examples:
customer.drivemonitor.nomadicml.com
f78406j.drivemonitor.nomadicml.com
abcde.drivemonitor.nomadicml.com
- This is the URL (e.g.,
-
Google Cloud Platform - Firebase Service Account Credentials:
- DriveMonitor integrates with Google Firebase for its data storage backend. You will need to provide Firebase service account credentials to establish a connection between the DriveMonitor VPC instance and your Firebase project.
- To obtain this:
- Go to your Firebase console and select your project.
- Navigate to Project settings (click the gear icon next to “Project Overview”).
- Go to the Service accounts tab.
- Click on Generate new private key. A JSON file (e.g.,
yourproject-firebase-adminsdk-xxxxx-xxxxxxxxx.json
) will be downloaded.
- You will configure the contents of this JSON file on your EC2 instance in a later step.
If you prefer to use a different database service, such as AWS RDS, instead of Firebase, please discuss this with your NomadicML contact.
Once we receive this information, we will share the DriveMonitor AMI ID with you.
Deployment Steps: What You Will Do
After NomadicML has shared the AMI ID with you, follow these steps to deploy DriveMonitor in your AWS VPC:
1. AWS Portal Configuration
a. Allocate an Elastic IP Address
An Elastic IP address ensures that your DriveMonitor Compute VM retains the same public IP address even if it restarts, guaranteeing a stable endpoint for your domain configuration.
- Navigate to the EC2 service in the AWS Management Console.
- In the left-hand navigation pane, under “Network & Security,” click on Elastic IPs.
- Click Allocate Elastic IP address.
- The default options are generally fine. Click Allocate.
- Note down the allocated Elastic IP address. You will associate it with your EC2 instance later.
b. Instantiate the DriveMonitor Compute Instance using the AMI
You will launch an EC2 instance from the pre-configured DriveMonitor AMI provided by NomadicML.
- In the EC2 dashboard, click on Instances under the “Instances” section in the left-hand navigation pane.
- Click the Launch instances button.
- Name and tags (Optional): Give your instance a descriptive name, e.g.,
DriveMonitor-VPC-Server
. - Application and OS Images (Amazon Machine Image):
- In the search bar under “Amazon Machine Image (AMI)”, select My AMIs from the dropdown on the left.
- Then, select Shared with me.
- You should find the DriveMonitor AMI shared by NomadicML (using the AMI ID we provided). Select it.
- Instance type:
- DriveMonitor is a compute-intensive application, especially the GPU inference component.
- We recommend an EC2 instance with a powerful GPU and sufficient VRAM. An instance with at least 80GB of GPU VRAM (e.g., an NVIDIA A100 or H100 equivalent) is advised for optimal performance.
- This typically corresponds to instance types like AWS
g6e.12xlarge
,p4d.24xlarge
, or similar high-end GPU instances. Please consult current AWS instance offerings for the best fit.
- Key pair (login):
- For authentication and SSH access, you must use a key pair.
- You can choose an existing key pair or create a new one. The image provided from the PDF shows “Select an existing key pair or create a key pair”.
- If you create a new one, a
.pem
file will be downloaded. Store this file securely. - After downloading, ensure you set appropriate permissions for the
.pem
file:
- Network settings:
- Click Edit next to “Network settings”.
- VPC: Select the VPC where you want to deploy DriveMonitor.
- Subnet: Choose an appropriate subnet.
- Firewall (security groups):
- Create a new security group or select an existing one.
- Ensure the following inbound traffic rules are enabled:
- SSH (TCP, Port 22): From your IP address or trusted network range for administrative access.
- HTTP (TCP, Port 80): From your desired access range (e.g., your company’s VPC CIDR, specific IPs, or
0.0.0.0/0
if publicly accessible – secure appropriately). - HTTPS (TCP, Port 443): Same as HTTP, for secure access.
- Configure storage:
- We recommend at least 500GB of general-purpose SSD (gp3 or io2) storage for the root volume.
- For extensive video storage and processing, 1TB or more is ideal. Adjust based on your expected workload.
- Advanced details: Review other settings as needed; defaults are often sufficient.
- Summary & Launch:
- Review your instance configuration on the right-hand “Summary” panel.
- Click Launch instance.
c. Assign Elastic IP to the EC2 Instance
- Navigate back to Elastic IPs in the EC2 console.
- Select the Elastic IP address you allocated in Step 1a.
- Click the Actions dropdown and select Associate Elastic IP address.
- In the “Resource type” dropdown, select Instance.
- In the “Instance” field, search for and select the DriveMonitor EC2 instance you just launched.
- Click Associate.
2. Connect to Machine and Start DriveMonitor
a. SSH into the DriveMonitor VM
- Obtain the Public IPv4 DNS or the Elastic IP address of your newly launched EC2 instance from the EC2 console.
- Open your terminal and use the
.pem
key file to SSH into the instance. The default username for Ubuntu-based AMIs is typicallyubuntu
. If NomadicML provided a different default username for the AMI, please use that.
b. Navigate into the DriveMonitor folder
Once connected, the DriveMonitor application code should be pre-loaded on the AMI.
c. Create and Configure the .env
file
A template file (e.g., .env.template
) should be present. Copy it to create your environment configuration file.
Now, edit the .env
file using a terminal text editor like nano
or vim
:
You will need to fill in the following details:
DRIVEMONITOR_VPC_DOMAIN
: The domain you decided on in the “Prerequisites” section (e.g.,customer.drivemonitor.nomadicml.com
).FIREBASE_SERVICE_ACCOUNT_KEY_JSON_CONTENT
: Paste the entire content of the JSON file you downloaded from Firebase here (the one from “Generate new private key”). It should be a single line of JSON string. Alternatively, if the AMI is set up to read from a file path, you might securely transfer your Firebase JSON key file to the server (e.g., usingscp
) and reference its path here (e.g.,GOOGLE_APPLICATION_CREDENTIALS=/path/to/your-firebase-key.json
). Follow instructions provided with the AMI.- Any other specific environment variables indicated in the
.env.template
or by NomadicML.
Save the file and exit the editor (for nano
, press Ctrl+X
, then Y
, then Enter
).
d. Start DriveMonitor
The AMI should be configured with a simple command to start all necessary DriveMonitor services (Frontend, Backend, GPU Inference). As per the PDF, this is make start
.
Or, if make
is not used, there might be a specific script:
Please use the startup command provided by NomadicML for your specific AMI.
e. Wait for Services to Initialize
Wait a few minutes for all DriveMonitor services to start up for the first time. You can monitor logs if specified by NomadicML (e.g., tail -f /var/log/drivemonitor.log
or docker-compose logs -f
).
3. Access DriveMonitor
Once the services have started and you have configured your DNS for the DRIVEMONITOR_VPC_DOMAIN
to point to the Elastic IP of your EC2 instance, you should be able to access your self-hosted DriveMonitor instance by navigating to your configured domain in a web browser (e.g., http://customer.drivemonitor.nomadicml.com
or https://...
if SSL is configured).
That’s it! You are now ready to use DriveMonitor.
Important Considerations
- Network Security: Ensure your EC2 instance’s security group is configured to allow traffic only from trusted sources, especially for SSH (port 22). HTTP/HTTPS access should be restricted to your organization’s network if the application is not intended for public access.
.pem
Key Security: Keep your.pem
key file secure. Anyone with this key can access your EC2 instance.- Updates: Discuss the update process for the DriveMonitor application components (Frontend, Backend, GPU Inference models) with your NomadicML contact.
- Monitoring & Logging: Set up appropriate monitoring and logging for your EC2 instance and the DriveMonitor application using AWS CloudWatch or other preferred tools.
Support
If you encounter any issues during the setup process, please contact NomadicML support at support@nomadicml.com or your designated NomadicML contact.