Skip to content

development: Commands CLI #1

@armand1m

Description

@armand1m

Proposal

Create a CLI for handling the microservices environment state

Why we need this

To create this environment, you need to:

  • Create a directory.
  • cd directory
  • git init
  • git submodule add https://github.com/armand1m/microservices-compose-utils ./commands
  • git submodule add https://github.com/armand1m/core-services.
  • Create a docker-compose.yml file with this content:
version: '2'
services:
  consul:
    extends:
      file: ./core-services/services.yml
      service: consul_service

  gateway:
    extends:
      file: ./core-services/services.yml
      service: fabio_service
    links:
      - consul

To add a service to the recently created environment, you need to:

  • git clone https://github.com/armand1m/microservice-barebone ./my-service
  • cd ./my-service
  • git submodule add https://github.com/<user>/<service-name>
  • Edit the docker-compose.yml to extend and run the added service. Let's say you are adding armand1m/bucket-service. The file would look like this after the modifications:
  service:
    extends:
      file: ./bucket-service/service.yml
      service: service
    volumes:
      - ./data:/data
    depends_on:
      - consul
    links:
      - consul

  consul:
    extends:
      file: ./core-services/services.yml
      service: consul_service

  gateway:
    extends:
      file: ./core-services/services.yml
      service: fabio_service
    links:
      - consul

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions