Installation of Edge Micro v2.0.0 on AWS (AMI Linux)

Not applicable

I am trying to install Edge Micro v2.0.0 on AWS using Amazon Linux.

Node Version: v5.10.1

OpenSSL Installed

Error

[root@ip-10-0-1-92 cli]# node -v

v5.10.1

[root@ip-10-0-1-92 cli]# ./edgemicro -h

/opt/apigee-edge-micro-2.0.0/cli/cmd.js:3 const commander = require('commander'); ^^^^^ SyntaxError: Use of const in strict mode. at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (/opt/apigee-edge-micro-2.0.0/cli/edgemicro:23:1) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) [root@ip-10-0-1-92 cli]#

=========================================

EDIT

=========================================

Resolved the problem:

Yes, indeed it is the nodejs version issue. The problem arises because I used "n" to upgrade my nodejs version.

AMI Linux doesnt work well with "n" (https://github.com/tj/n). It apparently installs successfully but the version doesnt seem to reflect correctly. I switched it for nvm and everything works well.

With that, I have successfully installed and configured Apigee 2.0.0 on AMI Linux.

Solved Solved
1 16 405
1 ACCEPTED SOLUTION

Not applicable

Yes, indeed it is the nodejs version issue. The problem arises because I used "n" to upgrade my nodejs version.

AMI Linux doesnt work well with "n" (https://github.com/tj/n). It apparently installs successfully but the version doesnt seem to reflect correctly. I switched it for nvm and everything works well.

With that, I have successfully installed and configured Apigee 2.0.0 on AMI Linux.

View solution in original post

16 REPLIES 16

Hmmm interesting find. Let us get back to you. Tagging @shawn feldman

Not applicable

I have successfully installed Edgemicro v1.1.2 on the same box. Can I check with you, if make changes on Apigee Edge, how do i "force sync" it back down to my on-premise Apigee Edgemicro ?

It depends on what changes you are making on Edge. If a new apiKey is approved for example, it wont require any sync, it will happen automatically. But if new edgemicro_proxies are added or new API products are added then currently it requires a restart. This is also one of highly sought out feature. Although we don't provide in Microgateway, our thinking has been that enterprise customers would usually front instances of Micrageway with nginx which supports a rolling restart.

I changed the target endpoint of an API Proxy (e.g. edgemicro_test) on Apigee Edge (SaaS). I did a ./edgemicro agent proc -c restart locally on-prem. I received "ack" and when i do a ./edgemicro agent proc list, it shows restart at 1.

However my proxy (e.g. http://localhost:8000/test) is still pointing to the >>old<< target endpoint

Please advise if i am doing it correctly ?

That should not be the case. Instead of restart, pls try stop and start. The best would be for you to get going with 2.0.0 release where it's more well defined.

I just tried start/stop and it is still pointing to old target endpoint. Yup, thats the reason why i chose to try out 2.0.0 but i cant get pass that error I mentioned in the main post. Whereas for 1.1.2, I can install + configure + setup without any error.

i replied below for 2.0, add the following lines to the top of the cli/edgemicro file... I think an older version of node is running, this will print it out as a verification

console.log('current nodejs version is %s',process.version) 
if(process.version.indexOf('v5')<0){ console.error('please update nodejs to v5.x+') }

upvotes on this. I dont know how we are going to explain that this doesnt happen via some polling mechanism right now to our internal customers who are considering it.

Not applicable

can you add these two lines under 'use strict' in cli/edgemicro?

console.log('current nodejs version is %s',process.version)

if(!process.version.includes('v5')){ console.error('please update nodejs to v5.x+') }

then rerun your script

Not applicable

i think the server is running an old version of node this will print it out. one correction

console.log('current nodejs version is %s',process.version)

if(process.version.indexOf('v5')<0){ console.error('please update nodejs to v5.x+') }

Not applicable

Can someone explain what is going on here? I am in the process of putting together a very big POC for edge micro and want to make sure this isnt something that is going to bite us.

Not applicable

upvotes on this. I dont know how we are going to explain that this doesnt happen via some polling mechanism right now to our internal customers who are considering it.

Not applicable

@Leroy Chan did the above steps work to show an older version of nodes running?

Not applicable

Yes, indeed it is the nodejs version issue. The problem arises because I used "n" to upgrade my nodejs version.

AMI Linux doesnt work well with "n" (https://github.com/tj/n). It apparently installs successfully but the version doesnt seem to reflect correctly. I switched it for nvm and everything works well.

With that, I have successfully installed and configured Apigee 2.0.0 on AMI Linux.

Good to hear the next version will include a node version check up front

Looks like it's all sorted out now. We support LTS of node 4.x a 5.x