Alpaca Eureka Configuration

This guide details all configurations that are available within the Alpaca Eureka. All configurations can be used in the application-prod.yml file located in the /etc/alpaca/eureka/config.

Any changes made while Eureka is running will not take effect until after a restart. Use the following command to restart Eureka - service alpaca-eureka restart.

YAML (YAML Ain't Markup Language)

All Alpaca configurations are in the YAML (.yml) format.

Basic Rules

  • YAML is case-sensitive.
  • YAML does not allow the use of tabs. Spaces are used instead as tabs are not universally supported.
  • A dictionary is represented in a simple key: value form (the colon must be followed by a space):

        alpaca:
            migration:
              announcementRepositoryUsername: "BoNjOuRlEsAmIs049"
              announcementRepositoryPassword: "viveLEROILouis14"
              htmlEncodeExports: true
    
  • All members of a list are lines beginning at the same indentation level starting with a - (a dash and a space):

      broadworks:
        profileServer:
        - cluster: Production
          fileRepo: ProfileServer
          username: fileadmin
          password: P@ssw0rd
        - cluster: Lab
          fileRepo: ProfileServer
          username: fileadmin
          password: P@ssw0rd
    
  • Comments are denoted by #.

      # Alpaca Configuration
      alpaca:
          # Migration Configuration
          migration:
            announcementRepositoryUsername: "BoNjOuRlEsAmIs049"
            announcementRepositoryPassword: "viveLEROILouis14"
            htmlEncodeExports: true
    

Full Documentation

Complete YAML documentation can be found here.

Example Configuration

This sample configuration is meant as a guide only. Do not copy and paste the entire content into your configuration.

Configuration using AWS S3 or MinIo for cloud configuration

server:
  port: 8761
spring:
  cloud:
    config:
      server:
        prefix: /config
        awss3:
          region: us-east-1
          bucket: alpaca
          endpoint: minio:9000
        default-label: config
    security:
      user:
        name: alpaca
        password: alpaca
        roles: USER
eureka:
  instance:
    hostname: eureka
  client:
    registerWithEureka: true
    fetchRegistry: false
    service-url:
      defaultZone: http://alpaca:alpaca@eureka2:8761/eureka
logging:
  file:
    name: ${logging.file.path}/alpaca-eureka.log
    path: /var/log/alpaca
    max-history: 60

Configuration using local file storage for cloud configuration (non-HA)

server:
  port: 8761
spring:
  cloud:
    config:
      server:
        prefix: /config
        native:
          search-locations: file:///etc/alpaca/eureka/cloud-config
    security:
      user:
        name: alpaca
        password: alpaca
        roles: USER
eureka:
  instance:
    hostname: eureka
  client:
    registerWithEureka: true
    fetchRegistry: false
    service-url:
      defaultZone: http://alpaca:alpaca@eureka2:8761/eureka
logging:
  file:
    name: ${logging.file.path}/alpaca-eureka.log
    path: /var/log/alpaca
    max-history: 60

Server (server)

  • port: The TCP port on which to run the Eureka server.

Spring Cloud Config Server (spring.cloud.config.server)

  • prefix: This is the path that all Alpaca Servers will access the centralized configuration. This defaults to /config.
  • security.user.name: This is the username that the Alpaca Server will include in the request to retrieve the centralized configuration.
  • security.user.password: This is the password that the Alpaca Server will include in the request to retrieve the centralized configuration.
  • security.user.roles: These are the roles assigned to the user on login. This should remain USER as default.
  • default-label: This is the default directory to locate centralized configurations. When using Minio this is used as the name of the bucket.
  • native.search-locations: List of locations to look for the Alpaca Server configuration (alpaca-server-prod.yml).

AWS S3 (awss3)

When using an S3 compatible storage for centralized configuration the awss3 profile must be entered into the alpaca_config script in /etc/sysconfig.

  • region: The region of the S3 storage.
  • bucket: The name of the bucket if using AWS. If using Minio this will be subdomain of the Minio server.
  • endpoint: This is the endpoint of the S3 storage system. This is necessary when using Minio but can be excluded with AWS.

Eureka (eureka)

  • instance.hostname: This is a comma separated list of additional Eureka URLs to register with. This allows clustering of Eureka nodes for service discovery.
  • client.registerWithEureka - Indicates whether this instance should register its information with the Eureka server for discovery by others. This defaults to true.
  • client.fetchRegistry - Controls whether this client is going to try to connect to the Eureka server(s) in order to download the information on other services' endpoint. It can do so without registering itself. Defaults to false.

Logging (logging)

  • file.path: The location to write the gateway log. This defaults to /var/log/alpaca. Rotation and file naming are configured in the logback-spring.xml file.

Profiles

  • prod: This is the primary configuration for production.
  • native: Enables local file storage for Alpaca Server configuration (non-HA).
  • awss3: Enables S3 Bucket support for Alpaca Server configuration.

Profile selection can be done in the /etc/sysconfig/alpaca_config file.