All Projects → lukaszlach → Consul Conf

lukaszlach / Consul Conf

Licence: mit
🐳 Consul.conf provides responsive web interface for managing configuration of your services in Consul key-value storage through beautiful and customizable dashboards, distributed as a lightweight Docker image.

Projects that are alternatives of or similar to Consul Conf

Aspnetcore.services
Examples for ASP.NET Core webservices
Stars: ✭ 59 (+136%)
Mutual labels:  consul, configuration
Winton.extensions.configuration.consul
Enables Consul to be used as a configuration source in dotnet core applications
Stars: ✭ 239 (+856%)
Mutual labels:  consul, configuration
Condenserdotnet
API Condenser / Reverse Proxy using Kestrel and Consul, Including light weight consul lib
Stars: ✭ 147 (+488%)
Mutual labels:  consul, configuration
honeycomb
本项目用于验证一系列开源项目
Stars: ✭ 13 (-48%)
Mutual labels:  consul, configuration
Simple Settings
A simple way to manage your project settings.
Stars: ✭ 165 (+560%)
Mutual labels:  consul, configuration
Spring Cloud Consul
Spring Cloud Consul
Stars: ✭ 703 (+2712%)
Mutual labels:  consul, configuration
Rails Settings
Manage settings with Ruby on Rails
Stars: ✭ 807 (+3128%)
Mutual labels:  configuration
Andhow
Strongly typed, validated, easy to use Java configuration
Stars: ✭ 17 (-32%)
Mutual labels:  configuration
Vspacecode
Spacemacs like keybindings for Visual Studio Code
Stars: ✭ 793 (+3072%)
Mutual labels:  configuration
React Container Query
📦 Modular responsive component
Stars: ✭ 788 (+3052%)
Mutual labels:  responsive
Beverage Starter Flow
Simple Example Web Application for Vaadin Flow
Stars: ✭ 24 (-4%)
Mutual labels:  responsive
Config Rs
⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications).
Stars: ✭ 915 (+3560%)
Mutual labels:  configuration
Anura Server
the Anura configuration manger
Stars: ✭ 16 (-36%)
Mutual labels:  configuration
Carvel Ytt
YAML templating tool that works on YAML structure instead of text
Stars: ✭ 816 (+3164%)
Mutual labels:  configuration
Screenshotframes
A small CSS library for adding responsive frames (mobile device, desktop computer, or browser toolbar) to images
Stars: ✭ 18 (-28%)
Mutual labels:  responsive
Springcloud Learning
Spring Cloud基础教程,持续连载更新中
Stars: ✭ 6,839 (+27256%)
Mutual labels:  consul
Modularosticket
Adaptation of ModularAdmin for Osticket v.1.11
Stars: ✭ 24 (-4%)
Mutual labels:  responsive
Consul Alerts
A simple daemon to send notifications based on Consul health checks
Stars: ✭ 792 (+3068%)
Mutual labels:  consul
Strictyaml
Type-safe YAML parser and validator.
Stars: ✭ 836 (+3244%)
Mutual labels:  configuration
Hzdtf.foundation.framework
基础框架系统,支持.NET和.NET Core平台,语言:C#,DB支持MySql和SqlServer,主要功能有抽象持久化、服务层,将业务基本的增删改查抽离复用;提供代码生成器从DB生成实体、持久化、服务以及MVC控制器,每层依赖接口,并需要在客户端将对应实现层用Autofac程序集依赖注入,用AOP提供日志跟踪、事务、模型验证等。对Autofac、Redis、RabbitMQ封装扩展;DB访问提供自动主从访问,Redis客户端分区。特别适合管理系统。
Stars: ✭ 22 (-12%)
Mutual labels:  configuration

Consul.conf

Version Docker pulls Donate PayPal

Consul.conf provides responsive web interface for managing configuration of your services in Consul key-value storage through beautiful and customizable dashboards built with Material Design for Bootstrap and Phalcon Framework.

Consul.conf is easy to install and integrate as only creating one single key in Consul key-value is required to introduce your first dashboard. All already existing fields will be visible inside the web interface and can only use some customization.

  • Standalone - distributed as a lightweight Docker image, installable with automated script.
  • Different field types - as different types of information require different types of fields, choose either text, select or checkbox.
  • Look-and-feel - customize your dashboards by changing color, icon or hiding unconfigured fields. Much more can be done when customizing fields you can also pass default value, read-only or hidden flag.
  • Responsive - works fine on tablet and mobile phone.
  • Stateless - dashboards and fields are stored in Consul key-value, meaning Consul.conf can be run on your local machine or any server having access to Consul API and it will be able to fetch all your dashboards and customizations. It also works well with any existing key structure it finds.
  • Event notifications - send message to Slack or HipChat channel when event happens, for example user logs in or changes the value of a field on dashboard.
  • Basic and LDAP authorization support.
  • HTTPs support.

Install

Use automated install script that pulls Docker image, creates directory structure and configuration files and installs start/stop commands for you, by executing below command. If you prefer to do it manually - proceed with usage instructions, Docker image will be downloaded automatically on first usage.

export CONSUL_CONF_VERSION=1.0
curl -L "https://raw.githubusercontent.com/lukaszlach/consul-conf/$CONSUL_CONF_VERSION/install" | bash

You will see "Consul.conf installed and running" message after installation is done, configuration directory /etc/consul-conf holds consul-conf.conf that allows you to modify settings. Installation process also adds consul-conf-start and consul-conf-stop management commands.

On default settings Consul.conf listens on port 8080.

You can use the same commands to upgrade (or downgrade) Consul.conf, all your configuration values, dashboards and fields will be preserved. Just change CONSUL_CONF_VERSION to desired version.

