Simon Layfield
Simon Layfield

Reputation: 43

Configuring Meteor deployment to Google Compute Engine VM using mupx

Whilst I've tried several solutions to related problems on SO, nothing appears to fix my problem when deploying a Meteor project to a VM on Google Compute Engine.

I setup mupx to handle the deployment and don't have any apparent issues when running

sudo mupx deploy

My mup.json is as follows

{
  // Server authentication info
  "servers": [
    {
      "host": "104.199.141.232",
      "username": "simonlayfield",
      "password": "xxxxxxxx"
      // or pem file (ssh based authentication)
      // "pem": "~/.ssh/id_rsa"
    }
  ],

  // Install MongoDB in the server, does not destroy local MongoDB on future setup
  "setupMongo": true,

  // WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
  "setupNode": true,

  // WARNING: If nodeVersion omitted will setup 0.10.36 by default. Do not use v, only version number.
  "nodeVersion": "0.10.36",

  // Install PhantomJS in the server
  "setupPhantom": true,

  // Show a progress bar during the upload of the bundle to the server.
  // Might cause an error in some rare cases if set to true, for instance in Shippable CI
  "enableUploadProgressBar": true,

  // Application name (No spaces)
  "appName": "simonlayfield",

  // Location of app (local directory)
  "app": ".",

  // Configure environment
  "env": {
    "ROOT_URL": "http://simonlayfield.com"
      },

  // Meteor Up checks if the app comes online just after the deployment
  // before mup checks that, it will wait for no. of seconds configured below
  "deployCheckWaitTime": 30
}

When navigating to my external IP in the browser I can see the Meteor site template however the Mongodb data isn't showing up.

http://simonlayfield.com

I have set a firewall rule up on the VM to allow traffic through port 27017

Name: mongodb
Description: Allow port 27017 access to http-server
Network: default
Source filter: Allow from any source (0.0.0.0/0)
Allowed protocols and ports: tcp:27017
Target tags: http-server

I've also tried passing the env variable MONGO_URL but after several failed attempts I found this post on the Meteor forums suggesting that it is not required when using a local Mongodb database.

I'm currently connecting to the VM using ssh rather than the gcloud SDK but if it will help toward a solution I'm happy to set that up.

I'd really appreciate it if someone could provide some guidance on how I can know specifically what is going wrong. Is the firewall rule I've setup sufficient? Are there other factors than need to be considered when using a Google Compute Engine VM specifically? Is there a way for me to check logs on the server via ssh to gain extra clarity around a connection/firewall/configuration problem?

My knowledge in this area is limited and so apologies if there's an easy fix that has evaded me.

Thanks in advance.

Upvotes: 2

Views: 384

Answers (1)

Maks
Maks

Reputation: 1

There were some recent meteord updates, please rerun your deployment

Also as a side note: I always specify a port for mup / mupx files

"env": {
    "PORT": 5050,
    "ROOT_URL": "http://youripaddress"
  },

Upvotes: 0

Related Questions