Git Product home page Git Product logo

ansible-cortex's Introduction

Ansible Role: cortex

Build Status License Ansible Role GitHub tag

Description

Deploy cortex using ansible.

Requirements

  • Ansible >= 2.7 (It might work on previous versions, but we cannot guarantee it)

Role Variables

All variables which can be overridden are stored in defaults/main.yml file as well as in table below.

Name Default Value Description
cortex_all_in_one true Setup Cortex in all-in-one binary mode.
cortex_services {} Cortex services configurations.
cortex_web_listen_address "0.0.0.0:9009" Address on which cortex will listen
cortex_binary_local_dir "" Allows to use local packages instead of ones distributed on github. As parameter it takes a directory where cortex binaries are stored on host on which ansible is ran. This overrides cortex_version parameter
cortex_interface "{{ ansible_default_ipv4.interface }}" Network adapter that cortex will be using
cortex_config_dir "/etc/cortex" Default directory for the cortex config
cortex_db_dir "/var/lib/cortex" Path to the directory of the Cortex database
cortex_limit_nofile 10240 Number of File Descriptors allowed for Cortex processes
cortex_system_user "cortex" Default Cortex user
cortex_system_group "cortex" Default Cortex group
cortex_version 1.9.0 The cortex package version
cortex_auth_enabled "false" Enables of disables the Cortex authentication
cortex_env_variables {} Configure Cortex environment variables.
cortex_alertmanager {} Cortex alertmanager. Compatible with official configuration
cortex_api {} Cortex api. Compatible with official configuration
cortex_blocks_storage From block storage example Cortex blocks storage. Compatible with official configuration
cortex_chunck_store {} Cortex chunck store. Compatible with official configuration
cortex_compactor From block storage example Cortex compactor. Compatible with official configuration
cortex_configs {} Cortex configs. Compatible with official configuration
cortex_distributor From block storage example Cortex distributor. Compatible with official configuration
cortex_flusher {} Cortex flusher. Compatible with official configuration
cortex_frontend_worker From block storage example Cortex frontend worker. Compatible with official configuration
cortex_frontend {} Cortex frontend. Compatible with official configuration
cortex_ingester_client From block storage example Cortex ingester client. Compatible with official configuration
cortex_ingester From block storage example Cortex ingester. Compatible with official configuration
cortex_limits {} Cortex limits. Compatible with official configuration
cortex_memberlist {} Cortex memberlist. Compatible with official configuration
cortex_prealloc {} Cortex prealloc. Compatible with official configuration
cortex_purger {} Cortex purger. Compatible with official configuration
cortex_querier {} Cortex querier. Compatible with official configuration
cortex_query_range {} Cortex query range. Compatible with official configuration
cortex_ruler From block storage example Cortex ruler. Compatible with official configuration
cortex_runtime_config {} Cortex runtime config. Compatible with official configuration
cortex_schema {} Cortex schema. Compatible with official configuration
cortex_server From block storage example Cortex server. Compatible with official configuration
cortex_storage From block storage example Cortex storage. Compatible with official configuration
cortex_store_gateway {} Cortex store gateway. Compatible with official configuration
cortex_table_manager {} Cortex table manager. Compatible with official configuration

Example

Playbook

Use it in a playbook as follows:

- hosts: all
  roles:
    - cloudalchemy.cortex

Services mode

You can run the different Cortex modules as separate services by setting cortex_services as a module:config map and cortex_all_in_one to false.

- hosts: all
  roles:
    - cloudalchemy.cortex
  vars:
    cortex_all_in_one: false
    cortex_services:
      ingester:
        server:
            http_listen_port: 9009
        ingester:
            lifecycler:
              join_after: 0
              min_ready_duration: 0s
              final_sleep: 0s
              num_tokens: 512

              ring:
                kvstore:
                  store: inmemory
                  replication_factor: 1
    cortex_env_variables:
      ingester:
        JAEGER_AGENT_HOST: localhost
        JAEGER_SAMPLER_PARAM: 0
        JAEGER_SAMPLER_TYPE: const

Local Testing

The preferred way of locally testing the role is to use Docker and molecule (v3.x). You will have to install Docker on your system. See "Get started" for a Docker package suitable to for your system. Running your tests is as simple as executing molecule test.

Continuous Intergation

Combining molecule and circle CI allows us to test how new PRs will behave when used with multiple ansible versions and multiple operating systems. This also allows use to create test scenarios for different role configurations. As a result we have a quite large test matrix which can take more time than local testing, so please be patient.

Contributing

See contributor guideline.

Troubleshooting

See troubleshooting.

License

This project is licensed under MIT License. See LICENSE for more details.

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.