Read the Troubleshooting Guide in case of problems with connecting to Consul HTTP API or running the Docker image.

Install examples

Optionally you can install example fully customized dashboards by executing below command. Script expects Consul HTTP API on http://localhost:8500, you can change it with CONSUL_API_URL environment variable.

curl -L "https://raw.githubusercontent.com/lukaszlach/consul-conf/$CONSUL_CONF_VERSION/install-examples" | bash

Quick guide

Below examples expect Consul API available on localhost:8500 and Consul.conf listening on localhost:8080. See all different ways you can store new value inside Consul key-value storage.

Step 1. Create dashboard

# create dashboard under "project/" base path
curl -X PUT -d '{"name": "Example dashboard", "color": "deep-purple"}' \
    http://localhost:8500/v1/kv/project/.dashboard/.config

Step 2. Create field

# set value for "project/key" path
curl -X PUT -d 'value' \
    http://localhost:8500/v1/kv/project/key

# create dashboard field for "project/key" path
curl -X PUT -d '{"name": "Example key", "icon": "rocket"}' \
    http://localhost:8500/v1/kv/project/.dashboard/key

Step 3. See how it looks like

Visit http://localhost:8080, you will see a dashboard list with your newly added "Example dashboard" already available. On the dashboard itself you can see "Example key", change it's value and save in Consul key-value storage.

You can now configure your projects basing on the value of project/key key in Consul key-value storage and use Consul.conf to handle and propagate it's changes.

Dashboard list: http://localhost:8080/d

Example dashboard: http://localhost:8080/d/project

Customize

Consul.conf allows customizing dashboards and fields by setting their name, description and look-and-feel attributes like color or icon.

See separate document on how to create and customize dashboards and fields.

Configure

Consul.conf is configured using /etc/consul-conf/consul-conf.conf file which is used by docker-compose.yml file from the same directory to start and stop the service, environment variables are passed automatically. This file has simple FIELD=value structure, all lines starting with # are ignored.

If you are running Docker image manually, you need to pass environment variables manually as well.

See separate document for list of currently recognized configuration options.

Integrate

Consul.conf works easily with any existing key structure it finds, it mainly looks for .dashboard/.config key when scanning for dashboards. When such key is found, even with empty JSON object inside - it's base path will be visible inside the web UI as separate dashboard.

By default all existing keys will be visible and editable using text inputs, even when no corresponding field configuration key is present in Consul key-value storage. All found nested keys are also rendered.

Monitor

Docker container logs all important events with details - all entries include username of logged in user and his IP address. Access logs from nginx are also passed, although limited to non-GET requests. Some environment variables' values are hidden in logs, mostly these holding credentials, ACL tokens etc.

You can view logs by executing docker logs consul_conf -f but it is recommended to forward them to external aggregator like syslog.

Example log output:

[2018-02-16T20:57:45+00:00] [uid=admin, ip=172.20.0.1] Logged in
172.20.0.1 - - [16/Feb/2018:20:57:45 +0000] "POST /login HTTP/1.1" 200 5

[2018-02-16T20:58:57+00:00] [uid=admin, ip=172.20.0.1] Stored project/string-key=value
[2018-02-16T20:58:57+00:00] [uid=admin, ip=172.20.0.1] Stored project/select-key=option3
[2018-02-16T20:58:57+00:00] [uid=admin, ip=172.20.0.1] Stored project/checkbox-key=true
172.20.0.1 - - [16/Feb/2018:20:58:57 +0000] "POST /d/project/config HTTP/1.1" 200 14

Troubleshooting

Troubleshooting guide is available in separate document.

Build from source

git clone https://github.com/lukaszlach/consul-conf.git consul-conf/
cd consul-conf/
# build consul-conf:dev Docker image
make DOCKER_IMAGE_TAG=dev

Run manually

You can use docker-compose-example.yml found in this repository as a base for your configuration and call docker-compose up -d to run it.

Although, if you still want to use raw docker command:

# minimal example
docker run -d \
    -p 8080:80 \
    -v /etc/consul-conf:/etc/consul-conf \
    -e CONSUL_API_URL=http://consul.service.consul:8500 \
    --name consul_conf \
    lukaszlach/consul-conf:latest

# complex example
docker run -d \
    -p 8080:80 \
    -v /etc/consul-conf:/etc/consul-conf \
    -e HTTPS_PORT=443 \
    -e HTTP_ALLOW=0.0.0.0/0 \
    -e CRYPT_KEY=A3oj5abcadegkfgj2Vh \
    -e CONSUL_API_URL=http://consul.service.consul:8500 \
    -e CONSUL_ACL_TOKEN=custom-acl-token \
    -e BASIC_AUTH=admin:admin \
    -e LDAP_ENABLED=1 \
    -e LDAP_URL=ldaps://ldap.service.consul:636 \
    -e LDAP_ATTR_UID=uid \
    -e LDAP_BIND_DN=ou=users,ou=team,dc=company \
    -e NOTIFY_HIPCHAT=1 \
    -e HIPCHAT_API=https://hipchat.server.com/ \
    -e HIPCHAT_ROOM=123 \
    -e HIPCHAT_TOKEN=XTlyCeYH8rFhgjA4sJ8tu8UBnYhrmFOTPr5gM3J0 \
    -e NOTIFY_SLACK=1 \
    -e SLACK_ROOM=consul-conf \
    -e SLACK_URL=https://hooks.slack.com/services/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 \
    --name consul_conf \
    lukaszlach/consul-conf:latest

Licence

MIT License

Copyright (c) 2018 Łukasz Lach [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].