Change default config directory

Not applicable

Is there a way to change the Microgateway's default directory? When running "edgemicro init" and "edgemicro configure", the yaml files are generated in ~/.edgemicro/. I would like to be able to give a command line option such as "-f" and then specify a directory location. Alternatively, I would like to be able to set an environment variable like MGW_HOME so that the yaml files would be created in $MGW_HOME/.edgemicro/.

For background, we are using a continuous integration tool to build and deploy a Microgateway to Cloud Foundry. I want to create the yaml files in the build plan's directory opposed to the user's home directory.

This feature would be helpful for configuring the Microgateway with the cloud-foundry-route-service plugin (https://github.com/apigee/pivotal-cf-apigee/tree/master/microgateway-addons). Currently, the generated yaml files must be manually copied to $MGW_HOME/.edgemicro before pushing to Cloud Foundry.

0 7 254
7 REPLIES 7

:+1: that would make integration & testing so much easier

Former Community Member
Not applicable

Hey all,

I have a pull request out on edgemicro proper that allows you to set where to read and write configuration files to using a command line flag or the env variable EDGEMICRO_CONFIG_DIR.

Check it out here: https://github.com/apigee-internal/microgateway/pull/86

-Matt

It seems like the configure command requires the default.yaml exist in the home directory even when the --configDir is specified. I was expecting to run "edgemicro init -c <directory>" which puts the default.yaml in <directory> then run "edgemicro configure ... -c <directory>", but I received this error message: "Missing ~/.edgemicro/default.yaml", please run 'edgemicro init'".

Hi Shaun,

You're absolutely right. Apologies for the bug. I'm working on a fix currently. Will update this thread with the progress.

Hi Matt ,

Is this fix now in master stable release?

Also what is the CLI reference for it?

Srinandan Sridhar

Kind Regards,

Rags

Former Community Member
Not applicable

please start a new thread. the current thread is over a year old.