0

I am trying to deploy Etherpad version 1.5.7 (https://github.com/cloudfoundry/cli/releases) on Bluemix using the Command Line Interface as per the guidelines here - https://www.ng.bluemix.net/docs/starters/install_cli.html

I am getting attached errorsenter image description here

I get this error on executing the command - cf push appname https://github.com/cloundfoundry/node.js-buildpack.git

Any help on how to resolve this error would be helpful. TIA.

RandalAnders
  • 1,431
  • 9
  • 16
maddie
  • 629
  • 10
  • 29

1 Answers1

8

The key message in your output is:

It looks like you're deploying on a stack (currently set to *lucid64*) that's not supported by this buildpack.

You can see the supported stacks in Bluemix and the order in which they are currently set to be used with the command cf stacks. If you run this command, you will probably see that lucid64 is at the top of the list.

Based on the changelog of the buildpack you've specified, support for the cflinuxfs2 stack was added in v1.2.0 and then later, lucid binaries were removed in v1.4.0. Since lucid support is no longer provided in the buildpack, you will need to specify a different stack to use. This can be accomplished with the -s command line option to specify one of the values that you saw as available from the cf stacks command. Ex.

cf push EtherPadOnceMore -b https://github.com/cloudfoundry/nodejs-buildpack -s cflinuxfs2

Based on comments below, information here is added as an edit to capture additional steps if using the repo at http://github.com/ether/etherpad-lite/releases for deploying to CloudFoundry/Bluemix:

  1. The buildpack used above expects package.json at the root of what you push. Copy /src/package.json to the root of the project and modify the content to remove the 'dependencies' section to avoid initial module installation
  2. Specify a start command with the -c command line option (to simulate the setup and start scripts). Add -c "npm install src/ && node node_modules/ep_etherpad-lite/node/server.js" to the cf push command.
  3. Remove "ip" and "port" from the settings.json file so that the PORT environment variable will be used by Bluemix runtime (PORT is automatically set for you)
jimmc
  • 585
  • 2
  • 9
  • Thanks for your answer. On trying ---> cf push EtherPadOnceMore -b https://github.com/cloudfoundry/nodejs-buildpack -s cflinuxfs2 I get the error **Unable to parse package.json**. Where can I find this file and where should I place it? I do not have a package.json file in the etherpad codebase already. – maddie Sep 22 '15 at 13:59
  • I can see the package json file in the 'src' folder of etherpad-1.5.7. Not sure why it is not getting picked up on push. – maddie Sep 22 '15 at 14:09
  • In your screen capture, I see that files for the app are being uploaded from c:\users\maddie\desktop. When performing a push, the default behavior is that files will be pushed from the directory where the command is run. Is this what you want? You may need to change directories to push from a dir where the app resides. The package.json file for a Node.js app should be at the root of the project. The "unable to parse" message may also be an indication of an improperly formatted package.json file, so you may want to inspect it to ensure correct syntax. – jimmc Sep 22 '15 at 16:57
  • Thanks @jimmc I rectified the path to point to the folder I had the project in. I still get the same error. The package.json file is in the src folder of the project source code. I have checked for the syntax. It is a valid JSON file. I am doing all these on a Win 7 machine. Would that be an issue? – maddie Sep 22 '15 at 23:38
  • @maddie - Win7 should not be an issue. It's difficult to say without seeing your project, but it sounds like you may need to be pushing from the /src subfolder (or use a '-p ./src' command-line option to specify the path to push from). Are you following a tutorial? Or is your project in a Git repo somewhere? – jimmc Sep 23 '15 at 12:40
  • Yes the project is on a Git repo - https://github.com/ether/etherpad-lite/releases. Here is the code structure -- http://s8.postimg.org/7a5s7xbut/Code_Structure.png – maddie Sep 24 '15 at 04:45
  • 1
    @maddie - this project wasn't originally designed for CloudFoundry, but a few minor changes can get it working. (1) buildpack expects package.json at the root of what you push. Copy /src/package.json to the root of the project. Modify the content to remove the 'dependencies' section to avoid initial module installation (2) Specify a start command with the -c command line option (simulate the setup and start scripts). Add '-c "npm install src/ && node node_modules/ep_etherpad-lite/node/server.js" ' to the 'cf push' command. (3) remove "ip" and "port" from the settings.json file – jimmc Sep 25 '15 at 01:37
  • Thanks @jimmc. I found the source code suitable for CloudFoundary. I was able to deploy it as well. Thanks again for your time. – maddie Sep 25 '15 at 06:33
  • 1
    glad to hear @maddie - I've updated the answer to provide additional steps based on comments in case someone is using the same repo. If you're happy with the answer, please consider accepting it. – jimmc Sep 25 '15 at 15:23
  • There's a plug-in "change-stack" for cf that allows to update your existing projects to the latest stacks I wrote about it here: http://www.notessensei.com/blog/2015/08/theres-a-plug-in-for-that-getting-started-with-cf-plug-ins.html – stwissel Sep 26 '15 at 04:28