{ 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
1
Question by kwarnke · Oct 06, 2016 at 04:43 PM · 1.5k Views operations

Best practices for operational management of microgateway (edgemicro) on Windows

Hello! We are new to the Apigee ecosystem and are working to set up an Apigee Edge topology that includes the deployment of the Microgateway within our network (on-prem).

Based on my initial usage of this component, it appears to run under the user that is currently logged in. When I "configure" the microgateway, it generates (and then uses) files that are stored in my profile (i.e. c:\users\username\.edgemicro\*). And, once you launch the microgateway, it just sits running in the command window in which it was launched. I'm not sure how a "team" can support this model. Especially since (as an example) I'm going on vacation next week and the microgateways are all running under my profile.

So on to the questions:

1. What is the best practice to support multiple people managing this environment?

2. How can another user manage it if a different user started it?

3. How do we ensure it launches when the server boots up?

4. Do you REALLY have to run configure (and get new keys) when you want to change the configuration? Or can you just directly edit the YML that gets created (and stuck in your profile LOL) and then stop/start?

5. Any other recommendations for how to manage this in a production environment?

Thanks!

Kevin

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

2 Answers

  • Sort: 
avatar image
2
Best Answer

Answer by kevinswiber · Oct 06, 2016 at 07:05 PM

Hi, Kevin.

  1. You can run everything under a service account, make changes to the configuration in a source control system, and deploy to %USERPROFILE%/.edgemicro when you're ready to release. Everyone can even use the same configuration locally for testing if you prefer.
  2. You can run the microgateway as a Windows Service and manage it like you would any other Windows Service.
  3. You can AutoStart the Windows Service.
  4. You only have to run configure when you want to get a new key/secret pair. You can just edit the YAML and restart for local config changes.
  5. Again, you can manage this like any other Windows Service.

In addition to what @clatimer1 mentioned, you can try using nssm, a tool I've used in the past. Here's an example command of how to install the service:

nssm install "Apigee Edge Microgateway" "C:\Program Files\nodejs\node.exe" """C:\Users\Kevin Swiber\AppData\Roaming\npm\node_modules\edgemicro\cli\edgemicro""" start -o <org> -e <env> -k <key> -s <secret>

Replace the directory paths with valid values pointing to the location of your Node.js executable and the location of your edgemicro installation. Replace <org>, <env>, <key>, and <secret> with the right values for your configuration.

TIP: If you're running this under your Local System account, you need to place the .edgemicro directory with the configuration under C:\Windows\System32\config\systemprofile.

If you want to capture output from the Apigee Edge Microgateway Windows service, please follow the instructions here: http://nssm.cc/usage#io

Let me know if that works.

Cheers,

Kevin Swiber

Comment
Add comment Show 1 · 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 kwarnke · Oct 06, 2016 at 09:44 PM 0
Link

That nssm tool was sweet! Thank you for sharing.

This works great. I did change the user to "Network Service" so it's not running as an admin (and put the .edgemicro directory in that profile folder) and it all seems to be working great.

avatar image
0

Answer by clatimer1 · Oct 06, 2016 at 06:43 PM

Hi Kevin,

Take a look at the windows-node npm, this will let you create a service wrapper around node.js programs. You should be able to then manage it along with other services that launch at startup. It also gives you access to other service features such as running as Admin, launching at startup, and having a common place where team members with access can manage the service.

Chris

Comment
Add comment · 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

Follow this Question

Answers Answers and Comments

31 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to run forever monitoring? 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