Coder Social home page Coder Social logo

challenge-config-repo's Introduction

challenge-config-repo

As configurações que servem às aplicações no repositorio https://github.com/morganyvm/jsprbt-fa8-k8s serão expostas no modelo:

/{label}/{application}-{profile}.yml

onde:

  1. label = refere-se ao repositorio

  2. application = refere-se à propriedade application.name configurada no arquivo bootstrap.yml de cada spring boot application.

2.1. deve ser uma composição {todo_service}, onde:

2.1.1. todo_service deve identificar o nome do artefato maven referente à aplicação

  1. profile = refere-se ao contexto/ambiente

3.1. deve ser uma composição {runtime_env}, onde:

3.1.1. runtime = local, kubernetes

3.1.2. env = (e.g. challenge, dev, prod, etc).


label = jsprbt-fa8-k8s

application = todo_service

runtime = local

env = challenge

profile = {runtime}_{env} = local_challenge

/jsprbt-fa8-k8s/todo_service-local_challenge.yml

/jsprbt-fa8-k8s/todo_service-kubernetes_challenge.yml

No caso de local o repositorio poderá ser configurado diretamente no arquivo bootstrap.yml

spring:
  cloud:
    config:
      server:
        git:
          uri: https://github.com/spring-cloud-samples/config-repo
          repos:
            development:
              pattern:
                - '*/development'
                - '*/staging'
              uri: https://github.com/development/config-repo
              
            staging:
              pattern:
                - '*/qa'
                - '*/production'
              uri: https://github.com/staging/config-repo

deployment.yml

spec:
  replicas: 1
  template:
    spec:
      volumes:
        - name: config
          gitRepo:
            repository: 'https://github.com/morganyvm/challenge-config-repo.git'
            revision: 667ee4db6bc842b127825351e5c9bae5a4fb2147
            directory: .
      containers:
        - volumeMounts:
            - name: config
              mountPath: /app/config
          env:
            - name: KUBERNETES_NAMESPACE
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.namespace

Veja mais em: http://cloud.spring.io/spring-cloud-static/spring-cloud-config/2.0.0.RELEASE/single/spring-cloud-config.html

challenge-config-repo's People

Contributors

morganyvm avatar

Watchers

 avatar  avatar

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.