{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Microgateway /
avatar image
0
Question by Bryant Olson · Feb 08, 2016 at 08:02 PM · 279 Views microgatewaynodenpm

node startup not working as expected in edgemicro

I'm making some headway on the Micro Gateway servers and I want to be able to productionalize this. Does anyone have any luck getting the "node <edgemicro-root-dir>/agent/build/src/index.js" command working when setting EDGEMICRO_KEY and EDGEMICRO_SECRET env variables?

I've set the variables I've started the node server but it doesn't seem to grab the information from the edge install as listed in this document under the "Running in a production environment" heading. If I'm reading that correctly I should be able to set those variables and start it using node or pm2 commands and forego the edgemicro proc start command. Debug doesn't offer any advice as it looks like it just starts without actually getting the information it needs from our on prem install of edge.

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

1 Answer

  • Sort: 
avatar image
1
Best Answer

Answer by Will Witman · Feb 08, 2016 at 10:54 PM

Hi @Bryant Olson,

I just tried using the env variables and it worked successfully. Here's what I did:

1) Added the variables to my .bash_profile: export EDGEMICRO_KEY=<long string> export EDGEMICRO_SECRET=<long string>

2) In the shell where I am starting Edge Microgateway, I make sure to source the shell profile: source ~\.bash_profile

3) I checked to see that the variables are present:

printenv

4) cd to the agent directory:

cd <edgemicro-root>/agent

5) Finally, I started the agent:

npm start

or

DEBUG=* npm start

or

node ./build/src/index.js

In my case, the agent did start Edge Microgateway, all the config downloaded normally, and I was able to call my API successfully.

Can you get it to work by following these steps? Hope this helps.

Will

Comment
Add comment Show 2 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Will Witman ♦♦ · Feb 08, 2016 at 10:56 PM 0
Link

BTW, I'm hitting a cloud instance. Not an onprem. I'm not sure why it would make a difference, but if you can't get it to work, then there may be a bug specific to onprem. Also, I'm using apigee-edge-micro-1.1.1.

avatar image Bryant Olson Will Witman ♦♦ · Feb 09, 2016 at 03:47 PM 0
Link

that did it, I was simply setting the variables as a local variable and not using "export" to set it as an environment variable. simply adding "export" to my script did the trick. Thanks!

Follow this Question

Answers Answers and Comments

24 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

npm install edgemicro => crypto@0.0.3: This package is no longer supported - security issue? 1 Answer

Edge Micro validation throws error 1 Answer

Specify different throttling limits for Micro aware proxies? 1 Answer

501 status code in edgemicro logs when going through forwarding proxy server 1 Answer

Issue when deploying microgateway Docker image in OpenShift 2 Answers

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges