6

FROM google/debian:wheezy
MAINTAINER mchouan@gpartner.eu

# Fetch and install Node.js
RUN apt-get update -y && apt-get install --no-install-recommends -y -q curl python build-essential git ca-certificates
RUN mkdir /nodejs && curl http://nodejs.org/dist/v0.12.0/node-v0.12.0-linux-x64.tar.gz | tar xvzf - -C /nodejs --strip-components=1

# Add Node.js installation to PATH
ENV PATH $PATH:/nodejs/bin

# Install redis
RUN apt-get install -y redis-server

# Install supervisor
RUN apt-get install -y supervisor

# Add Node.js installation to PATH, and set
# the current working directory to /app
# so future commands in this Dockerfile are easier to write
WORKDIR /app

ENV NODE_ENV development

ADD package.json /app/

# RUN npm install

# Adds app source
ADD . /app

ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
CMD ["/usr/bin/supervisord"]

Hello,

I have been trying to deploy an app on a Google Managed VM based on a Node.JS runtime. However, this seems to be a little confused to me as I still get this error while deploying :

ERROR: (gcloud.preview.app.deploy) Not enough VMs ready (0/1 ready, 1 still deploying). Deployed Version: 280815s.386747973874670759

We have been able to deploy it one week ago, so this error does not occur every time (it this reccuring for 2 days now). I guess there is something wrong with our configuration, maybe regarding our app.yaml or our Dockerfile, but I still can't figure out what is going on. Furthermore, the VM is created but is inaccessible, the SSH connection gets lost. I was wondering if this was not coming from Google. Do you have any idea ?

Here is the app.yaml :

module: default
runtime: custom
api_version: 1
vm: true
# manual_scaling:
#   instances: 1

# [START scaling]
automatic_scaling:
  min_num_instances: 1
  max_num_instances: 5
  cool_down_period_sec: 60
  cpu_utilization:
    target_utilization: 0.5
# [END scaling]

health_check:
  enable_health_check: False
  check_interval_sec: 20
  timeout_sec: 4
  unhealthy_threshold: 2
  healthy_threshold: 2
  restart_threshold: 60

handlers:
 - url: /.*
   script: server.js

Here is the Dockerfile :

FROM google/debian:wheezy
MAINTAINER mchouan@gpartner.eu

# Fetch and install Node.js
RUN apt-get update -y && apt-get install --no-install-recommends -y -q curl python build-essential git ca-certificates
RUN mkdir /nodejs && curl http://nodejs.org/dist/v0.12.0/node-v0.12.0-linux-x64.tar.gz | tar xvzf - -C /nodejs --strip-components=1

# Add Node.js installation to PATH
ENV PATH $PATH:/nodejs/bin

# Install redis
RUN apt-get install -y redis-server

# Install supervisor
RUN apt-get install -y supervisor

# Add Node.js installation to PATH, and set
# the current working directory to /app
# so future commands in this Dockerfile are easier to write
WORKDIR /app

ENV NODE_ENV development

ADD package.json /app/

# RUN npm install

# Adds app source
ADD . /app

ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
CMD ["/usr/bin/supervisord"]

Here is the command we run in order to deploy the app :

gcloud preview app deploy $DIR/app.yaml --version="$version" --force

Thank you for helping.

  • This would be a total workaround, but are you able to quit the instance from Google Developer Console, either under App Engine Instances or Google Compute VM Instances? – Doug Richardson Aug 28 '15 at 17:50
  • I'm having the same problem, I'm evaluating GCloud as an alternative to Heroku, so I signed up for a free trial. This doesn't seem to be as friendly as Heroku with NodeJS and I am not finding any related docs or forums. I'm just using the plain app.yaml, and getting the same: *Not enough VMs ready (0/2 ready, 2 still deploying)* error all the time after a bunch of this error: *Updating module [default]...-DEBUG: Operation [apps/lhbo-ff5/operations/68d05a70-9b55-4761-a08a-54b9fb4581f5] not complete. Waiting 5s.* – jmhm Nov 11 '15 at 20:53

1 Answers1

1

You don't seem to be exposing any ports on the container. For managed VMS, you should expose port 8080, try adding :

EXPOSE 8080
maciekrb
  • 227
  • 1
  • 11