Giter VIP home page Giter VIP logo

stack-play's Introduction

stack-play

This repository has some docker-compose container stacks for local labs or for playgrounds to test things out. We use here just very basics to get a stack up and running nothing for productions.

If you want to look for more advanced production ready deployments with Kubernetes, please look at our OpenNMS Kubernetes repository.

Usage

By default we use bleeding container images from latest SNAPSHOT. The OCI images are downloaded from DockerHub.

There are two ways how you can tweak the settings. The compose file can inherent environment variables for things like time zone, container tags. You can also use the docker-compose.override.yaml option to customize the service stacks.

You can edit the image-cfg.env file and source it with:

source images-cfg.env

It sets the environment variables and you can spinup the stacks with the versions as specified.

Another way is using the docker-compose.override.yaml. Here an example if you want to run an OCI image from our CircleCI pipeline instead the ones published to DockerHub.

Change into a stack directory you want.

cd minimal-flows

Download a horizon.oci artifact from a branch from CircleCI which is created from the horizon-rpm-build job. Load the OCI image into your docker environment with docker image load -i horizon.oci, it will be loaded with the tag horizon:latest.

Create a docker-compose.override.yaml and override the image tag for the horizon service:

vi docker-compose.override.yaml
---
version: '3'
services:
  horizon:
    image: horizon:latest

Spin up the stack with docker-compose up -d. The container image directive is now overriden with using your local horizon:latest image tag instead of downloading the one from DockerHub.

stack-play's People

Contributors

aramosvizcarra avatar gallenc avatar indigo423 avatar maximbrener avatar mfuhrmann avatar mmahacek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stack-play's Issues

✨ Use floating tag latest instead fixed version tags

We have introduced the latest floating tag which references the last stable release of Horizon. We can use this as the default.

Pro: New people automatically get the latest stable release
Con: As soon they have a version longer running, they might get updates on the docker pull and have to do config upgrades
Mitigation: As people want to run them for a longer period of time, give them hints to pin the image tags to a specific version to avoid unplanned updates.

minimal-newts cassandra hostname key settings are wrong

stack-play\minimal-newts\container-fs\opt\opennms-overlay\confd\horizon-config.yaml
cassandra:
hostnames: cassandra-01

should be (no s on hostnames)

cassandra:
hostname: cassandra-01

for correct initialisation of cassandra database

Also true in stack-play\full-stack

🐞 Cassandra initialisation fails with incorrect data center DC setting

related opennms docker issue https://opennms.atlassian.net/browse/NMS-16025

horizon  | 08:23:58.539 [s0-admin-0] WARN  com.datastax.oss.driver.internal.core.loadbalancing.helper.OptionalLocalDcHelper - [s0|default] 
You specified datacenter1 as the local DC, 
but some contact points are from a different 
DC: Node(endPoint=cassandra-01/172.22.0.3:9042, 
hostId=55c2b03b-2c5e-43a0-b9be-a29f2ba0128f, 
hashCode=1b957ce8)=opennms-lab; 
please provide the correct local DC, or check your contact points

Waiting for this PR before fix - in mean time use work around below.
fixed config in https://github.com/opennms-forge/stack-play/tree/issue25-NMS-16025 but cant use until NMS-16025 merged in OpenNMS

cassandra expects data center to be set as datecenter1 but in docker-compose set to opennms-lab
CASSANDRA_DC: opennms-lab
a work around is to add a im opennms.properties changing
#org.opennms.newts.config.datacenter=datacenter1
to
org.opennms.newts.config.datacenter=opennms-lab

The https://opennms.atlassian.net/browse/NMS-16025 pull request adds a new env cariable to toml
so that scripts in stack play can chane opennms environment using an environment variable

OPENNMS_CASSANDRA_DATACENTER=opennms-lab

LOCAL_JMX contains false in standalone-cassandra

ERROR: The Compose file './docker-compose.yaml' is invalid because:
services.cassandra-01.environment.LOCAL_JMX contains false, which is an invalid type, it should be a string, number, or a null

minimal flow: Kibana initial setup

Kibana is not configured to use the ES. You have to create an index pattern manually. Would be cool if this would work out of the box.

Use confd for configuration

Use confd-configuration files for configuration,

Override: /etc/confd/confd.toml

confdir = "/etc/confd"
backend = "file"
file = [ "/etc/confd/horizon-config.yaml" ]
log-level = "debug"

Horizon containers bomb out when run with tags that have merged non-root

If I bring up the minimal-horizon stack with ONMS_VERSION=bleeding (which tracks develop, currently leading up to Horizon 29, which runs by default as a non-root user), the horizon container exits during the installer run with exit code 127 and I see the following at the tail of the container's logs:

17:39:00.244 [Main] ERROR org.opennms.install.Installer - OpenNMS is configured to run as 'opennms' but '/opt/opennms/deploy/.gitkeep' is not writable by that account.
17:39:00.245 [Main] ERROR org.opennms.install.Installer - To fix permissions, run '/opt/opennms/bin/fix-permissions' as root

I assume this can be fixed by changing the volumes entry in the horizon service to use the long format and specify a user / group to own each volume's mount point, but I don't have time to track all that down at the moment. Dropping an issue as it's the second time I've bumped up against it in the past month or so.

🐞 Default settings database connections is too high

We have reduced the default settings for the minimum connection pool from 50 to 25 which isn't reflected in our container templates. With a default configuration with PostgreSQL which allows just 100 connections by default you will see the following error message in the PostgreSQL container FATAL: sorry, too many clients already. We can set the minpool size in the horizon-config.yml file as a workaround.

Wrong ES docker repo is set in minimal-flow config

Found here:
https://github.com/opennms-forge/stack-play/blob/master/minimal-flows/docker-compose.yaml#L30
https://github.com/opennms-forge/stack-play/blob/master/minimal-flows/docker-compose.yaml#L100

Pulling es01 (docker.elastic.co/elasticsearch:7.6.2)...
ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.

Continue with the new image? [yN]y
Pulling es01 (docker.elastic.co/elasticsearch:7.6.2)...
ERROR: pull access denied for docker.elastic.co/elasticsearch, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Using docker.io and it works.

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.