Giter Club home page Giter Club logo

navy's People

Contributors

davidgtonge avatar dependabot[bot] avatar jeanpaulgorman avatar jonbride avatar joshuajabbour avatar madjam002 avatar mh-bains avatar ozamarripa avatar stefanspita avatar tanuck avatar thomwright avatar ukn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

navy's Issues

getLANIP is often incorrect

getLANIP always returns 127.0.1.1 for me, and at least one other linux user.

It seems to work for some OSX users, but for some it returns something else, e.g. a virtualbox IP.

Would something like this be better:

const interfaceName = "wlan0" // supplied by user

const interfaces = os.networkInterfaces();
const networkInterface = interfaces[interfaceName]
for (const i in networkInterface) {
  var address = networkInterface[i];
  if (address.family === 'IPv4') {
    console.log(address.address);
  }
}

It does require the user to input which interfaceName to use though.

Ability to clone services

Sometimes (like for testing) it's useful to clone a service and maybe launch it with a custom tag so you can compare versions.

Ability to set external IP in config as well as environment variable

Sometimes it's a bit cumbersome setting the NAVY_EXTERNAL_IP environment variable. There should be a way to set this on the command line which is persisted in config.

Maybe a generic navy config command just like npm config?

Also we could have navy allow-external-access which automates setting your external IP to your LAN ip address and prints out some usage examples on the terminal.

Allow develop mode without attaching to log stream

Can be useful at the start of a test run where you want to put a service into development before running some tests. In this case you will not want to keep the logs in the foreground.

A way of doing this might be:

$ navy develop --no-logs

Dynamic config

Dynamic config is useful for changing environment variables and other configuration in response to dynamic variables (e.g service URL).

This is useful for frontend services which might need to pass in the user facing URL for the server as an environment variable, or maybe a backend service which needs the URL to a frontend service for CORS configuration.

Port is always 5

I don't think file packages/navy/src/drivers/docker-compose/index.js line 127 is correct.

Website

Finish first version of the website and improve documentation

Ability to override default navy name by using a .navyrc file

Say you have a lot of repos for your microservices and you're using the same navy configuration across these microservices.

When running navy commands, you might want the navy name to be "myapplication" for example, and this could be defined in a .navyrc file.

When running navy, it will look for a .navyrc file in the current directory. If not found, it will work its way up the directory tree.

Plugin system

It should be able to install plugins for a Navy.
Plugins can extend the CLI to add new commands and extend others.
Plugins come in the form of NPM packages, and a plugin can be a composition of multiple other plugins.

Installed plugins will be tracked in the state JSON file for the navy, and the node modules folder should be in the directory for the navy.

The plugin API is undecided at this point.

getUrlForService can return incorrect URL

From my understanding, a URL is registered in the nginx proxy for each service running, something like http://myservicename.dev.127.0.0.1.xip.io.

When getUrlForService is invoked, it returns something of the same form.

The problem arises when we change, for example, xip for nip. nginx can have services registered with xip URLs, and getUrlForService will return nip URLs which won't work.

As I see it there are two possible solutions here:

  1. Make nginx match only on the <servicename>.<navyname> part of the url
  2. Make getUrlForService look up the url it has registered with nginx for a given service, and return that, rather than assume it's used xip or nip.

Build image if possible when in develop mode

If a docker-compose file specifies an image and a dockerfile to build, the dockerfile should be built and used when using develop mode. The image should be used when not in develop mode.

Maybe a command as well:

$ navy rebuild [?service]

to rebuild the images for the service.

Maybe also it should be possible to specify build parameters such as context path and dockerfile path in .navyrc, as sometimes your docker-compose won't be in the same directory as your service.

Use tag command

Used for overriding the tag of an image for a service. Will pull the image with the tag and relaunch the service. There should also be a reset-tag command to reset the tag back to whatever it is in the compose configuration.

Should also show the tag being used in status and ps.

Separate launch and initialise

navy import - Imports docker compose configuration from current directory and initialises navy
navy launch - Launches services (like it does now)
navy down - Brings down services (equivilent of navy destroy now)
navy destroy - Deletes navy but keeps services in docker compose if there are any left. Should throw an error if there are services that still exist though, this can be overridden with --force.

Internal nginx proxy

This will be useful for accessing launched services without having to worry about ports. It also means that multiple instances of the same environment can be launched in parallel without conflicting ports, because ports don't need to be published and the service instead can be accessed from behind a URL.

For now we can use xip.io for DNS.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.